From ba9015387f724da9a5b59da80e792a0f1558db4a Mon Sep 17 00:00:00 2001 From: Lukas Reichwein Date: Tue, 16 Jul 2019 19:34:02 +0200 Subject: [PATCH] Changed AddComplexNumberTest to use hamcrest assertThat instead of assertTrue --- .../com/ugsbo/complexnumcalc/AddComplexNumbersTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/java/com/ugsbo/complexnumcalc/AddComplexNumbersTest.java b/src/test/java/com/ugsbo/complexnumcalc/AddComplexNumbersTest.java index 644406f..6197380 100644 --- a/src/test/java/com/ugsbo/complexnumcalc/AddComplexNumbersTest.java +++ b/src/test/java/com/ugsbo/complexnumcalc/AddComplexNumbersTest.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 AddComplexNumbersTest { ComplexNumber sum = firstAddend.add(secoundAddend); - assertTrue("Dont sum to the sum", sum.equals(expected)); + assertThat("Dont sum to the sum", sum, equalTo(expected)); } @Test @@ -25,6 +26,6 @@ public class AddComplexNumbersTest { ComplexNumber sum = firstAddend.add(secoundAddend); - assertTrue("Dont sum to the sum", sum.equals(expected)); + assertThat("Dont sum to the sum", sum, equalTo(expected)); } } \ No newline at end of file