@Test public void shouldSetHigherView() { storage.setView(5); assertEquals(5, storage.getView()); storage.setView(9); assertEquals(9, storage.getView()); }
@Test public void shouldNotSetEqualView() { storage.setView(5); assertEquals(5, storage.getView()); try { storage.setView(5); } catch (IllegalArgumentException e) { return; } fail(); }
@Test public void initialViewNumberShouldEqualZero() { assertEquals(0, storage.getView()); }