Commit fd7f401f authored by Adam Blank's avatar Adam Blank
Browse files

Update ChooserTests.java

parent 43796453
Pipeline #4066 failed with stage
in 0 seconds
Showing with 2 additions and 2 deletions
+2 -2
......@@ -77,7 +77,7 @@ public class ChooserTests {
@Test
public void testExceptionsViolatedInRandomConstructor() {
Constructor c = Reflection.getConstructor(RandomHangmanChooser.class, int.class, int.class);
assertThrows(IllegalStateException.class, () -> Reflection.newInstance(c, -1, 3));
assertThrows(IllegalArgumentException.class, () -> Reflection.newInstance(c, -1, 3));
assertThrows(IllegalArgumentException.class, () -> Reflection.newInstance(c, 3, -1));
assertThrows(IllegalStateException.class, () -> Reflection.newInstance(c, Integer.MAX_VALUE, 3));
}
......@@ -193,7 +193,7 @@ public class ChooserTests {
@Test
public void testExceptionsViolatedInEvilConstructor() {
Constructor c = Reflection.getConstructor(EvilHangmanChooser.class, int.class, int.class);
assertThrows(IllegalStateException.class, () -> Reflection.newInstance(c, -1, 3));
assertThrows(IllegalArgumentException.class, () -> Reflection.newInstance(c, -1, 3));
assertThrows(IllegalArgumentException.class, () -> Reflection.newInstance(c, 3, -1));
assertThrows(IllegalStateException.class, () -> Reflection.newInstance(c, Integer.MAX_VALUE, 3));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment