Package org.emftrace.metamodel.URNModel

Examples of org.emftrace.metamodel.URNModel.Actor


      {
      @Override
      public Void call() throws Exception
      {
            TraceLink link = LinkModelFactory.eINSTANCE.createTraceLink();
            Actor actor = URNModelFactory.eINSTANCE.createActor();
           
            actor.setId("123");
           
            link.setSource(actor);
   
            assertEquals("Result", "123", accessLayer.getAttributeValue(link.getSource(), "Id"));
            actor.setId("1234");
            assertEquals("Result", "1234", accessLayer.getAttributeValue(link.getSource(), "Id"));
            assertNull(accessLayer.getAttributeValue(null, (String)null, (String)null));
            assertNull(accessLayer.getAttributeValue(link.getSource(), (String)null, (String)null));
            assertNull(accessLayer.getAttributeValue(link.getSource(), (String)null, "Id"));
            assertNull(accessLayer.getAttributeValue(link.getSource(), (String)null));
View Full Code Here


      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);
           
            LogicCondition cnd1 = RuleModelFactory.eINSTANCE.createLogicCondition();
View Full Code Here

      Callable<Void> call = new Callable<Void>()
      {
      @Override
      public Void call() throws Exception
      {
          Actor a1 = URNModelFactory.eINSTANCE.createActor();
          Actor a2 = URNModelFactory.eINSTANCE.createActor();
          AtomicChangeType c = ChangeModelFactory.eINSTANCE.createAtomicChangeType();
         
          List<EObject> l1 = new ArrayList<EObject>();
          List<EObject> l2 = new ArrayList<EObject>();
          l1.add(a1);
View Full Code Here

      Callable<Void> call = new Callable<Void>()
      {
      @Override
      public Void call() throws Exception
      {
          Actor a = URNModelFactory.eINSTANCE.createActor();
          ViolationType t = ReportModelFactory.eINSTANCE.createViolationType();
         
          // test the negative cases:
          assertEquals(0, accessLayer.getElements(project, "ConsistenceReport").size());
          reportManager.createConsistenceReport(null, null, null, null, null, null);
View Full Code Here

      @Override
      public Void call() throws Exception
      {
          ReportContainer container = ReportModelFactory.eINSTANCE.createReportContainer();
          ImpactReport r = ReportModelFactory.eINSTANCE.createImpactReport();
          Actor a1 = URNModelFactory.eINSTANCE.createActor();
          Actor a2 = URNModelFactory.eINSTANCE.createActor();
          AtomicChangeType c = ChangeModelFactory.eINSTANCE.createAtomicChangeType();
          LinkType t = LinkModelFactory.eINSTANCE.createLinkType();
         
          List<EObject> l1 = new ArrayList<EObject>();
          List<EObject> l2 = new ArrayList<EObject>();
          l1.add(a1);
          l2.add(a2);
         
          t.setName("TestRelation");
          c.setType(AtomicType.ADD);
          r.getImpactSources().add(a1);
          r.getAffectedElements().add(a2);
          r.setChangeType(c);
          r.setType(ReportType.IMPACT);
          container.getReports().add(r);
         
          accessLayer.addElement(project, container);
         
          assertFalse(reportManager.checkIfImpactReportAlreadyExists(null, null, null, null));
          assertFalse(reportManager.checkIfImpactReportAlreadyExists(project, null, null, null));
          assertFalse(reportManager.checkIfImpactReportAlreadyExists(null, l1, null, null));
          assertFalse(reportManager.checkIfImpactReportAlreadyExists(null, null, l2, null));
          assertFalse(reportManager.checkIfImpactReportAlreadyExists(null, null, null, c));
          assertFalse(reportManager.checkIfImpactReportAlreadyExists(null, null, null, null));
          // ... continue this ...
         
          Actor a3 = URNModelFactory.eINSTANCE.createActor();
          r.getImpactSources().clear();
          r.getImpactSources().add(a3);
          assertFalse(reportManager.checkIfImpactReportAlreadyExists(project, l1, l2, c));
          r.getImpactSources().clear();
          r.getImpactSources().add(a1);
View Full Code Here

      @Override
      public Void call() throws Exception
      {
          ReportContainer container = ReportModelFactory.eINSTANCE.createReportContainer();
          ConsistenceReport r = ReportModelFactory.eINSTANCE.createConsistenceReport();
          Actor a = URNModelFactory.eINSTANCE.createActor();
          ViolationType t = ReportModelFactory.eINSTANCE.createViolationType();
         
          t.setName("TestViolationType");
          r.setTypeOfViolation(t);
          r.setType(ReportType.VIOLATION);
          r.setElement(a);
         
          container.getReports().add(r);
          accessLayer.addElement(project, container);
              
          assertFalse(reportManager.checkIfConsistenceReportAlreadyExists(null, null, null));
          assertFalse(reportManager.checkIfConsistenceReportAlreadyExists(project, null, null));
          assertFalse(reportManager.checkIfConsistenceReportAlreadyExists(project, a, null));
          assertFalse(reportManager.checkIfConsistenceReportAlreadyExists(null, a, t));
          assertFalse(reportManager.checkIfConsistenceReportAlreadyExists(project, null, t));
          assertFalse(reportManager.checkIfConsistenceReportAlreadyExists(project, a, null));
          assertFalse(reportManager.checkIfConsistenceReportAlreadyExists(null, null, t));
          assertFalse(reportManager.checkIfConsistenceReportAlreadyExists(null, a, null));
         
          Actor a2 = URNModelFactory.eINSTANCE.createActor();
          assertFalse(reportManager.checkIfConsistenceReportAlreadyExists(project, a2, t));
         
          r.setType(ReportType.IMPACT);
          assertFalse(reportManager.checkIfConsistenceReportAlreadyExists(project, a, t));
         
View Full Code Here

      Callable<Void> call = new Callable<Void>()
      {
      @Override
      public Void call() throws Exception
      {
        Actor actor = URNModelFactory.eINSTANCE.createActor();
        project.getContents().add(actor);
       
        // test case "project not yet registered:
        assertNull(cache.get(project, "Actor"));
       
        // test case "model not yet stored in cache":
        cache.addProject(project);
        assertNull(cache.get(project, "Actor"));
       
        // test case "model is stored in cache":
        cache.insert(project, actor);
        assertNotNull(cache.get(project, "Actor"));
        assertEquals(actor, cache.get(project, "Actor").get(0));
       
        // add another model of same type:
        Actor actor2 = URNModelFactory.eINSTANCE.createActor();
        project.getContents().add(actor2);
        cache.insert(project, actor2);
        assertEquals(2, cache.get(project, "Actor").size());
       
        // add a model of a different class to the cache:
View Full Code Here

      Callable<Void> call = new Callable<Void>()
      {
      @Override
      public Void call() throws Exception
      {
        Actor actor1 = URNModelFactory.eINSTANCE.createActor();
        project.getContents().add(actor1);
        Actor actor2 = URNModelFactory.eINSTANCE.createActor();
        project.getContents().add(actor2);
       
        assertNull(cache.get(project, "Actor"));
        cache.insert(project, actor1);
        assertEquals(1, cache.get(project, "Actor").size());
View Full Code Here

      Callable<Void> call = new Callable<Void>()
      {
      @Override
      public Void call() throws Exception
      {
        Actor actor = URNModelFactory.eINSTANCE.createActor();
        project.getContents().add(actor);
        cache.insert(project, actor);
       
        cache.remove(null, actor);
        assertEquals(actor, cache.get(project, "Actor").get(0));
View Full Code Here

      Callable<Void> call = new Callable<Void>()
      {
      @Override
      public Void call() throws Exception
      {
        Actor actor = URNModelFactory.eINSTANCE.createActor();
        project.getContents().add(actor);
        cache.insert(project, actor);
       
        cache.remove(null, actor);
        assertEquals(actor, cache.get(project, "Actor").get(0));
View Full Code Here

TOP

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

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.