17181920212223242526
*/ @Test public void testInitilization() { Memory.reset(); Memory memory = Memory.getInstance(); Difficulty diff = new MockDifficulty(); memory.setDifficulty(diff); assertEquals(10, memory.getLives()); }
19202122232425262728
*/ @Test public void testInitilization() { Memory.reset(); Memory memory = Memory.getInstance(); Difficulty diff = new EasyDifficulty(); memory.setDifficulty(diff); assertEquals(10, memory.getLives()); }
18192021222324252627
*/ @Test public void testMockInitlization() { Memory.reset(); Memory m = Memory.getInstance(); MemoryState state = new MockMemoryState(m); m.setState(state); assertEquals(state, m.getState()); }
*/ @Test public void testInitilization() { Memory.reset(); Memory memory = Memory.getInstance(); Difficulty diff = new HardDifficulty(); memory.setDifficulty(diff); assertEquals(5, memory.getLives()); }
*/ @Test public void testInitlization() { Memory.reset(); Memory m = Memory.getInstance(); MemoryState state = new EndGameState(m); m.setState(state); assertEquals(state, m.getState()); }
3233343536373839404142
*/ @Test public void testEndGame() { Memory.reset(); Memory m = Memory.getInstance(); MemoryState state = new EndGameState(m); m.setState(state); state.handle(); assertTrue(m.getState() instanceof PlayingState); }
*/ @Test public void testInitlization() { Memory.reset(); Memory m = Memory.getInstance(); MemoryState state = new PlayingState(m); m.setState(state); assertEquals(state, m.getState()); }
3031323334353637383940
*/ @Test public void testEndGame() { Memory.reset(); Memory m = Memory.getInstance(); MemoryState state = new PlayingState(m); m.setState(state); state.handle(); assertTrue(m.getState() instanceof EndGameState); }