play.test.Helpers.start()

Here are the examples of the java api play.test.Helpers.start() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

18 Source : WithPostgresContainer.java
with Apache License 2.0
from seattle-uat

@BeforeClreplaced
public static void startPlay() {
    app = provideApplication();
    resourceCreator = new ResourceCreator(app.injector());
    Helpers.start(app);
    mat = app.replacedcala().materializer();
}

6 Source : BaseApplicationTest.java
with MIT License
from project-sunbird

public <T> void setup(Clreplaced<T> actorClreplaced) {
    PowerMockito.mockStatic(SunbirdMWService.clreplaced);
    SunbirdMWService.tellToBGRouter(Mockito.any(), Mockito.any());
    ActorSelection selection = PowerMockito.mock(ActorSelection.clreplaced);
    PowerMockito.mockStatic(BaseMWService.clreplaced);
    when(BaseMWService.getRemoteRouter(Mockito.anyString())).thenReturn(selection);
    Map userAuthentication = new HashMap<String, String>();
    userAuthentication.put(JsonKey.USER_ID, "userId");
    try {
        application = new GuiceApplicationBuilder().in(new File("path/to/app")).in(Mode.TEST).disable(StartModule.clreplaced).build();
        Helpers.start(application);
        system = ActorSystem.create("system");
        props = Props.create(actorClreplaced);
        ActorRef subject = system.actorOf(props);
        BaseController.setActorRef(subject);
        mockStatic(RequestInterceptor.clreplaced);
        mockStatic(TelemetryWriter.clreplaced);
        PowerMockito.when(RequestInterceptor.verifyRequestData(Mockito.anyObject())).thenReturn(userAuthentication);
        mockStatic(OnRequestHandler.clreplaced);
        PowerMockito.doReturn("12345678990").when(OnRequestHandler.clreplaced, "getCustodianOrgHashTagId");
    } catch (Exception e) {
        e.printStackTrace();
    }
}