package com.github.javadev.undescriptive.client;

import ch.qos.logback.classic.Level;
import com.github.javadev.undescriptive.protocol.request.SolutionRequest;
import com.github.javadev.undescriptive.protocol.response.GameResponse;
import com.github.javadev.undescriptive.protocol.response.WeatherResponse;
import com.github.javadev.undescriptive.protocol.response.SolutionResponse;
import org.junit.Test;

import org.junit.BeforeClass;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class GameTest {
    protected final static AsyncClient client = AsyncClient.createDefault();

    @BeforeClass
    public static void beforeClass() {
        ((ch.qos.logback.classic.Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME)).setLevel(Level.INFO);
    }

    @Test
    public void testRequest() throws Exception {
        final SolutionRequest request = SolutionRequest.builder()
            .scale(5)
            .claw(5)
            .wing(5)
            .fire(5)
            .build();
        request.getScale();
        request.getClaw();
        request.getWing();
        request.getFire();
    }

    @Test
    public void testGame() throws Exception {
        final GameResponse game = client.getGame().get();
        System.out.println(game);
        final SolutionRequest request = SolutionRequest.builder()
            .scale(5)
            .claw(5)
            .wing(5)
            .fire(5)
            .build();
        WeatherResponse weatherResponse = client.getWeather(game.getGameId()).get();
        System.out.println(weatherResponse);
        SolutionResponse response = client.putGame(game.getGameId(), request).get();
        System.out.println(response);
    }
}

@@ -1221,32 +1221,309 @@
 etGame().get();%0A
+        game.getGameResponseItem();%0A        game.getGameResponseItem().getName();%0A        game.getGameResponseItem().getAttack();%0A        game.getGameResponseItem().getArmor();%0A        game.getGameResponseItem().getAgility();%0A        game.getGameResponseItem().getEndurance();%0A
         System.o
@@ -1790,32 +1790,140 @@
 ameId()).get();%0A
+        weatherResponse.getTime();%0A        weatherResponse.getCode();%0A        weatherResponse.getMessage();%0A
         System.o
@@ -2028,32 +2028,93 @@
 request).get();%0A
+        response.getStatus();%0A        response.getMessage();%0A
         System.o

Improve code coverage.