mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-30 07:54:05 +08:00
@ -13,10 +13,8 @@ public class ADTFractionTest {
|
||||
|
||||
@Test
|
||||
void testConstructorWithDenominatorEqualToZero() {
|
||||
Exception exception = assertThrows(
|
||||
IllegalArgumentException.class,
|
||||
() -> new ADTFraction(1, 0)
|
||||
);
|
||||
Exception exception
|
||||
= assertThrows(IllegalArgumentException.class, () -> new ADTFraction(1, 0));
|
||||
assertEquals("Denominator cannot be 0", exception.getMessage());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user