Package org.mokai.action

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


    action.setLength(160);

    Message message = new Message();
    message.setProperty("message", "a");

    action.execute(message);

    Assert.assertEquals(message.getProperty("message", String.class).length(), 160);

    String compare = "a";
    for (int i=0; i < 159; i++) {
View Full Code Here


    action.setField("message");
    action.setLength(160);

    Message message = new Message();

    action.execute(message);

    Assert.assertEquals(message.getProperty("message", String.class).length(), 160);

    String compare = "";
    for (int i=0; i < 160; i++) {
View Full Code Here

  @Test(expectedExceptions=IllegalArgumentException.class)
  public void shouldFailIfFieldNotSet() throws Exception {
    AddSpacesAction action = new AddSpacesAction();
    action.setLength(1);

    action.execute(new Message());
  }

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

  @Test(expectedExceptions=IllegalArgumentException.class)
  public void shouldFailIfLengthNotPositive() throws Exception {
    AddSpacesAction action = new AddSpacesAction();
    action.setField("message");

    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.