From c1c08558ca92a9491b38a2df0b56b26da1510b43 Mon Sep 17 00:00:00 2001 From: Lukas Reichwein Date: Tue, 16 Jul 2019 19:36:21 +0200 Subject: [PATCH] changed SubstrationTests to use hamcrest assertThat instead of assertTrue --- .../ugsbo/complexnumcalc/SubstractComplexNumbersTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/java/com/ugsbo/complexnumcalc/SubstractComplexNumbersTest.java b/src/test/java/com/ugsbo/complexnumcalc/SubstractComplexNumbersTest.java index cc42978..2df14c3 100644 --- a/src/test/java/com/ugsbo/complexnumcalc/SubstractComplexNumbersTest.java +++ b/src/test/java/com/ugsbo/complexnumcalc/SubstractComplexNumbersTest.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 SubstractComplexNumbersTest { ComplexNumber difference = minuend.substract(subtrahend); - assertTrue("The difference is not as expected", difference.equals(expected)); + assertThat("The difference is not as expected", difference, equalTo(expected)); } @Test @@ -25,6 +26,6 @@ public class SubstractComplexNumbersTest { ComplexNumber difference = minuend.substract(subtrahend); - assertTrue("The difference is not as expected", difference.equals(expected)); + assertThat("The difference is not as expected", difference, equalTo(expected)); } } \ No newline at end of file