Package play

Examples of play.PlayBuilder


*/
public class PluginCollectionTest {

    @Test
    public void verifyLoading() {
        new PlayBuilder().build();
        PluginCollection pc = new PluginCollection();
        pc.loadPlugins();

        //the following plugin-list should match the list in the file 'play.plugins'
        assertThat(pc.getEnabledPlugins()).containsExactly(
View Full Code Here


    }

    @Test
    public void verifyLoadingFromFilesWithBlankLines() throws Exception {
        //verify that only application specific plugins gets reloaded
        new PlayBuilder().build();

        //create custom PluginCollection that fakes that TestPlugin is application plugin
        PluginCollection pc = new PluginCollection(){
            @Override
            protected boolean isLoadedByApplicationClassloader(PlayPlugin plugin) {
View Full Code Here

    }

    @Test
    public void verifyReloading() throws Exception{
        //verify that only application specific plugins gets reloaded
        new PlayBuilder().build();


        //create custom PluginCollection that fakes that TestPlugin is application plugin
        PluginCollection pc = new PluginCollection(){
            @Override
View Full Code Here

    }

    @SuppressWarnings({"deprecation"})
    @Test
    public void verifyUpdatePlayPluginsList(){
        new PlayBuilder().build();

        assertThat(Play.plugins).isEmpty();

        PluginCollection pc = new PluginCollection();
        pc.loadPlugins();
View Full Code Here

    final Annotation[] noAnnotations = new Annotation[]{};


    @Before
    public void setup() {
        new PlayBuilder().build();
    }
View Full Code Here

    }

    @Test
    public void testBind() throws Exception {

        new PlayBuilder().build();
        ValidationBuilder.build();
        Map<String, String[]> m = new HashMap<String, String[]>();
        m.put("b.a", new String[]{"a1"});
        m.put("b.b", new String[]{"b1"});
        m.put("b.i", new String[]{"2"});
View Full Code Here

public class MailTest {

  @Test(expected = MailException.class)
  public void buildMessageWithoutFrom() throws EmailException {
    new PlayBuilder().build();

    Email email = new SimpleEmail();
    email.addTo("from@playframework.org");
    email.setSubject("subject");
    Mail.buildMessage(new SimpleEmail());
View Full Code Here

    Mail.buildMessage(new SimpleEmail());
  }

  @Test(expected = MailException.class)
  public void buildMessageWithoutRecipient() throws EmailException {
    new PlayBuilder().build();

    Email email = new SimpleEmail();
    email.setFrom("from@playframework.org");
    email.setSubject("subject");
    Mail.buildMessage(email);
View Full Code Here

    Mail.buildMessage(email);
  }

  @Test(expected = MailException.class)
  public void buildMessageWithoutSubject() throws EmailException {
    new PlayBuilder().build();

    Email email = new SimpleEmail();
    email.setFrom("from@playframework.org");
    email.addTo("to@playframework.org");
    Mail.buildMessage(email);
View Full Code Here

    Mail.buildMessage(email);
  }

  @Test
  public void buildValidMessages() throws EmailException {
    new PlayBuilder().build();

    Email email = new SimpleEmail();
    email.setFrom("from@playframework.org");
    email.addTo("to@playframework.org");
    email.setSubject("subject");
View Full Code Here

TOP

Related Classes of play.PlayBuilder

Copyright © 2018 www.massapicom. 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.