Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. @Test
  2.     void run() throws IOException, ClassNotFoundException {
  3.  
  4.         //given
  5.         FXMLWarehouse warehouse = spy(new FXMLWarehouse(100, 1000));
  6.         Server server = spy(new Server(warehouse));
  7.        
  8.  
  9.         //when
  10.         when(server.readObject(server.fromClient)).thenReturn(0x2);
  11.  
  12.         server.run();
  13.  
  14.         //then
  15.         verify(server).writeObject(null, warehouse.getAllCargo());
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement