Package org.eclipse.uml2.uml

Examples of org.eclipse.uml2.uml.ValueSpecification.integerValue()


    when(slot.getValues()).thenReturn(valueSpecifications);
    when(valueSpecifications.iterator()).thenReturn(valueSpecificationIter);
    when(valueSpecificationIter.hasNext()).thenReturn(true).thenReturn(
        false);
    when(valueSpecificationIter.next()).thenReturn(valueSpecification);
    when(valueSpecification.integerValue()).thenReturn(0);

    enumGenerator.generateConstants(enumeration, ast, ed);

    assertEquals("public enum Company {HOME(0)}\n", ed.toString());
  }
View Full Code Here


    when(slot.getValues()).thenReturn(valueSpecifications);
    when(valueSpecifications.iterator()).thenReturn(valueSpecificationIter);
    when(valueSpecificationIter.hasNext()).thenReturn(true).thenReturn(
        false);
    when(valueSpecificationIter.next()).thenReturn(valueSpecification);
    when(valueSpecification.integerValue()).thenReturn(1);

    enumGenerator.generateConstants(enumeration, ast, ed);

    assertEquals("public enum Company {HOME(1L)}\n", ed.toString());
  }
View Full Code Here

      if (vs.getType() == null) {
        return vs.stringValue();
      } else if (vs.getType().getName().equals("String")) {
        return vs.stringValue();
      } else if (vs.getType().getName().equals("Integer")) {
        return vs.integerValue() + "";
      } else if (vs.getType().getName().equals("Boolean")) {
        return vs.booleanValue() + "";
      }
      return vs.stringValue();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.