Skip to content

Commit

Permalink
nvm
Browse files Browse the repository at this point in the history
  • Loading branch information
iTitus committed Nov 10, 2020
1 parent f3c7e4e commit df40500
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import io.github.ititus.si.quantity.value.QuantityValue;
import org.assertj.core.api.InstanceOfAssertFactories;

public class MyAssertions implements InstanceOfAssertFactories {
public class Assertions implements InstanceOfAssertFactories {

public static BigRationalAssert assertThat(BigRational actual) {
return new BigRationalAssert(actual);
Expand All @@ -14,6 +14,6 @@ public static QuantityValueAssert assertThat(QuantityValue actual) {
return new QuantityValueAssert(actual);
}

protected MyAssertions() {
protected Assertions() {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import org.junit.jupiter.api.Test;

import static io.github.ititus.assertions.MyAssertions.assertThat;
import static io.github.ititus.assertions.Assertions.assertThat;
import static io.github.ititus.math.number.BigRational.of;
import static io.github.ititus.math.number.BigRationalConstants.*;
import static io.github.ititus.math.number.BigRationalMath.exp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import org.junit.jupiter.api.Test;

import static io.github.ititus.assertions.MyAssertions.assertThat;
import static io.github.ititus.assertions.Assertions.assertThat;
import static io.github.ititus.math.number.BigRational.of;
import static io.github.ititus.math.number.BigRationalConstants.*;
import static io.github.ititus.math.number.BigRationalMath.ln;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import org.junit.jupiter.api.Test;

import static io.github.ititus.assertions.MyAssertions.assertThat;
import static io.github.ititus.assertions.Assertions.assertThat;
import static io.github.ititus.math.number.BigRational.of;
import static io.github.ititus.math.number.BigRationalConstants.*;
import static io.github.ititus.math.number.BigRationalMath.sin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package io.github.ititus.si.quantity.type;

import io.github.ititus.assertions.MyAssertions;
import io.github.ititus.si.quantity.Quantity;
import org.junit.jupiter.api.Test;

import static io.github.ititus.assertions.Assertions.assertThat;
import static io.github.ititus.math.number.BigRational.ofExp;
import static io.github.ititus.si.prefix.MetricPrefix.CENTI;
import static io.github.ititus.si.prefix.MetricPrefix.MILLI;
Expand All @@ -20,7 +20,7 @@ public void metreToCentiMetre() {
Quantity<Length> metres = METRE.get(1.35);
Quantity<Length> centiMetres = metres.convertTo(METRE.prefix(CENTI));

MyAssertions.assertThat(centiMetres.getValue()).isCloseTo(of(135), withPercentage(1.0));
assertThat(centiMetres.getValue()).isCloseTo(of(135), withPercentage(1.0));
assertThat(centiMetres.getUnit().getSymbol()).isEqualTo("cm");
}

Expand All @@ -29,7 +29,7 @@ public void milliMetreToMiles() {
Quantity<Length> milliMetre = METRE.prefix(MILLI).get(23);
Quantity<Length> miles = milliMetre.convertTo(MILE);

MyAssertions.assertThat(miles.getValue()).isCloseTo(of(ofExp(1429, -8)), withPercentage(1.0));
assertThat(miles.getValue()).isCloseTo(of(ofExp(1429, -8)), withPercentage(1.0));
assertThat(miles.getUnit().getSymbol()).isEqualTo("mi");
}
}
4 changes: 2 additions & 2 deletions src/test/java/io/github/ititus/si/quantity/type/MassTest.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package io.github.ititus.si.quantity.type;

import io.github.ititus.assertions.MyAssertions;
import io.github.ititus.si.quantity.Quantity;
import org.junit.jupiter.api.Test;

import static io.github.ititus.assertions.Assertions.assertThat;
import static io.github.ititus.math.number.BigRational.ofExp;
import static io.github.ititus.si.prefix.MetricPrefix.NANO;
import static io.github.ititus.si.quantity.value.QuantityValue.of;
Expand All @@ -19,7 +19,7 @@ public void kilogramToNanoGrams() {
Quantity<Mass> kiloGrams = KILOGRAM.get(1.35);
Quantity<Mass> nanoGrams = kiloGrams.convertTo(GRAM.prefix(NANO));

MyAssertions.assertThat(nanoGrams.getValue()).isCloseTo(of(ofExp(135, 10)), withPercentage(1));
assertThat(nanoGrams.getValue()).isCloseTo(of(ofExp(135, 10)), withPercentage(1));
assertThat(nanoGrams.getUnit().getSymbol()).isEqualTo("ng");
}
}

0 comments on commit df40500

Please sign in to comment.