Beispiel #1
0
        public void EA_WrapVolatileElement_diagramTest()
        {
            IEADiagram         diagram    = _e.GetDecisionForcesDiagram();
            EventProperties    properties = EAEventPropertiesHelper.GetInstance("", "", "", 0, 0, diagram.ID, 0, 0);
            IEAVolatileElement e          = EAMain.WrapVolatileElement(properties);

            Assert.IsTrue(diagram.ID == e.Diagram.ID);
        }
Beispiel #2
0
        public void EA_WrapVolatileElement_elementTest()
        {
            Element         element    = _e.GetDecisionPackageElement();
            EventProperties properties = EAEventPropertiesHelper.GetInstance(
                EAConstants.EventPropertyTypeElement, element.Subtype.ToString(CultureInfo.InvariantCulture), element.Stereotype, 0, 0, 0, 0,
                element.ElementID);
            IEAVolatileElement e = EAMain.WrapVolatileElement(properties);

            Assert.IsTrue(element.ElementID == e.ParentElement.ID);
        }
Beispiel #3
0
        public override bool EA_OnPreNewElement(Repository repository, EventProperties properties)
        {
            EAMain.UpdateRepository(repository);
            IEAVolatileElement element = EAMain.WrapVolatileElement(properties);

            foreach (IRepositoryListener l in _listeners)
            {
                if (!l.OnPreNewElement(element))
                {
                    return(false);
                }
            }
            return(true);
        }