Commit b4d10acb by Luda

fix/PLAY-130 Fix tests for play framework 2.6 version

parent d79dcd63
......@@ -42,6 +42,7 @@ import play.mvc.Http;
import play.mvc.Result;
import play.test.Helpers;
import play.test.WithApplication;
import play.core.j.JavaContextComponents;
import java.util.Collections;
import java.util.Map;
......@@ -105,7 +106,8 @@ public class AuthTest extends WithApplication {
Mockito.mock(Http.Request.class),
Collections.emptyMap(),
Collections.emptyMap(),
Collections.emptyMap()));
Collections.emptyMap(),
inject(JavaContextComponents.class)));
}
@Test
......@@ -296,4 +298,8 @@ public class AuthTest extends WithApplication {
abstract public DomainPermission<?> permission(Http.Context ctx);
}
public <T> T inject(Class<T> clazz) {
return app.injector().instanceOf(clazz);
}
}
......@@ -33,6 +33,7 @@ object Dependencies {
// TODO: replace when schema-org-client will be published to Maven Central repository
val schemaOrgClient = "com.squins.google.fork.schema-org-client" % "schema-org-client" % "1.0.0"
val mockito = "org.mockito" % "mockito-core" % "2.8.47" % Test
val h2db ="com.h2database" % "h2" % "1.4.192"
}
object Webjars {
......@@ -109,7 +110,8 @@ object Dependencies {
Libraries.reflections,
Libraries.shiroCore,
Libraries.xbeanFinder,
Libraries.mockito
Libraries.mockito,
Libraries.h2db
)
val commonsDeps = Seq(
......@@ -125,7 +127,8 @@ object Dependencies {
Libraries.eclipselink,
Libraries.httpcore,
Libraries.httpclient,
Libraries.jsoup
Libraries.jsoup,
Libraries.h2db
)
val metronicDeps = Seq(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment