Ejemplo n.º 1
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"));
  }
Ejemplo n.º 2
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"));
  }
Ejemplo n.º 3
0
 @Override
 public Packet process(Packet packet) {
   packet.getProperties().put("AAA", "passed");
   return packet;
 }
Ejemplo n.º 4
0
 @Override
 public Packet process(Packet packet) {
   packet.getProperties().put("BBB", "failed");
   return packet;
 }
Ejemplo n.º 5
0
 @Override
 protected boolean checkCondition(Packet packet) {
   return packet.getProperties().containsKey("test");
 }