urn_perun_entityless_attribute_def_def_namespace_maxUID extends EntitylessAttributesModuleAbstract implements EntitylessAttributesModuleImplApi { @Override public void checkAttributeSyntax(PerunSessionImpl perunSession, String key, Attribute attribute) throws WrongAttributeValueException { Integer maxUID = attribute.valueAsInteger(); if(maxUID != null && maxUID < 1) throw new WrongAttributeValueException(attribute, "Attribute value must be bigger than 0."); }  @Override void checkAttributeSyntax(PerunSessionImpl perunSession, String key, Attribute attribute); @Override void checkAttributeSemantics(PerunSessionImpl perunSession, String key, Attribute attribute); @Override AttributeDefinition getAttributeDefinition(); @Override List<String> getDependencies();  }
@Test(expected = WrongAttributeValueException.class) public void testValueLesserThan1() throws Exception { System.out.println("testValueLesserThan1()"); attributeToCheck.setValue(0); classInstance.checkAttributeSyntax(session, key, attributeToCheck); }
@Test public void testCorrectSyntax() throws Exception { System.out.println("testValueLesserThan1()"); attributeToCheck.setValue(1); classInstance.checkAttributeSyntax(session, key, attributeToCheck); }