public void testEnumLiteralExp()
        {
            AstOclModelElementFactory factory1  = AstOclModelElementFactoryManager.getInstance(umlModel.getOclPackage());
            CoreEnumeration           situation = (CoreEnumeration)getClassifier("Situation");
            CoreEnumLiteral           married   = situation.lookupEnumLiteral("married");
            EnumLiteralExp            exp       = factory1.createEnumLiteralExp(married);

            Assert.AreEqual("Situation::married", exp.ToString());
        }
Esempio n. 2
0
        public EnumLiteralExp createEnumLiteralExp(
            CoreEnumLiteral enumLiteral)
        {
            EnumLiteralExp exp = new EnumLiteralExpImpl();

            exp.setFactory(this);

            exp.setType(enumLiteral.getTheEnumeration());
            exp.setReferredEnumLiteral(enumLiteral);
            return(exp);
        }
Esempio n. 3
0
 /**
  * @param referredEnumLiteral The referredEnumLiteral to set.
  */
 public void setReferredEnumLiteral(CoreEnumLiteral referredEnumLiteral)
 {
     this.referredEnumLiteral = referredEnumLiteral;
 }