@Test public void testGetContainerProperty_NonexistentProperty() { System.out.println("testGetContainerProperty_NonexistentItem"); assertNull( container.getContainerProperty( serviceStub.getRootCategories().get(0).getId(), "nonexistent")); }
@Test public void testGetContainerProperty() { System.out.println("testGetItem"); for (Category root : serviceStub.getRootCategories()) { assertEquals(root.getId(), container.getContainerProperty(root.getId(), "id").getValue()); assertEquals( root.getVersion(), container.getContainerProperty(root.getId(), "version").getValue()); assertEquals(root.getName(), container.getContainerProperty(root.getId(), "name").getValue()); assertEquals( root.getDescription(), container.getContainerProperty(root.getId(), "description").getValue()); assertNull(container.getContainerProperty(root.getId(), "parent").getValue()); for (Category c : serviceStub.getChildren(root)) { // Assume the rest of the properties are working assertEquals(c.getParent(), container.getContainerProperty(c.getId(), "parent").getValue()); } } }
@Test public void testGetContainerProperty_NonexistentItem() { System.out.println("testGetContainerProperty_NonexistentItem"); assertNull(container.getContainerProperty(-123l, "id")); }