Package fr.imag.adele.apam.pax.test.iface.device

Examples of fr.imag.adele.apam.pax.test.iface.device.Eletronic


  boolean exception = false;
  boolean exceptionType = false;

  try {

      Eletronic injected = ga1.getElement();
      System.out.println("Element:" + injected);

  } catch (Exception e) {
      exception = true;
View Full Code Here


  boolean exception = false;
  boolean exceptionType = false;

  try {

      Eletronic injected = ga1.getElement();
      System.out.println("Element:" + injected);

  } catch (Exception e) {
      exception = true;
View Full Code Here

  boolean exceptionType = false;

  try {

      Eletronic injected = ga1.getElement();
      System.out.println("Element:" + injected);

  } catch (Exception e) {

      System.err
View Full Code Here

  apam.waitForIt(Constants.CONST_WAIT_TIME);

  S1Impl s1 = (S1Impl) s1Inst.getServiceObject();

  Eletronic samsungSwitch = (Eletronic) samsungInst.getServiceObject();
  Eletronic lgSwitch = (Eletronic) lgInst.getServiceObject();
  Eletronic siemensSwitch = (Eletronic) siemensInst.getServiceObject();

  System.out.println("Instances after injection request");
  auxListInstances("\t");

  Instance injectedInstance = CST.componentBroker.getInstService(s1
View Full Code Here

  // apam.waitForIt(Constants.CONST_WAIT_TIME);

  S1Impl s1 = (S1Impl) s1Inst.getServiceObject();

  Eletronic samsungSwitch = (Eletronic) samsungInst.getServiceObject();
  Eletronic philipsSwitch = (Eletronic) philipsInst.getServiceObject();
  Eletronic lgSwitch = (Eletronic) lgInst.getServiceObject();
  Eletronic siemensSwitch = (Eletronic) siemensInst.getServiceObject();

  System.out.println("Instances after injection request");
  auxListInstances("\t");

  Instance injectedInstance = CST.componentBroker.getInstService(s1
View Full Code Here

  apam.waitForIt(Constants.CONST_WAIT_TIME);

  S1Impl s1 = (S1Impl) s1Inst.getServiceObject();

  Eletronic samsungSwitch = (Eletronic) samsungInst.getServiceObject();
  Eletronic samsungSwitch2 = (Eletronic) samsungInst2.getServiceObject();
  Eletronic lgSwitch = (Eletronic) lgInst.getServiceObject();
  Eletronic siemensSwitch = (Eletronic) siemensInst.getServiceObject();

  System.out.println("Instances after injection request");
  auxListInstances("\t");

  Instance injectedInstance = CST.componentBroker.getInstService(s1
View Full Code Here

  // apam.waitForIt(Constants.CONST_WAIT_TIME);

  S1Impl s1 = (S1Impl) s1Inst.getServiceObject();

  Eletronic lgSwitch = (Eletronic) lgInst.getServiceObject();

  System.out
    .println("Instances after FIRST injection request (preference cannot be resolved)");
  auxListInstances("\t");

  Instance injectedInstance = CST.componentBroker.getInstService(s1
    .getDevicePreference110v());

  System.out.println("Injected:" + injectedInstance);

  Assert.assertTrue(
    String.format(
      "The instance injected cannot be the prefered one (currentVoltage=500), since there exist no instance in which the preference is valid."
        + " The instance %s (currentVoltage:%s) was injected instead of %s (currentVoltage:%s)",
      injectedInstance.getName(), injectedInstance
        .getAllProperties().get("currentVoltage"),
      lgInst.getName(),
      lgInst.getAllProperties().get("currentVoltage")), s1
      .getDevicePreference110v() == lgSwitch);

  Implementation samsungImpl = waitForImplByName(null, "SamsungSwitch");
  final Instance samsungInst = samsungImpl.createInstance(null,
    new HashMap<String, String>() {
        {
      put("currentVoltage", "500");
        }
    });
  Eletronic samsungSwitch = (Eletronic) samsungInst.getServiceObject();
  Instance injectedInstance2 = CST.componentBroker.getInstService(s1
    .getDevicePreference110v());

  System.out.println("Injected (new resolution) :" + injectedInstance);
  Assert.assertTrue(
View Full Code Here

TOP

Related Classes of fr.imag.adele.apam.pax.test.iface.device.Eletronic

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.