public async Task SetsLocationHeader(JSendRedirectToRouteResult result)
        {
            // Exercise system
            var message = await result.ExecuteAsync(new CancellationToken());

            // Verify outcome
            message.Headers.Location.Should().Be(TestConventions.RouteLink);
        }
        public async Task SetsStatusCode(JSendRedirectToRouteResult result)
        {
            // Exercise system
            var message = await result.ExecuteAsync(new CancellationToken());

            // Verify outcome
            message.StatusCode.Should().Be(result.StatusCode);
        }
        public async Task SetsContentTypeHeader(JSendRedirectToRouteResult result)
        {
            // Exercise system
            var message = await result.ExecuteAsync(new CancellationToken());

            // Verify outcome
            message.Content.Headers.ContentType.MediaType.Should().Be("application/json");
        }
        public async Task ResponseIsSerializedIntoBody(JSendRedirectToRouteResult result)
        {
            // Fixture setup
            var serializedResponse = JsonConvert.SerializeObject(result.Response);
            // Exercise system
            var httpResponse = await result.ExecuteAsync(new CancellationToken());

            // Verify outcome
            var content = await httpResponse.Content.ReadAsStringAsync();

            content.Should().Be(serializedResponse);
        }
 public async Task SetsLocationHeader(JSendRedirectToRouteResult result)
 {
     // Exercise system
     var message = await result.ExecuteAsync(new CancellationToken());
     // Verify outcome
     message.Headers.Location.Should().Be(TestConventions.RouteLink);
 }
 public async Task SetsContentTypeHeader(JSendRedirectToRouteResult result)
 {
     // Exercise system
     var message = await result.ExecuteAsync(new CancellationToken());
     // Verify outcome
     message.Content.Headers.ContentType.MediaType.Should().Be("application/json");
 }
 public async Task SetsStatusCode(JSendRedirectToRouteResult result)
 {
     // Exercise system
     var message = await result.ExecuteAsync(new CancellationToken());
     // Verify outcome
     message.StatusCode.Should().Be(result.StatusCode);
 }
 public async Task ResponseIsSerializedIntoBody(JSendRedirectToRouteResult result)
 {
     // Fixture setup
     var serializedResponse = JsonConvert.SerializeObject(result.Response);
     // Exercise system
     var httpResponseMessage = await result.ExecuteAsync(new CancellationToken());
     // Verify outcome
     var content = await httpResponseMessage.Content.ReadAsStringAsync();
     content.Should().Be(serializedResponse);
 }