示例#1
0
  @Test
  public void testSaveThenReadFromMemory_MemoryNotFullWhenSavingAndNotEmptyWhenReading()
      throws Exception {
    memory.saveInMemory(operationToSave);
    String readedOperation = memory.readLastFromMemory();

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