NotesStore extends Store { public ObservableList<String> getNotes() { return FXCollections.unmodifiableObservableList(notes); } NotesStore(); ObservableList<String> getNotes();  }
@Test public void testAddASingleNote() { assertThat(store.getNotes()).isEmpty(); Dispatcher.getInstance().dispatch(new AddNoteAction("something")); assertThat(store.getNotes()).contains("something"); }
@Test public void testAddMultipleNotes() { assertThat(store.getNotes()).isEmpty(); Dispatcher.getInstance().dispatch(new AddNoteAction("something")); Dispatcher.getInstance().dispatch(new AddNoteAction("second")); Dispatcher.getInstance().dispatch(new AddNoteAction("third")); assertThat(store.getNotes()).containsExactly("something", "second", "third"); }
@Test public void testAddEmptyNotes() { assertThat(store.getNotes()).isEmpty(); Dispatcher.getInstance().dispatch(new AddNoteAction("")); assertThat(store.getNotes()).isEmpty(); Dispatcher.getInstance().dispatch(new AddNoteAction(null)); assertThat(store.getNotes()).isEmpty(); Dispatcher.getInstance().dispatch(new AddNoteAction(" ")); assertThat(store.getNotes()).isEmpty(); }