Browse Source

changed mutipication tests to use hamcrest asserThat instead of assertTrue

featureKomplexNumberCalculator
Lukas Reichwein 5 years ago
parent
commit
abed67ee68
  1. 7
      src/test/java/com/ugsbo/complexnumcalc/MultiplyComplexNumbersTest.java

7
src/test/java/com/ugsbo/complexnumcalc/MultiplyComplexNumbersTest.java

@ -1,6 +1,7 @@
package com.ugsbo.complexnumcalc; package com.ugsbo.complexnumcalc;
import static org.junit.Assert.assertTrue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;
import org.junit.Test; import org.junit.Test;
@ -14,7 +15,7 @@ public class MultiplyComplexNumbersTest {
ComplexNumber product = firstFaktor.multiply(secoundFaktor); ComplexNumber product = firstFaktor.multiply(secoundFaktor);
assertTrue("The product is not as expected", product.equals(expected));
assertThat("The product is not as expected", product, equalTo(expected));
} }
@Test @Test
@ -25,6 +26,6 @@ public class MultiplyComplexNumbersTest {
ComplexNumber product = firstFaktor.multiply(secoundFaktor); ComplexNumber product = firstFaktor.multiply(secoundFaktor);
assertTrue("The product is not as expected", product.equals(expected));
assertThat("The product is not as expected", product, equalTo(expected));
} }
} }
Loading…
Cancel
Save