コード例 #1
0
  @Test
  public void senderAddedTest() {
    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");

    c.addSender(prop);
  }
コード例 #2
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);
  }
コード例 #3
0
  @Test
  public void initTest() {
    cli = new CommandLineView();
    assertTrue(cli != null);

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

    cli.init(c);
  }
コード例 #4
0
  @Test
  public void profileCangedTest() {
    cli = new CommandLineView();
    assertTrue(cli != null);

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

    cli.init(c);
    c.setCurrentProfile(null);
  }
コード例 #5
0
  @Test
  public void receiverGroupAddedTest() {
    cli = new CommandLineView();
    assertTrue(cli != null);

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

    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");

    cli.init(c);

    c.addReceiverGroup(prop);
  }
コード例 #6
0
  @Test
  public void newErrorEventTest() {
    cli = new CommandLineView();
    assertTrue(cli != null);

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

    cli.init(c);

    ErrorEvent err = new ErrorEvent();
    err.setErrorLevel(ErrorEventManager.ERROR);
    err.setAdditionalErrorMessage("Test Error");

    c.reportErrorEvent(err);

    err.setErrorLevel(ErrorEventManager.WARNING);
    err.setAdditionalErrorMessage("Test Warning");

    c.reportErrorEvent(err);
  }