Skip to content

Commit 77e53e3

Browse files
committed
Fixed issue with test after scala 3 migration
1 parent eaf5b3c commit 77e53e3

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

play-scala/dependency-injection/test/guice/service/ServiceWithRemoteCallUnitTest.scala

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ class ServiceWithRemoteCallUnitTest
2020
.overrides(new MockApiModule, new ServiceModule)
2121
.build()
2222
new App(application) {
23-
val srv = app.injector.instanceOf[ServiceWithRemoteCall]
24-
assert(srv.call() == "Mock remote api call")
23+
override def running() = {
24+
val srv = app.injector.instanceOf[ServiceWithRemoteCall]
25+
assert(srv.call() == "Mock remote api call")
26+
}
2527
}
2628
}
2729

@@ -30,8 +32,10 @@ class ServiceWithRemoteCallUnitTest
3032
.overrides(new ApiModule, new ServiceModule)
3133
.build()
3234
new App(application) {
33-
val srv = app.injector.instanceOf[ServiceWithRemoteCall]
34-
assert(srv.call() == "Real remote api call")
35+
override def running() = {
36+
val srv = app.injector.instanceOf[ServiceWithRemoteCall]
37+
assert(srv.call() == "Real remote api call")
38+
}
3539
}
3640
}
3741

0 commit comments

Comments
 (0)