From 940b433a49f54932b08d829e91a5b0fb4572425f Mon Sep 17 00:00:00 2001 From: Lukas Reichwein Date: Tue, 16 Jul 2019 19:42:27 +0200 Subject: [PATCH] changed division test to use hamcrest assertThat instead of assertTrue --- .../com/ugsbo/complexnumcalc/DivideComplexNumbersTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/java/com/ugsbo/complexnumcalc/DivideComplexNumbersTest.java b/src/test/java/com/ugsbo/complexnumcalc/DivideComplexNumbersTest.java index fd0e2e4..f0794a7 100644 --- a/src/test/java/com/ugsbo/complexnumcalc/DivideComplexNumbersTest.java +++ b/src/test/java/com/ugsbo/complexnumcalc/DivideComplexNumbersTest.java @@ -1,6 +1,7 @@ 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; @@ -14,7 +15,7 @@ public class DivideComplexNumbersTest { ComplexNumber quotient = dividend.divide(divisor); - assertTrue("The quotient is not as expected", quotient.equals(expected)); + assertThat("The quotient is not as expected", quotient, equalTo(expected)); } @Test @@ -25,6 +26,6 @@ public class DivideComplexNumbersTest { ComplexNumber quotient = dividend.divide(divisor); - assertTrue("The quotient is not as expected", quotient.equals(expected)); + assertThat("The quotient is not as expected", quotient, equalTo(expected)); } } \ No newline at end of file