8000 Use raw string literals in the Readme by adrianiftode · Pull Request #113 · adrianiftode/FluentAssertions.Web · GitHub
[go: up one dir, main page]

Skip to content

Use raw string literals in the Readme #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 20 additions & 11 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ public async Task Post_ReturnsOk()
var client = _factory.CreateClient();

// Act
var response = await client.PostAsync("/api/comments", new StringContent(@"{
""author"": ""John"",
""content"": ""Hey, you...""
}", Encoding.UTF8, "application/json"));
var response = await client.PostAsync("/api/comments", new StringContent(
"""
{
"author": "John",
"content": "Hey, you..."
}
""", Encoding.UTF8, "application/json"));

// Assert
response.Should().Be200Ok();
Expand Down Expand Up @@ -58,10 +61,13 @@ public async Task Post_ReturnsOkAndWithContent()
var client = _factory.CreateClient();

// Act
var response = await client.PostAsync("/api/comments", new StringContent(@"{
""author"": ""John"",
""content"": ""Hey, you...""
}", Encoding.UTF8, "application/json"));
var response = await client.PostAsync("/api/comments", new StringContent(
"""
{
"author": "John",
"content": "Hey, you..."
}
""", Encoding.UTF8, "application/json"));

// Assert
response.Should().BeAs(new
Expand Down Expand Up @@ -102,9 +108,12 @@ public async Task Post_WithNoAuthorButWithContent_ReturnsBadRequestWithAnErrorMe
var client = _factory.CreateClient();

// Act
var response = await client.PostAsync("/api/comments", new StringContent(@"{
""content"": ""Hey, you...""
}", Encoding.UTF8, "application/json"));
var response = await client.PostAsync("/api/comments", new StringContent(
"""
{
"content": "Hey, you..."
}
""", Encoding.UTF8, "application/json"));

// Assert
response.Should().Be400BadRequest()
Expand Down
0