@Test public void deleteFromNonExistingNamespace() { assertEquals(0, store.countNamespaces()); assertEquals(0, store.sizeOfNamespace(NAMESPACE1)); store.delete(NAMESPACE1, KEY1); assertEquals(0, store.countNamespaces()); assertEquals(0, store.sizeOfNamespace(NAMESPACE1)); }
@Test public void putNull() { Serializable value = null; assertEquals(0, store.countNamespaces()); store.put(NAMESPACE1, KEY1, value); assertEquals(1, store.countNamespaces()); assertEquals(1, store.sizeOfNamespace(NAMESPACE1)); }
@Test public void putToEmptyStoreCreatesNamespace() { Serializable value = "value"; assertEquals(0, store.countNamespaces()); store.put(NAMESPACE1, KEY1, value); assertEquals(1, store.countNamespaces()); assertEquals(1, store.sizeOfNamespace(NAMESPACE1)); }
@Test public void putDifferentKeysToSameNamespace() { Serializable value = "value"; assertEquals(0, store.countNamespaces()); store.put(NAMESPACE1, KEY1, value); store.put(NAMESPACE1, KEY2, value); assertEquals(1, store.countNamespaces()); assertEquals(2, store.sizeOfNamespace(NAMESPACE1)); }