Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Rule
- SomeException e = SomeException.none();
- @Test
- public void test() {
- e.expect(SomeException.class);
- e.expectMessage("Error message");
- MyClass c = new MyClass();
- c.throwSomeException();
- }
Advertisement
Add Comment
Please, Sign In to add comment