urn_perun_member_attribute_def_virt_loa extends MemberVirtualAttributesModuleAbstract implements MemberVirtualAttributesModuleImplApi { @Override public void checkAttributeSemantics(PerunSessionImpl sess, Member member, Attribute attribute) throws WrongReferenceAttributeValueException { Attribute currentAttribute = getAttributeValue(sess, member, attribute); if(!attribute.equals(currentAttribute)) throw new WrongReferenceAttributeValueException(attribute, currentAttribute, member, null, member, null, "Attribute value is not the highest value from member's UserExtSources Loas."); }  @Override void checkAttributeSemantics(PerunSessionImpl sess, Member member, Attribute attribute); @Override Attribute fillAttribute(PerunSessionImpl sess, Member member, AttributeDefinition attributeDefinition); @Override Attribute getAttributeValue(PerunSessionImpl sess, Member member, AttributeDefinition attributeDefinition); @Override boolean setAttributeValue(PerunSessionImpl sess, Member member, Attribute attribute); @Override void removeAttributeValue(PerunSessionImpl sess, Member member, AttributeDefinition attributeDefinition); @Override AttributeDefinition getAttributeDefinition();  }
@Test(expected = WrongReferenceAttributeValueException.class) public void testCheckNotHighestValue() throws Exception { System.out.println("testCheckNotHighestValue()"); attributeToCheck.setValue("0"); classInstance.checkAttributeSemantics(session, member, attributeToCheck); }
@Test public void testCorrectSemantics() throws Exception { System.out.println("testCorrectSemantics()"); attributeToCheck.setValue("1"); classInstance.checkAttributeSemantics(session, member, attributeToCheck); }