elvyssoares

Resource Optimism - Refactored - Toy Example

Jun 10th, 2020
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.21 KB | None | 0 0
  1. private ExternalResource r;
  2. private MyClass c;
  3. @Before
  4. public void setup() throws Exception {
  5.     r = new ExternalResource();
  6.     c = new MyClass();
  7. }
  8. @Test
  9. public void test() throws Exception {
  10.     c.setA(r.performAction());
  11.     assertTrue(c.isA());
  12. }
Advertisement
Add Comment
Please, Sign In to add comment