Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com>
  */
 package play.test;
 
 import java.io.File;
 import java.util.List;
 import java.util.Map;
A fake application for testing.
public class FakeApplication implements play.Application {
    private final play.api.test.FakeApplication application;
    private final Configuration configuration;
    private final Injector injector;

    
Create a fake application.

Parameters:
path application environment root path
classloader application environment class loader
additionalConfiguration additional configuration for the application
additionalPlugins additional plugins to load
withoutPlugins plugins to disable
global global settings to use in place of default global
    @SuppressWarnings("unchecked")
    public FakeApplication(
        File path,
        ClassLoader classloader,
        Map<String, ? extends ObjectadditionalConfiguration,
        List<StringadditionalPlugins,
        List<StringwithoutPlugins,
        play.GlobalSettings global) {
        play.api.GlobalSettings scalaGlobal = (global != null) ? new play.core.j.JavaGlobalSettingsAdapter(global) : null;
        this. = new play.api.test.FakeApplication(
            path,
            classloader,
            Scala.toSeq(additionalPlugins),
            Scala.toSeq(withoutPlugins),
            Scala.asScala((Map<StringObject>) additionalConfiguration),
            scala.Option.apply(scalaGlobal),
        );
        this. = .injector().instanceOf(Configuration.class);
        this. = .injector().instanceOf(Injector.class);
    }

    
Create a fake application.

Parameters:
path application environment root path
classloader application environment class loader
additionalConfiguration additional configuration for the application
additionalPlugins additional plugins to load
global global settings to use in place of default global
    public FakeApplication(File pathClassLoader classloaderMap<String, ? extends ObjectadditionalConfiguration,
                           List<StringadditionalPluginsplay.GlobalSettings global) {
        this(pathclassloaderadditionalConfigurationadditionalPlugins, Collections.<String>emptyList(), global);
    }

    
Get the underlying Scala application.
        return ;
    }

    
Get the application configuration.
    public Configuration configuration() {
        return ;
    }

    
Get the injector for this application.
    public Injector injector() {
        return ;
    }
New to GrepCode? Check out our FAQ X