elvyssoares

Exception Handling 1 - Original - Toy Example

Jun 10th, 2020
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.25 KB | None | 0 0
  1. @Test
  2. public void test() {
  3.     MyClass c = new MyClass();
  4.     try {
  5.         c.throwSomeException();
  6.         Assert.fail("Exception not thrown");
  7.     } catch (SomeException e) {
  8.         assertTrue(c.isA());
  9.         assertTrue(c.isB());
  10.         assertTrue(c.isC());
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment