public void WithContent_Does_Not_Throw_When_Expected_Match()
        {
            // Arrange
            var target = CreateWithJsonContent("FOO");

            var sut = new NoContentResultAssertions(target);

            // Act & Assert
            sut.Invoking(x => x.WithContent("FOO"))
            .Should()
            .NotThrow();
        }
        public void WithContent_Throws_When_Content_Is_Not_Equivalent_To_Expected_WithBecauseMessage()
        {
            // Arrange
            var target = CreateWithJsonContent("FOO");

            var sut = new NoContentResultAssertions(target);

            // Act & Assert
            sut.Invoking(x => x.WithContent("BAR", "Because of something"))
            .Should()
            .Throw <XunitException>()
            .WithMessage(@"Expected content of no content result to be ""BAR"" Because of something, but ""FOO"" differs near ""FOO"" (index 0).");
        }
        public void WithContent_Throws_When_ContentTypes_Isnt_Json()
        {
            // Arrange
            var target = new ContentResult
            {
                Content     = "FOO",
                ContentType = "BAZ",
            };

            var sut = new NoContentResultAssertions(target);

            // Act & Assert
            sut.Invoking(x => x.WithContent("FOO"))
            .Should()
            .Throw <XunitException>()
            .WithMessage(@"Expected content type of no content result to be ""application/json"", but found ""BAZ"".");
        }