コード例 #1
0
  @Test
  public void receiverGroupRemovedTest() {
    cli = new CommandLineView();
    assertTrue(cli != null);

    c = Controller.getController();
    String initString[] = {"-nogui"};
    c.init(initString);
    assertTrue(c != null);

    cli.init(c);

    Map<String, String> prop = new HashMap<String, String>();

    prop.put("group", "224.0.0.1");
    prop.put("port", "12345");
    prop.put("ninf", "127.0.0.1");
    prop.put("abeh", "Default");

    ReceiverGroup obj = c.addReceiverGroup(prop);
    Collection<ReceiverGroup> coll = new ArrayList<ReceiverGroup>();
    coll.add(obj);

    c.removeStreams(coll);
  }
コード例 #2
0
  @Test
  public void senderRemovedTest() {
    cli = new CommandLineView();
    assertTrue(cli != null);

    c = Controller.getController();
    String initString[] = {"-nogui"};
    c.init(initString);
    assertTrue(c != null);

    cli.init(c);

    Map<String, String> prop = new HashMap<String, String>();

    prop.put("group", "224.0.0.1");
    prop.put("port", "12345");
    prop.put("ninf", "127.0.0.1");
    prop.put("abeh", "Default");
    prop.put("ptype", "spam");
    prop.put("payload", "Default");
    prop.put("psize", "32");
    prop.put("pps", "10");
    prop.put("ttl", "32");

    Sender obj = c.addSender(prop);

    Collection<Sender> coll = new ArrayList<Sender>();
    coll.add(obj);

    c.removeStreams(coll);
  }