urn_perun_group_resource_attribute_def_def_systemUnixGID extends GroupResourceAttributesModuleAbstract implements GroupResourceAttributesModuleImplApi { @Override public void checkAttributeSyntax(PerunSessionImpl sess, Group group, Resource resource, Attribute attribute) throws WrongAttributeValueException { Integer gid = attribute.valueAsInteger(); if(gid != null && gid < 1) { throw new WrongAttributeValueException(attribute,"GID number less than 1 is not allowed value."); } }  @Override Attribute fillAttribute(PerunSessionImpl sess, Group group, Resource resource, AttributeDefinition attributeDefinition); @Override void checkAttributeSyntax(PerunSessionImpl sess, Group group, Resource resource, Attribute attribute); @Override void checkAttributeSemantics(PerunSessionImpl sess, Group group, Resource resource, Attribute attribute); @Override List<String> getDependencies(); @Override AttributeDefinition getAttributeDefinition();  }
@Test(expected = WrongAttributeValueException.class) public void testWrongValue() throws Exception { System.out.println("testWrongValue()"); attributeToCheck.setValue(0); classInstance.checkAttributeSyntax(sess, group, resource, attributeToCheck); }
@Test public void testCorrectSyntax() throws Exception { System.out.println("testCorrectSyntax()"); attributeToCheck.setValue(1); classInstance.checkAttributeSyntax(sess, group, resource, attributeToCheck); }