elvyssoares

Exception Handling 2 - Refactored - Toy Example

Jun 10th, 2020
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.22 KB | None | 0 0
  1. @Rule
  2. SomeException e = SomeException.none();
  3. @Test
  4. public void test() {
  5.     e.expect(SomeException.class);
  6.     e.expectMessage("Error message");
  7.     MyClass c = new MyClass();
  8.     c.throwSomeException();
  9. }
Advertisement
Add Comment
Please, Sign In to add comment