Hi Ulrik,
Since you need to access the `TestServer` I can recommend you to look at this example test:
It starts the server with fake routes. You also mentioned, that you need an injector in the test, because you need to inject some bindings. It's should be pretty easy achieve:
val fakeRotes = FakeRouterModule {
case ("GET", "/some-url") => Action {
Results.Ok("everything is fine")
}
}
implicit val injector = new ScaldiApplicationBuilder(modules = Seq(fakeRotes)).buildInj()
import scaldi.Injectable._
running(TestServer(3333, inject [Application]), HTMLUNIT) { browser =>
val someService = inject [SomeService]
browser.pageSource must contain("everything is fine")
}
Hope this helps.
Cheers,
Oleg