urn_perun_facility_attribute_def_def_accountExpirationTime extends FacilityAttributesModuleAbstract implements FacilityAttributesModuleImplApi { @Override public void checkAttributeSemantics(PerunSessionImpl perunSession, Facility facility, Attribute attribute) throws WrongReferenceAttributeValueException { if(attribute.getValue() == null) { throw new WrongReferenceAttributeValueException(attribute, null, facility, null, "account expiration time shouldn't be null"); } }  @Override void checkAttributeSemantics(PerunSessionImpl perunSession, Facility facility, Attribute attribute); @Override Attribute fillAttribute(PerunSessionImpl perunSession, Facility facility, AttributeDefinition attribute); @Override AttributeDefinition getAttributeDefinition();  }
@Test(expected = WrongReferenceAttributeValueException.class) public void testCheckAttributeSemanticsWithNullValue() throws Exception { System.out.println("testCheckAttributeSemanticsWithNullValue()"); attributeToCheck.setValue(null); classInstance.checkAttributeSemantics(session, facility, attributeToCheck); }
@Test public void testCheckAttributeSemanticsCorrect() throws Exception { System.out.println("testCheckAttributeSemanticsCorrect()"); attributeToCheck.setValue(5); classInstance.checkAttributeSemantics(session, facility, attributeToCheck); }