New unit test format

This commit is contained in:
Nick
2019-08-30 21:11:18 +01:00
parent db85c8f275
commit 6cd385e4c0
19972 changed files with 1626600 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
play.modules.enabled += org.baeldung.lagom.helloworld.weather.impl.WeatherServiceModule
@@ -0,0 +1,19 @@
package org.baeldung.lagom.helloworld.weather.impl;
import java.util.concurrent.CompletableFuture;
import org.baeldung.lagom.helloworld.weather.api.WeatherService;
import org.baeldung.lagom.helloworld.weather.api.WeatherStats;
import com.lightbend.lagom.javadsl.api.ServiceCall;
import akka.NotUsed;
public class WeatherServiceImpl implements WeatherService {
@Override
public ServiceCall<NotUsed, WeatherStats> weatherStatsForToday() {
return (req) -> CompletableFuture.completedFuture(WeatherStats.forToday());
}
}
@@ -0,0 +1,16 @@
package org.baeldung.lagom.helloworld.weather.impl;
import org.baeldung.lagom.helloworld.weather.api.WeatherService;
import com.google.inject.AbstractModule;
import com.lightbend.lagom.javadsl.server.ServiceGuiceSupport;
/**
* The module that binds the GreetingService so that it can be served.
*/
public class WeatherServiceModule extends AbstractModule implements ServiceGuiceSupport {
@Override
protected void configure() {
bindServices(serviceBinding(WeatherService.class, WeatherServiceImpl.class));
}
}
@@ -0,0 +1 @@
play.modules.enabled += org.baeldung.lagom.helloworld.weather.impl.WeatherServiceModule
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="STDOUT" />
</root>
</configuration>