コード例 #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"));
  }
コード例 #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"));
  }
コード例 #3
0
 @Override
 public Packet process(Packet packet) {
   packet.getProperties().put("AAA", "passed");
   return packet;
 }
コード例 #4
0
 @Override
 public Packet process(Packet packet) {
   packet.getProperties().put("BBB", "failed");
   return packet;
 }
コード例 #5
0
 @Override
 protected boolean checkCondition(Packet packet) {
   return packet.getProperties().containsKey("test");
 }