Package fr.imag.adele.apam

Examples of fr.imag.adele.apam.CompositeType


  public void CompositeContentMngtDisputeAmongInjectionAndOwnInstanceIntoComposite_tc048() {

    Implementation sharedDependencyImpl = waitForImplByName(null,
        "BoschSwitch");

    CompositeType compositeAImpl = (CompositeType) waitForImplByName(null,
        "composite-a");

    Composite compositeA = (Composite) compositeAImpl.createInstance(null,
        null);

    apam.waitForIt(Constants.CONST_WAIT_TIME);

    // Instance sharedDependency=sharedDependencyImpl.createInstance(null,
    // null); //works
    Instance sharedDependency = sharedDependencyImpl.createInstance(
        compositeA, null); // do not works

    apam.waitForIt(Constants.CONST_WAIT_TIME);

    S3GroupAImpl s3b = (S3GroupAImpl) compositeA.getMainInst()
        .getServiceObject();
    s3b.getElement();

    System.out.println("Original composite:"
        + sharedDependency.getComposite());

    apam.waitForIt(Constants.CONST_WAIT_TIME);

    CompositeType compositeBImpl = (CompositeType) waitForImplByName(null,
        "composite-a-dispute-inject-own");

    Composite compositeB = (Composite) compositeBImpl.createInstance(null,
        null);

    apam.waitForIt(Constants.CONST_WAIT_TIME);

    System.out.println("Composite after the own composite instantiation:"
View Full Code Here


  }

  @Test
  public void CompositeContentMngtOwnSpecification_tc046() {

    CompositeType cta = (CompositeType) waitForImplByName(null,
        "composite-a-own-specification");

    Composite composite_a = (Composite) cta.createInstance(null, null);

    Implementation device = waitForImplByName(null, "BoschSwitch");
    Instance deviceinst = device.createInstance(null, null);

    String message = "When a composite declares to own a specification, that means every instance of that specification should be owned by that composite. This test failed, the actual owner composite of that component and the one that declares to be the owner are different";
View Full Code Here

  }

  @Test
  public void CompositeContentSimpleReleaseGrantTest_tct014() {
    CompositeType ct = (CompositeType) waitForImplByName(null,
        "Yard_tct013");

    Implementation impl_daystate = waitForImplByName(null, "DayState");
    Implementation impl_jackhammer = waitForImplByName(null,
        "JackHammer_singleton");
    Implementation impl_worker = waitForImplByName(null, "Worker_waiting");
    Implementation impl_toolmanager = waitForImplByName(null, "ToolManager");

    Composite yard = (Composite) ct.createInstance(null, null);
    impl_jackhammer.createInstance(null, null);

    Worker worker1 = (Worker) impl_worker.createInstance(yard, null)
        .getServiceObject();
View Full Code Here

    final String messageTemplate = "Two composites A and B, each of them have their own mainimpl as IA and IB. "
        + "Both IA and IB have an attribute that depends on the specification X. "
        + "If an X instance is created into A and this instance is marked as local, this instance cannot be used by other composite. %s";

    CompositeType cta = (CompositeType) waitForImplByName(null,
        "composite-a-local-implementation",200000);

    CompositeType ctb = (CompositeType) waitForImplByName(null,
        "composite-b");

    Composite composite_a = (Composite) cta.createInstance(null, null);
    Composite composite_b = (Composite) ctb.createInstance(null, null);

    Instance a = composite_a.getMainInst();

    Instance b = composite_b.getMainInst();
View Full Code Here

    final String messageTemplate = "Two composites A and B, each of them have their own mainimpl as IA and IB. "
        + "Both IA and IB have an attribute that depends on the specification X. "
        + "If an X instance is created into A and this instance is marked as local, this instance cannot be used by other composite. %s";

    CompositeType cta = (CompositeType) waitForImplByName(null,
        "composite-a-local-instance");

    CompositeType ctb = (CompositeType) waitForImplByName(null,
        "composite-b");

    Composite composite_a = (Composite) cta.createInstance(null, null);
    Composite composite_b = (Composite) ctb.createInstance(null, null);

    Instance a = composite_a.getMainInst();
    Instance b = composite_b.getMainInst();

    S3GroupAImpl ga = (S3GroupAImpl) a.getServiceObject();
View Full Code Here

  @Test
  public void ComponentMngtMainCompositeAccessItsPrivateImpls_tc118() {

    final String messageTemplate = "Composite A declares <export implementation='false' /> and its main implem depends on this implementation. %s";

    CompositeType cta = (CompositeType) waitForImplByName(null,
        "composite-a-local-implementation");

    Composite composite_a = (Composite) cta.createInstance(null, null);

    Implementation dependencyOfA = waitForImplByName(null, "BoschSwitch");
    CompositeType rootComposite = (CompositeType) waitForImplByName(null,
        CST.ROOT_COMPOSITE_TYPE);

    /**
     * Make sure that the dependency is in the same composite as group-a
     */
 
View Full Code Here

  @Test
  public void ComponentMngtNoMainLocalInstance_tc120() {

    final String messageTemplate = "Two composites A and B,  both without mainimpl, B depends on instances inside A, but A is marked as '<export instance='false' />'. %s";

    CompositeType cta = (CompositeType) waitForImplByName(null,
        "composite-a-local-instance-nomain");

    Composite composite_a = (Composite) cta.createInstance(null, null);

    Implementation groupAImpl = waitForImplByName(null, "group-a");
    Implementation groupBImpl = waitForImplByName(null, "group-b");

    Instance groupAInstance = groupAImpl.createInstance(composite_a,
View Full Code Here

  }

  @Test
  public void CompositeContentMngtExportApplicationEverythingGlobalNothingInstance_tc038() {

    CompositeType appCompositeType = (CompositeType) waitForImplByName(
        null, "composite-a");

    Composite appComposite = (Composite) appCompositeType.createInstance(
        null, null);

    CompositeType cta = (CompositeType) waitForImplByName(null,
        "composite-a-export-application-everything-global-nothing");

    CompositeType ctb = (CompositeType) waitForImplByName(null,
        "composite-b");

    Implementation ia = waitForImplByName(null, "group-a");

    Composite composite_a = (Composite) cta.createInstance(appComposite,
        null);
    Composite composite_b = (Composite) ctb.createInstance(appComposite,
        null);

    Instance instanceApp1 = ia.createInstance(composite_a, null);

    Instance instanceApp2 = ia.createInstance(composite_b, null);
View Full Code Here

  }

  @Test
  public void CompositeContentMngtExportApplicationNothingGlobalEverythingInstance_tc048() {

    CompositeType appCompositeType = (CompositeType) waitForImplByName(
        null, "composite-a");

    Composite superparent = (Composite) appCompositeType.createInstance(
        null, null);

    Composite appCompositeA = (Composite) appCompositeType.createInstance(
        superparent, null);

    CompositeType appCompositeTypeC = (CompositeType) waitForImplByName(
        null, "composite-c");

    Composite appCompositeC = (Composite) appCompositeTypeC.createInstance(
        superparent, null);

    CompositeType cta = (CompositeType) waitForImplByName(null,
        "composite-a-export-application-nothing-global-everything");

    CompositeType ctb = (CompositeType) waitForImplByName(null,
        "composite-b");

    Implementation ia = waitForImplByName(null, "group-a");

    Composite composite_a = (Composite) cta.createInstance(appCompositeA,
        null);
    Composite composite_b = (Composite) ctb.createInstance(appCompositeC,
        null);

    Instance instanceApp1 = ia.createInstance(composite_a, null);

    Instance instanceApp2 = ia.createInstance(composite_b, null);
View Full Code Here

  }

  @Test
  public void CompositeContentMngtExportApplicationNothingGlobalEverythingInstance_tc049() {

    CompositeType cta = (CompositeType) waitForImplByName(null,
        "composite-a-export-application-nothing-global-everything");

    CompositeType ctb = (CompositeType) waitForImplByName(null,
        "composite-b");

    Implementation ia = waitForImplByName(null, "group-a");

    Composite composite_a = (Composite) cta.createInstance(null, null);
    Composite composite_b = (Composite) ctb.createInstance(null, null);

    Instance instanceApp1 = ia.createInstance(composite_a, null);

    Instance instanceApp2 = ia.createInstance(composite_b, null);
View Full Code Here

TOP

Related Classes of fr.imag.adele.apam.CompositeType

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.