Package org.emftrace.metamodel.URNModel

Examples of org.emftrace.metamodel.URNModel.Concern


      Callable<Void> call = new Callable<Void>()
      {
      @Override
      public Void call() throws Exception
      {
            Concern test = URNModelFactory.eINSTANCE.createConcern();
            accessLayer.addElement(project, test);
           
            test.setName("HAL9000");
            assertEquals("HAL9000", accessLayer.getNameOfModel(test));
            assertNull(accessLayer.getNameOfModel(null));
        return null;
      }
    };
View Full Code Here


           *
           */
         
        project.getContents().clear();
       
          Concern a1 = URNModelFactory.eINSTANCE.createConcern();
          Concern a2 = URNModelFactory.eINSTANCE.createConcern();
          Concern a3 = URNModelFactory.eINSTANCE.createConcern();
          Concern a4 = URNModelFactory.eINSTANCE.createConcern();
         
          accessLayer.addElement(project, a1);
          accessLayer.addElement(project, a2);
          accessLayer.addElement(project, a3);
          accessLayer.addElement(project, a4);
View Full Code Here

      @Override
      public Void call() throws Exception
      {           
        project.getContents().clear();
       
            Concern c1 = URNModelFactory.eINSTANCE.createConcern();
            Concern c2 = URNModelFactory.eINSTANCE.createConcern();
            LinkType t = LinkModelFactory.eINSTANCE.createLinkType();
           
            List<EObject> sources = new ArrayList<EObject>();
            sources.add(c1);
            List<EObject> targets = new ArrayList<EObject>();
View Full Code Here

      @Override
      public Void call() throws Exception
      {      
        project.getContents().clear();
       
            Concern c1 = URNModelFactory.eINSTANCE.createConcern();
            Concern c2 = URNModelFactory.eINSTANCE.createConcern();
            LinkType t = LinkModelFactory.eINSTANCE.createLinkType();
                   
            assertEquals(0, accessLayer.getElements(project, "LinkContainer").size());
            assertNotNull(linkManager.createLink(project, c1, c2, "42", t, ""));
            assertEquals(1, accessLayer.getElements(project, "LinkContainer").size());
View Full Code Here

            TraceLink link1 = LinkModelFactory.eINSTANCE.createTraceLink();
            TraceLink link2 = LinkModelFactory.eINSTANCE.createTraceLink();
            accessLayer.addElement(project, link1);
            accessLayer.addElement(project, link2);
                   
            Concern concern1 = URNModelFactory.eINSTANCE.createConcern();
            Concern concern2 = URNModelFactory.eINSTANCE.createConcern();
            Concern concern3 = URNModelFactory.eINSTANCE.createConcern();
            accessLayer.addElement(project, concern1);
            accessLayer.addElement(project, concern2);
            accessLayer.addElement(project, concern3);
           
            // create a transitive relation:       
View Full Code Here

            TraceLink link = LinkModelFactory.eINSTANCE.createTraceLink();
            accessLayer.addElement(project, link);
            link.setCreatedByUser(false);
            link.setCreatedByRule("Test");
           
            Concern c1 = URNModelFactory.eINSTANCE.createConcern();
            Concern c2 = URNModelFactory.eINSTANCE.createConcern();
            accessLayer.addElement(project, c1);
            accessLayer.addElement(project, c2);
           
            assertEquals(1, accessLayer.getElements(project, "TraceLink").size());
            linkManager.validateLink(project, (TraceLink)null);
View Full Code Here

      @Override
      public Void call() throws Exception
      {
            project.deleteElements(project.getContents());
         
            Concern c1 = URNModelFactory.eINSTANCE.createConcern();
            Actor   c2 = URNModelFactory.eINSTANCE.createActor();
            accessLayer.addElement(project, c1);
            accessLayer.addElement(project, c2);
           
            c1.setId("test_user");
            c2.setId("test_user");
                   
            Rule rule = RuleModelFactory.eINSTANCE.createRule();
            accessLayer.addElement(project, rule);
           
View Full Code Here

            linkManager.validateTrace(project, (Trace)null);
            assertEquals(1, accessLayer.getElements(project, "Trace").size());
            linkManager.validateTrace(null, (Trace)null);
            assertEquals(1, accessLayer.getElements(project, "Trace").size());
                  
            Concern concern1 = URNModelFactory.eINSTANCE.createConcern();
            Concern concern2 = URNModelFactory.eINSTANCE.createConcern();
            Concern concern3 = URNModelFactory.eINSTANCE.createConcern();
            Concern concern4 = URNModelFactory.eINSTANCE.createConcern();
            accessLayer.addElement(project, concern1);
            accessLayer.addElement(project, concern2);
            accessLayer.addElement(project, concern3);
            accessLayer.addElement(project, concern4);
                   
            TraceLink link1 = LinkModelFactory.eINSTANCE.createTraceLink();
            TraceLink link2 = LinkModelFactory.eINSTANCE.createTraceLink();
            accessLayer.addElement(project, link1);
            accessLayer.addElement(project, link2);
           
            link1.setSource(concern1);
            link1.setTarget(concern2);
            link2.setSource(concern2);
            link2.setTarget(concern3);
                
            // create the transitive trace:
            linkManager.addToTrace(project, trace, link1);
            linkManager.addToTrace(project, trace, link2);
           
            assertEquals(1, accessLayer.getElements(project, "Trace").size());
            linkManager.validateTrace(project, trace);
            assertEquals(1, accessLayer.getElements(project, "Trace").size());
           
            // break the transitive relation:
            link2.setSource(null);
            link2.setSource(concern3);
           
            linkManager.validateTrace(project, trace);
            assertEquals(0, accessLayer.getElements(project, "Trace").size());
           
            // now test splitting one trace into 2 traces (first create such a trace):
            TraceLink link3 = LinkModelFactory.eINSTANCE.createTraceLink();
            TraceLink link4 = LinkModelFactory.eINSTANCE.createTraceLink();
            accessLayer.addElement(project, link3);
            accessLayer.addElement(project, link4);       
            accessLayer.addElement(project, trace);
   
            linkManager.addToTrace(project, trace, link1);
            linkManager.addToTrace(project, trace, link2);
            linkManager.addToTrace(project, trace, link3);
            linkManager.addToTrace(project, trace, link4);
           
            link2.setSource(concern2);
           
            Concern concern5 = URNModelFactory.eINSTANCE.createConcern();
            Concern concern6 = URNModelFactory.eINSTANCE.createConcern();
            accessLayer.addElement(project, concern5);
            accessLayer.addElement(project, concern6);
                   
            link3.setSource(concern4);
            link3.setTarget(concern5);
View Full Code Here

      @Override
      public Void call() throws Exception
      {
          project.getContents().clear();
         
            Concern c1 = URNModelFactory.eINSTANCE.createConcern(); // e1
            Concern c2 = URNModelFactory.eINSTANCE.createConcern(); // e2
            accessLayer.addElement(project, c1);
            accessLayer.addElement(project, c2);
           
            c1.setName("42");
            c2.setName("42");
           
            Rule rule = RuleModelFactory.eINSTANCE.createRule();
            accessLayer.addElement(project, rule);
           
            LogicCondition lc1 = RuleModelFactory.eINSTANCE.createLogicCondition();
View Full Code Here

            TraceLink link1 = LinkModelFactory.eINSTANCE.createTraceLink();
            TraceLink link2 = LinkModelFactory.eINSTANCE.createTraceLink();
            accessLayer.addElement(project, link1);
            accessLayer.addElement(project, link2);
                   
            Concern concern1 = URNModelFactory.eINSTANCE.createConcern();
            Concern concern2 = URNModelFactory.eINSTANCE.createConcern();
            Concern concern3 = URNModelFactory.eINSTANCE.createConcern();
            accessLayer.addElement(project, concern1);
            accessLayer.addElement(project, concern2);
            accessLayer.addElement(project, concern3);
           
            // create a transitive relation:       
            link1.setSource(concern1);
            link1.setTarget(concern2);
            link2.setSource(concern2);
            link2.setTarget(concern3);
           
            assertTrue(linkManager.checkForDirectRelationship(link1, link2));
           
            // destroy the transitive relation:
            Concern concern4 = URNModelFactory.eINSTANCE.createConcern();
            accessLayer.addElement(project, concern4);
            link2.setSource(null);
            link2.setSource(concern4);
           
            assertFalse(linkManager.checkForDirectRelationship(link1, link2));
View Full Code Here

TOP

Related Classes of org.emftrace.metamodel.URNModel.Concern

Copyright © 2018 www.massapicom. 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.