@Test public void testGraphAttributeOperationsCreationWithNullName(){ GraphAttributeOperations graphAttributeOperations = new GraphAttributeOperations(); Name name = null; String attributeOperationValue = "DummySetOperationValue1"; try{ graphAttributeOperations.setAttributeValue(name, attributeOperationValue); fail("Should throw an exception with null attribute name"); }catch(Exception e){ assertTrue(e instanceof IllegalArgumentException); assertEquals(e.getMessage(), "Parameter \"name::Atribute.Name\" cannot be null"); } }
public void setAttributeValue(Name name, Object value) { if (value == null) { unsetAttributeValue(name); } else { Preconditions.argumentNotNull(name,"name::Atribute.Name"); setOperations.put(name, value); } }
GraphAttributeOperations { public void setAttributeValue(Name name, Object value) { if (value == null) { unsetAttributeValue(name); } else { Preconditions.argumentNotNull(name,"name::Atribute.Name"); setOperations.put(name, value); } } }
GraphAttributeOperations { public void setAttributeValue(Name name, Object value) { if (value == null) { unsetAttributeValue(name); } else { Preconditions.argumentNotNull(name,"name::Atribute.Name"); setOperations.put(name, value); } } GraphAttributeOperations(); }
GraphAttributeOperations { public void setAttributeValue(Name name, Object value) { if (value == null) { unsetAttributeValue(name); } else { Preconditions.argumentNotNull(name,"name::Atribute.Name"); setOperations.put(name, value); } } GraphAttributeOperations(); void setAttributeValue(Name name, Object value); void unsetAttributeValue(Name name); Map<Name, Object> getSetValueOperations(); List<Name> getUnsetValueOperations(); }
GraphAttributeOperations { public void setAttributeValue(Name name, Object value) { if (value == null) { unsetAttributeValue(name); } else { Preconditions.argumentNotNull(name,"name::Atribute.Name"); setOperations.put(name, value); } } GraphAttributeOperations(); void setAttributeValue(Name name, Object value); void unsetAttributeValue(Name name); Map<Name, Object> getSetValueOperations(); List<Name> getUnsetValueOperations();  }