@Test public void testSaveThenReadFromMemory_MemoryNotFullWhenSavingAndNotEmptyWhenReading() throws Exception { memory.saveInMemory(operationToSave); String readedOperation = memory.readLastFromMemory(); assertEquals(operationToSave, readedOperation); }
@Test(expected = MemoryEmptyException.class) public void testReadLastFromMemory_whenMemoryEmpty() throws Exception { memory.readLastFromMemory(); }
@Test(expected = MemoryEmptyException.class) public void testClearMemory() throws Exception { memory.clearMemory(); memory.readLastFromMemory(); }