public void WhenRetrievingAnExistingGameReturnsStatusCodeOk()
 {
     var controller = new GameController();
     HttpResponseMessage createResponse = controller.Create();
     HttpResponseMessage response = controller.Get(createResponse.Headers.Location.ToString().Last().ToString());
     Assert.That(response.StatusCode, Is.EqualTo(HttpStatusCode.OK));
 }
 public void WhenCreatingANewGameThenStatusCodeReturnedCreated()
 {
     var controller = new GameController();
     HttpResponseMessage response = controller.Create();
     Assert.That(response.StatusCode, Is.EqualTo(HttpStatusCode.Created));
 }
 public void WhenRetrievingAGameThatDoesNotExistReturnsStatusCodeNotFound()
 {
     var controller = new GameController();
     var response = controller.Get("A");
     Assert.That(response.StatusCode, Is.EqualTo(HttpStatusCode.NotFound));
 }
 public void WhenCreatingANewGameThenLocationHeaderPointsToGameUri()
 {
     var controller = new GameController();
     HttpResponseMessage response = controller.Create();
     StringAssert.EndsWith("/game/1", response.Headers.Location.ToString());
 }