hw1/src/test/java/integration/PlayGameTest.java
/**
   * Tests starting a new game.
   */
Tests starting a new game.
Tests starting a new game .
@BeforeEach
  public void startNewGame() {
    HttpResponse<String> response = Unirest.get("http://localhost:8080/newgame").asString();
    int resStatus = response.getStatus();
    Assertions.assertEquals(200, resStatus);
    System.out.println("[Before Each] Started /newgame");
  }
@ BeforeEach public void startNewGame ( ) { HttpResponse < String > response = Unirest . get ( "http://localhost:8080/newgame" ) . asString ( ) ; int resStatus = response . getStatus ( ) ; Assertions . assertEquals ( 200 , resStatus ) ; System . out . println ( "[Before Each] Started /newgame" ) ; }
Tests starting a new game.
Tests starting a new game .
// Call to /newgame // Assert the server responds with 200 OK