Пример #1
0
  @Test
  public void testFalseCondition() {
    Properties properties = new Properties();
    Packet packet = Packets.getInstance("111", "xml", "aaaa", properties);

    boolean success = processor.checkCondition(packet);

    Assert.assertTrue(!success);
  }
Пример #2
0
  @Test
  public void testFalseProcessor() {
    Properties properties = new Properties();
    Packet packet = Packets.getInstance("111", "xml", "aaaa", properties);

    processor.process(packet);

    Assert.assertTrue(packet.getProperties().containsKey("BBB"));
    Assert.assertEquals("failed", packet.getProperties().get("BBB"));
  }
Пример #3
0
  @Test
  public void testTrueProcessor() {
    Properties properties = new Properties();
    properties.put("test", "blah blah");
    Packet packet = Packets.getInstance("111", "xml", "aaaa", properties);

    processor.process(packet);

    Assert.assertTrue(packet.getProperties().containsKey("AAA"));
    Assert.assertEquals("passed", packet.getProperties().get("AAA"));
  }