Package fr.imag.adele.apam.pax.test.implS3

Examples of fr.imag.adele.apam.pax.test.implS3.S3GroupAImpl


    Instance groupBInstance = groupBImpl.createInstance(null,
        Collections.<String, String> emptyMap());

    S3GroupAImpl ga = (S3GroupAImpl) groupAInstance.getServiceObject();

    S3GroupBImpl gb = (S3GroupBImpl) groupBInstance.getServiceObject();

    // Force instantiation one given specification inside the composite A
    System.out.println("A-->" + ga.getElement());

    // Force instantiation of the same specification as before in composite
    // B
    System.out.println("B-->" + gb.getElement());

    auxListInstances("---");

    String message = String
        .format(messageTemplate,
            "B should have created a new instance, since he has access to the implementation but not the instances of A");

    Assert.assertTrue(message, ga.getElement() != gb.getElement());

  }
View Full Code Here


    Instance b = composite_b.getMainInst();

    S3GroupAImpl ga = (S3GroupAImpl) a.getServiceObject();

    S3GroupBImpl gb = (S3GroupBImpl) b.getServiceObject();

    System.out.println("Element B injected: " + gb.getElement());

    auxListInstances("bbbbbbbbbbbbbbbbbbbbbbbb");

    System.out.println("Element A injected: " + ga.getElement());

    auxListInstances("aaaaaaaaaaaaaaaaaaaaaaaa");

    String messageTemplate = "Composite that do not allow anything to be imported (<import implementation='false' />) should never import other composite instance. %s";

    String message = String
        .format(messageTemplate,
            "Although, an instance from composite B was injected in composite A even if A is marked with <import implementation='false' />");
    // The fact the implem is not visible does not mean we cannot resolve :
    // it can be deployed again,
    // and it is possible to see its instances anyway !.
    Assert.assertTrue(message, ga.getElement() == gb.getElement());

  }
View Full Code Here

    Instance b = composite_b.getMainInst();

    S3GroupAImpl ga = (S3GroupAImpl) a.getServiceObject();

    S3GroupBImpl gb = (S3GroupBImpl) b.getServiceObject();

    gb.getElement();

    auxListInstances("bbbbbbbbbbbbbbbbbbbbbbbb");

    ga.getElement();

    auxListInstances("aaaaaaaaaaaaaaaaaaaaaaaa");

    String messageTemplate = "Composite that do not allow anything to be imported (<import instance='false' />) should never use other composite instance. %s";

    String message = String
        .format(messageTemplate,
            "Although, an instance from composite B was injected in composite A even if A is marked with import instance='false'");

    Assert.assertTrue(message, ga.getElement() != gb.getElement());

  }
View Full Code Here

TOP

Related Classes of fr.imag.adele.apam.pax.test.implS3.S3GroupAImpl

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.