public void testNameTypeAndMultiplicityWithDifferentBoundsUsingMinusOne() {
   Property property = createPropertyStringMultiple();
   PropertyServices.parseInputLabel(property, "  toto : Integer [5..-1] ");
   assertEquals("toto", property.getName());
   assertEquals(TYPE_INTEGER, property.getType());
   assertEquals(5, property.getLower());
   assertEquals(-1, property.getUpper());
   assertEquals(false, property.isDerived());
 }
 public void testNameOnly() {
   Property property = createPropertyStringMultiple();
   PropertyServices.parseInputLabel(property, "toto");
   assertEquals("toto", property.getName());
   assertEquals(TYPE_STRING, property.getType());
   assertEquals(0, property.getLower());
   assertEquals(-1, property.getUpper());
   assertEquals(false, property.isDerived());
 }
 public void testNameTypeAndMultiplicityUsingOneBoundStar() {
   Property property = createPropertyStringMultiple();
   PropertyServices.parseInputLabel(property, "toto : Integer [*] ");
   assertEquals("toto", property.getName());
   assertEquals(TYPE_INTEGER, property.getType());
   assertEquals(0, property.getLower());
   assertEquals(-1, property.getUpper());
   assertEquals(false, property.isDerived());
 }
 public void testIsDerivedNameAndNonExistingType() {
   Property property = createPropertyStringMultiple();
   PropertyServices.parseInputLabel(property, "/toto : NonExistingType");
   assertEquals("toto", property.getName());
   assertEquals(TYPE_STRING, property.getType());
   assertEquals(0, property.getLower());
   assertEquals(-1, property.getUpper());
   assertEquals(true, property.isDerived());
 }
 public void testIsDerivedNameAndType() {
   Property property = createPropertyStringMultiple();
   PropertyServices.parseInputLabel(property, "/toto : Integer");
   assertEquals("toto", property.getName());
   assertEquals(TYPE_INTEGER, property.getType());
   assertEquals(0, property.getLower());
   assertEquals(-1, property.getUpper());
   assertEquals(true, property.isDerived());
 }
 public void testIsDerivedWithoutName() {
   Property property = createPropertyStringMultiple();
   PropertyServices.parseInputLabel(property, "/");
   assertEquals("", property.getName());
   assertEquals(TYPE_STRING, property.getType());
   assertEquals(0, property.getLower());
   assertEquals(-1, property.getUpper());
   assertEquals(true, property.isDerived());
 }
 public void testTypeOnly() {
   Property property = createPropertyStringMultiple();
   PropertyServices.parseInputLabel(property, " : Integer");
   assertEquals("", property.getName());
   assertEquals(TYPE_INTEGER, property.getType());
   assertEquals(0, property.getLower());
   assertEquals(-1, property.getUpper());
   assertEquals(false, property.isDerived());
 }
 public void testFullwithLotsOfSpaces() {
   Property property = createPropertyStringMultiple();
   PropertyServices.parseInputLabel(
       property, "  /   to   to    :    Integer     [    5    ..   -1   ]    ");
   assertEquals("to   to", property.getName());
   assertEquals(TYPE_INTEGER, property.getType());
   assertEquals(5, property.getLower());
   assertEquals(-1, property.getUpper());
   assertEquals(true, property.isDerived());
 }
 public void testNameTypeAndMultiplicityWithIncorrectBounds3() {
   Property property = createPropertyStringMultiple();
   property.setLower(2);
   property.setUpper(4);
   PropertyServices.parseInputLabel(property, "  toto : Integer [5..3] ");
   assertEquals("toto", property.getName());
   assertEquals(TYPE_INTEGER, property.getType());
   assertEquals(2, property.getLower());
   assertEquals(4, property.getUpper());
   assertEquals(false, property.isDerived());
 }