Package play

Examples of play.PlayBuilder


public class GroovyTemplateTest {

    @Test
    public void verifyRenderingTwice() {

        new PlayBuilder().build();

        String groovySrc = "hello world: ${name}";

        GroovyTemplate t = new GroovyTemplate("Template_123", groovySrc);
        new GroovyTemplateCompiler().compile(t);
View Full Code Here


    }

    @Test
    public void verifyCompilingExtremelyLongLines() {

        new PlayBuilder().build();

        StringBuilder longString = new StringBuilder();
        for (int i=0;i<1000;i++) {
            longString.append("11111111112222222222333333333344444444445555555555");
            longString.append("11111111112222222222333333333344444444445555555555");
View Full Code Here

    }

    @Test
    public void verifyCompilingExtremelyLongLinesWithLinefeed() {

        new PlayBuilder().build();

        // when printing text from template, newlines (0x0d) is transformed into the string '\n'.
        // when breaking lines it is a problem if the '\' is at the end on one line and 'n'
        // is at the beginning of the next line.
View Full Code Here

*/
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 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

public class LangTest {

    @Test
    public void testChange() {
        new PlayBuilder().build();
        Play.langs = Arrays.asList("no", "en", "fr");
        Lang.current.set(null);
        assertThat(Lang.current.get()).isNull();

        Lang.change("no");
View Full Code Here

        assertThat(Lang.current.get()).isEqualTo("en");
    }

    @Test
    public void testGet() {
        new PlayBuilder().build();
        Play.langs = Arrays.asList("no", "en", "en_GB", "fr");
        Lang.current.set(null);

        Http.Response.current.set( new Http.Response());
View Full Code Here

public class YamlParserTest {
   
    @BeforeClass
    public static void setUp(){
        // Play
        new PlayBuilder().build();
        System.setProperty("play.version", Play.version);
       
        // We will create a "tmp/modules" directory to simulate the play dependencies
        File moduleDir = new File(Play.applicationPath, "modules");
        moduleDir.mkdirs();
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.