Exemplo n.º 1
0
  @Test
  public void testSaveThenReadFromMemory_MemoryNotFullWhenSavingAndNotEmptyWhenReading()
      throws Exception {
    memory.saveInMemory(operationToSave);
    String readedOperation = memory.readLastFromMemory();

    assertEquals(operationToSave, readedOperation);
  }
Exemplo n.º 2
0
 @Test(expected = MemoryEmptyException.class)
 public void testReadLastFromMemory_whenMemoryEmpty() throws Exception {
   memory.readLastFromMemory();
 }
Exemplo n.º 3
0
 @Test(expected = MemoryEmptyException.class)
 public void testClearMemory() throws Exception {
   memory.clearMemory();
   memory.readLastFromMemory();
 }