Package org.mokai.action.mail

Examples of org.mokai.action.mail.EmailToSmsAction.execute()


      .setProperty("text", "This is a test");

    EmailToSmsAction action = new EmailToSmsAction();
    action.setSmsTo("573001222222");

    action.execute(message);

    Assert.assertEquals(message.getProperty("to", String.class), "573001222222");
    Assert.assertEquals(message.getProperty("emailTo", String.class), "german.escobarc@gmail.com");
    Assert.assertEquals(message.getProperty("from", String.class), "12345");
    Assert.assertEquals(message.getProperty("emailFrom", String.class), "test@localhost.com");
View Full Code Here


    EmailToSmsAction action = new EmailToSmsAction();
    action.setUseSubjectAsTo(true);
    action.setSmsFrom("54321");

    action.execute(message);

    Assert.assertEquals(message.getProperty("to", String.class), "574003222222");
    Assert.assertEquals(message.getProperty("emailTo", String.class), "german.escobarc@gmail.com");
    Assert.assertEquals(message.getProperty("from", String.class), "54321");
    Assert.assertEquals(message.getProperty("emailFrom", String.class), "test@localhost.com");
View Full Code Here

    EmailToSmsAction action = new EmailToSmsAction();
    action.setUseSubjectAsTo(true);
    action.setMaxTextLength(200);

    action.execute(message);

    Assert.assertEquals(message.getProperty("text", String.class).length(), 200);
  }

  @Test
View Full Code Here

    EmailToSmsAction action = new EmailToSmsAction();
    action.setUseSubjectAsTo(true);
    action.setMaxTextLength(200);

    action.execute(message);

    Assert.assertEquals(message.getProperty("text", String.class).length(), 199);
  }

  private String getText(int length) {
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.