Skip to content

Commit 1e57cd6

Browse files
committed
Refactor ejer5 to avoid machers
1 parent 79a9287 commit 1e57cd6

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

tema1_2_ejer5/src/test/java/es/codeurjc/test/complex/ComplexTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package es.codeurjc.test.complex;
22

3-
import static org.hamcrest.MatcherAssert.assertThat;
4-
import static org.hamcrest.CoreMatchers.containsString;
53
import static org.junit.jupiter.api.Assertions.assertEquals;
64
import static org.junit.jupiter.api.Assertions.assertThrows;
75

@@ -41,6 +39,6 @@ public void GivenComplex0_0_whenReciprocal_thenExceptionIsThrown() {
4139
ArithmeticException actual =
4240
assertThrows(ArithmeticException.class, () -> zero.reciprocal());
4341

44-
assertThat(actual.getMessage(), containsString("division by zero"));
42+
assertEquals(actual.getMessage(), "division by zero");
4543
}
4644
}

0 commit comments

Comments
 (0)