Package fr.imag.adele.apam

Examples of fr.imag.adele.apam.Composite


    "composite-a-fail-exception");

  CompositeType cta = (CompositeType) waitForImplByName(null,
    "composite-a-fail-exception");

  Composite composite_root = (Composite) ctroot
    .createInstance(null, null);

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

  Instance instanceApp1 = composite_a.getMainInst();

  S3GroupAImpl ga1 = (S3GroupAImpl) instanceApp1.getServiceObject();

  String messageTemplate = "In contentMngt->dependency if we adopt fail='exception' exception='A', the exception A should be throw in case the dependency is not satifiable. %s";
View Full Code Here


    public void CompositeContentMngtDependencyFailWait_tc039() {

  CompositeType cta = (CompositeType) waitForImplByName(null,
    "composite-a-fail-wait");

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

  Instance instanceApp1 = composite_a.getMainInst();

  S3GroupAImpl ga1 = (S3GroupAImpl) instanceApp1.getServiceObject();

  ThreadWrapper wrapper = new ThreadWrapper(ga1);
  wrapper.setDaemon(true);
View Full Code Here

        relToResolve.getMngImplementationConstraints().add("(!(name = " + resolved.toInstantiate.getName() + "))") ;
        ((RelToResolveImpl)relToResolve).computeFilters();
        return resolveOneManager(manager, relToResolve, mess);
      }

      Composite compo = (source instanceof Instance) ? ((Instance) source).getComposite() : CompositeImpl.getRootInstance();
      Instance inst = resolved.toInstantiate.createInstance(compo, null);
      if (inst == null) {
        /*
         *  Failed to be instantiated.
         *  Flag instantiateFails is turned to "true" in createInstance.
View Full Code Here

  public void CompositeContentMngtDependencyHide_tc065() {

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

    Composite composite_root = (Composite) ctaroot.createInstance(null,
        null);// composite_root

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

    Composite composite_a = (Composite) cta.createInstance(composite_root,
        null);// inner composite with hide='true'

    Instance instanceApp1 = composite_a.getMainInst();

    S3GroupAImpl ga1 = (S3GroupAImpl) instanceApp1.getServiceObject();
    // force injection
    ga1.getElement();
View Full Code Here

    String checkingFor = "implementation";

    CompositeType composite = (CompositeType) waitForImplByName(null,
        "composite-a-start-by-" + checkingFor);
    Composite compositeInstance = (Composite) composite.createInstance(
        null, null);

    apam.waitForIt(Constants.CONST_WAIT_TIME);

    Implementation trigger = waitForImplByName(null,
View Full Code Here

    String checkingFor = "specification";

    CompositeType composite = (CompositeType) waitForImplByName(null,
        "composite-a-start-by-" + checkingFor);
    Composite compositeInstance = (Composite) composite.createInstance(
        null, null);

    apam.waitForIt(Constants.CONST_WAIT_TIME);

    Implementation trigger = waitForImplByName(null,
View Full Code Here

        "Although, the test failed to retrieve the composite"),
        ct1 != null);

    auxListInstances("instances existing before the test-");

    Composite instanceComposite = (Composite) ct1.createInstance(null,new HashMap<String, String>());

    InstanceImpl mainInstance = (InstanceImpl) instanceComposite
        .getMainInst();

    Assert.assertTrue(String.format(message,
        "Although, the test failed to instantiate the composite"),
        instanceComposite != null && mainInstance != null);
View Full Code Here

        "Although, the test failed to retrieve the composite"),
        ct1 != null);

    auxListInstances("instances existing before the test-");

    Composite instanceComposite = (Composite) ct1.createInstance(null,
        new HashMap<String, String>());

    InstanceImpl mainInstance = (InstanceImpl) instanceComposite
        .getMainInst();

    Assert.assertTrue(String.format(message,
        "Although, the test failed to instantiate the composite"),
        instanceComposite != null && mainInstance != null);
View Full Code Here

  Implementation subjectCimpl = waitForImplByName(null, "subject-c");

  CompositeType subjectCCompositeType = (CompositeType) waitForImplByName(
    null, "subject-c-composite");
  Composite subjectCComposite = (Composite) subjectCCompositeType
    .createInstance(null, Collections.<String, String> emptyMap());

  // Instance of the subject-a (parent)
  Instance subjectC = subjectCimpl
    .createInstance(subjectCComposite, null);

  auxListProperties("\t", subjectC);

  System.err.println(subjectC.getProperty("property-case-15"));

  Assert.assertTrue(
    String.format(
      "Using metasubstituion to retrieve the name of the composite in which a given component is in did not fetch the right composite (%s)",
      subjectC.getProperty("property-case-15")),
    subjectC.getProperty("property-case-15").equals(
      subjectCComposite.getProperty("name")));

    }
View Full Code Here

    @Test
    public void SubstitutionReachingMultipleNodesWithKeywordComposite_tc127() {

  CompositeType subjectECompositeType = (CompositeType) waitForImplByName(
    null, "subject-e-composite");
  Composite subjectEComposite = (Composite) subjectECompositeType
    .createInstance(null, Collections.<String, String> emptyMap());

  Implementation implementationAlpha = waitForImplByName(null,
    "impl-case-17");
  Instance instanceEcho = implementationAlpha.createInstance(
    subjectEComposite, null);

  Implementation subjectCimpl = waitForImplByName(null, "subject-e");

  // Instance of the subject-a (parent)
  Instance subjectE = subjectCimpl.createInstance(null, null);
  S6Impl s6 = (S6Impl) subjectE.getServiceObject();

  // Force injection
  s6.getS6();

  auxListProperties("\t", subjectE);

  String parentProperty = subjectE
    .getProperty("property-case-17-parent-composite");
  String dependencyProperty = subjectE
    .getProperty("property-case-17-dep-composite");
  System.out.println("parentProperty -->" + parentProperty
    + " | subjectEComposite.getName() -->"
    + subjectE.getComposite().getName());

  String template = "Using metasubstitution, with components in different composites , %s";

  Assert.assertTrue(
    String.format(template,
      "although the dependency do not correspond to the correct one"),
    dependencyProperty.equals(subjectEComposite.getName()));

  Assert.assertTrue(String.format(template,
    "although the parent do not correspond the correct one"),
    parentProperty.equals(subjectE.getComposite().getName()));
View Full Code Here

TOP

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

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.