From abed67ee689a0b1a507e5319471aca2c03f1c252 Mon Sep 17 00:00:00 2001 From: Lukas Reichwein Date: Tue, 16 Jul 2019 19:38:04 +0200 Subject: [PATCH] changed mutipication tests to use hamcrest asserThat instead of assertTrue --- .../ugsbo/complexnumcalc/MultiplyComplexNumbersTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/java/com/ugsbo/complexnumcalc/MultiplyComplexNumbersTest.java b/src/test/java/com/ugsbo/complexnumcalc/MultiplyComplexNumbersTest.java index 92f007c..96aed77 100644 --- a/src/test/java/com/ugsbo/complexnumcalc/MultiplyComplexNumbersTest.java +++ b/src/test/java/com/ugsbo/complexnumcalc/MultiplyComplexNumbersTest.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 MultiplyComplexNumbersTest { 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 @@ -25,6 +26,6 @@ public class MultiplyComplexNumbersTest { 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)); } } \ No newline at end of file