Package org.mokai.action

Examples of org.mokai.action.AddPrefixAction.execute()


    action.setPrefix("57");

    Message message = new Message();
    message.setProperty("to", "11");

    action.execute(message);

    Assert.assertEquals(message.getProperty("to", String.class), "5711");
  }

  @Test
View Full Code Here


    action.setField("to");
    action.setPrefix("57");

    Message message = new Message();

    action.execute(message);

    Assert.assertEquals(message.getProperty("to", String.class), "57");

  }
View Full Code Here

    action.setPrefix("57");

    Message message = new Message();
    message.setProperty("to", "5711");

    action.execute(message);

    Assert.assertEquals(message.getProperty("to", String.class), "5711");

  }
View Full Code Here

  @Test(expectedExceptions=IllegalArgumentException.class)
  public void shouldFailIfPrefixNotSet() throws Exception {
    AddPrefixAction action = new AddPrefixAction();
    action.setField("to");

    action.execute(new Message());
  }

  @Test(expectedExceptions=IllegalArgumentException.class)
  public void shouldFailIfFieldNotSet() throws Exception {
    AddPrefixAction action = new AddPrefixAction();
View Full Code Here

  @Test(expectedExceptions=IllegalArgumentException.class)
  public void shouldFailIfFieldNotSet() throws Exception {
    AddPrefixAction action = new AddPrefixAction();
    action.setPrefix("57");

    action.execute(new Message());
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.