Package fr.imag.adele.apam.pax.test.av.spec

Examples of fr.imag.adele.apam.pax.test.av.spec.MediaControlPoint


        "AVEntertainment-Controller");
    Assert.assertNotNull(
        "Composite AVEntertainment-00 should contains an instance named AVEntertainment-Controller (started by the composite)",
        instCtl);

    MediaControlPoint mediaCtl = (MediaControlPoint) instCtl
        .getServiceObject();
    Assert.assertEquals(
        "Two media RENDERERS should be resolved (internal to composite)",
        mediaCtl.resolveRenderersNumber(), 2);
    mediaCtl.resolveServersNumber();
    for (Link link : instCtl.getLinks("theServers")) {
      System.out.println("AVEntertainment-Controller links --> "
          + link.getDestination().getName());
    }

    for (Link link : instAV00.getLinks("promotedServers")) {
      System.out.println("Promoted Server --> "
          + link.getDestination().getName());
    }

    Assert.assertEquals(
        "Two media SERVERS should be resolved (one internal (with constraints) and one external using promoted relation (with same constraints)",
        mediaCtl.resolveServersNumber(), 2);
  }
View Full Code Here


        "AVEntertainment-Controller");
    Assert.assertNotNull(
        "Composite AVEntertainment-01 should contains an instance named AVEntertainment-Controller (started by the composite)",
        instCtl);

    MediaControlPoint mediaCtl = (MediaControlPoint) instCtl
        .getServiceObject();
    mediaCtl.resolveServersNumber();

    Assert.assertEquals(
        "Two media renderers should be resolved (internal to composite)",
        mediaCtl.resolveRenderersNumber(), 2);
    mediaCtl.resolveServersNumber();
    for (Link link : instCtl.getLinks("theServers")) {
      System.out.println("AVEntertainment-Controller links --> "
          + link.getDestination().getName());
    }

    Assert.assertEquals(
        "Two media server should be resolved (one internal (without constraints) and one external using promoted relation (with same constraints)",
        mediaCtl.resolveServersNumber(), 2);
  }
View Full Code Here

        "AVEntertainment-Controller");
    Assert.assertNotNull(
        "Composite AVEntertainment-02 should contains an instance named AVEntertainment-Controller (start by the composite)",
        instCtl);

    MediaControlPoint mediaCtl = (MediaControlPoint) instCtl
        .getServiceObject();

    mediaCtl.resolveServersNumber();

    for (Link link : instAV02.getLinks("promotedServers")) {
      System.out.println("Promoted Server --> "
          + link.getDestination().getName());
    }

    for (Link link : instCtl.getLinks("theServers")) {
      System.out.println("AVEntertainment-Controller links --> "
          + link.getDestination().getName());
      if (!link.isPromotion()) {
        Assert.fail("Found a link for whose destination is NOT a promotion");
      }
    }

    Assert.assertEquals(
        "Two media renderers should be resolved (internal to composite)",
        2, mediaCtl.resolveRenderersNumber());
    Assert.assertEquals(
        "Only one media server should be resolved (external, using promoted relation only",
        1, mediaCtl.resolveServersNumber());

    Assert.assertTrue(
        "One remote controller should be resolved (external, in root composite)",
        mediaCtl.resolveRemoteControl());
    //
    // for (Instance inst : instAV01.getContainInsts())
    // System.out.println("--> " + inst.getName());

  }
View Full Code Here

        "AVEntertainment-Controller");
    Assert.assertNotNull(
        "Composite AVEntertainment-03 should contains an instance named AVEntertainment-Controller (start by the composite)",
        instCtl);

    MediaControlPoint mediaCtl = (MediaControlPoint) instCtl
        .getServiceObject();
    mediaCtl.resolveServersNumber();

    for (Link link : instAV02.getLinks("promotedServers")) {
      System.out.println("Promoted Server --> "
          + link.getDestination().getName());
    }

    for (Link link : instCtl.getLinks("theServers")) {
      System.out.println("AVEntertainment-Controller links --> "
          + link.getDestination().getName());
      if (!link.isPromotion()) {
        Assert.fail("Found a link for whose destination is NOT a promotion");
      }
    }

    Assert.assertEquals(
        "Two media renderers should be resolved (internal to composite)",
        mediaCtl.resolveRenderersNumber(), 2);
    Assert.assertEquals(
        "Only one media server should be resolved (external, using promoted relation only",
        mediaCtl.resolveServersNumber(), 1);
    Assert.assertTrue(
        "One remote controller should be resolved (external, in root composite)",
        mediaCtl.resolveRemoteControl());
    //
    // for (Instance inst : instAV01.getContainInsts())
    // System.out.println("--> " + inst.getName());

  }
View Full Code Here

        "AVEntertainment-Controller");
    Assert.assertNotNull(
        "Composite AVEntertainment-02 should contains an instance named AVEntertainment-Controller (start by the composite)",
        instCtl);

    MediaControlPoint mediaCtl = (MediaControlPoint) instCtl
        .getServiceObject();
    mediaCtl.resolveRemoteControl();

    for (Link link : instAV02.getLinks("promotedRemoteControl")) {
      System.out.println("Promoted remote control --> "
          + link.getDestination().getName());
    }

    for (Link link : instCtl.getLinks("theServers")) {
      System.out.println("AVEntertainment-Controller links --> "
          + link.getDestination().getName());
      if (!link.isPromotion()) {
        Assert.fail("Found a link for whose destination is NOT a promotion");
      }
    }

    Assert.assertTrue(
        "One remote controller should be resolved (external, in root composite)",
        mediaCtl.resolveRemoteControl());
    //
    // for (Instance inst : instAV01.getContainInsts())
    // System.out.println("--> " + inst.getName());

  }
View Full Code Here

        "AVEntertainment-Controller");
    Assert.assertNotNull(
        "Composite AVEntertainment-03 should contains an instance named AVEntertainment-Controller (start by the composite)",
        instCtl);

    MediaControlPoint mediaCtl = (MediaControlPoint) instCtl
        .getServiceObject();
    mediaCtl.resolveRemoteControl();

    auxListInstances();

    for (Link link : instAV02.getLinks("promotedRemoteControl")) {
      System.out.println("Promoted remote control --> "
          + link.getDestination().getName());
    }

    for (Link link : instCtl.getLinks("theServers")) {
      System.out.println("AVEntertainment-Controller links --> "
          + link.getDestination().getName());
      if (!link.isPromotion()) {
        Assert.fail("Found a link for whose destination is NOT a promotion");
      }
    }

    Assert.assertTrue(
        "One remote controller should be resolved (external, in root composite)",
        mediaCtl.resolveRemoteControl());
    //
    // for (Instance inst : instAV01.getContainInsts())
    // System.out.println("--> " + inst.getName());

  }
View Full Code Here

TOP

Related Classes of fr.imag.adele.apam.pax.test.av.spec.MediaControlPoint

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.