Skip to content

Commit 46d9eec

Browse files
committed
Address CodeRabbit review feedback
1 parent 0abe5e5 commit 46d9eec

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

test/GotenbergSharpClient.Tests/ScreenshotTests.cs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public void ScreenshotUrlBuilder_WithRelativeUrl_Throws()
104104
#region Serialization Tests
105105

106106
[Test]
107-
public void ScreenshotProperties_SerializesCorrectly()
107+
public async Task ScreenshotProperties_SerializesCorrectly()
108108
{
109109
var props = new ScreenshotProperties
110110
{
@@ -118,24 +118,25 @@ public void ScreenshotProperties_SerializesCorrectly()
118118

119119
var httpContents = props.ToHttpContent().ToList();
120120

121-
httpContents.FirstOrDefault(c =>
121+
(await httpContents.FirstOrDefault(c =>
122122
c.Headers.ContentDisposition?.Name == "width")!
123-
.ReadAsStringAsync().Result.Should().Be("1920");
124-
httpContents.FirstOrDefault(c =>
123+
.ReadAsStringAsync()).Should().Be("1920");
124+
(await httpContents.FirstOrDefault(c =>
125125
c.Headers.ContentDisposition?.Name == "height")!
126-
.ReadAsStringAsync().Result.Should().Be("1080");
127-
httpContents.FirstOrDefault(c =>
126+
.ReadAsStringAsync()).Should().Be("1080");
127+
(await httpContents.FirstOrDefault(c =>
128128
c.Headers.ContentDisposition?.Name == "format")!
129-
.ReadAsStringAsync().Result.Should().Be("jpeg");
130-
httpContents.FirstOrDefault(c =>
129+
.ReadAsStringAsync()).Should().Be("jpeg");
130+
(await httpContents.FirstOrDefault(c =>
131131
c.Headers.ContentDisposition?.Name == "quality")!
132-
.ReadAsStringAsync().Result.Should().Be("80");
132+
.ReadAsStringAsync()).Should().Be("80");
133133
}
134134

135135
#endregion
136136

137137
#region Integration Tests
138138

139+
[Category("Integration")]
139140
[Test]
140141
public async Task ScreenshotHtml_ReturnsImage()
141142
{
@@ -163,6 +164,7 @@ public async Task ScreenshotHtml_ReturnsImage()
163164
header[3].Should().Be(0x47); // 'G'
164165
}
165166

167+
[Category("Integration")]
166168
[Test]
167169
public async Task ScreenshotUrl_ReturnsImage()
168170
{

0 commit comments

Comments
 (0)