@Test public void pcpStringStore_createNewPcpString_doesNotCreateANewStringIfNullIsGiven() { PcpStringStore pcpStringStore = new PcpStringStore(); pcpStringStore.createPcpString(null); assertThat(pcpStringStore.getStrings(), emptyCollectionOf(PcpString.class)); }
@Test public void pcpStringStore_createNewPcpString_createsAndStoresAPcpString() { PcpStringStore pcpStringStore = new PcpStringStore(); pcpStringStore.createPcpString(MY_STRING); PcpString expected = new PcpString(MY_STRING); assertThat(pcpStringStore.getStrings(), CoreMatchers.<PcpString>hasItem(reflectivelyEqualing(expected))); }
private Collection<PcpString> getStrings() { return stringStore.getStrings(); }