Skip to content

Commit 5597635

Browse files
committed
Tweaks
1 parent 4782a40 commit 5597635

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Gotenberg.Sharp.Api.Client/Domain/ValueObjects/CompressionQuality.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ private CompressionQuality(int value)
3535

3636
public static CompressionQuality Create(int quality)
3737
{
38-
if (quality < MinValue || quality > MaxValue)
38+
if (quality is < MinValue or > MaxValue)
3939
throw new ArgumentOutOfRangeException(
4040
nameof(quality),
4141
quality,

test/GotenbergSharpClient.Tests/LibreOfficeOptionsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ private static byte[] CreateMinimalDocx()
265265
{
266266
// Minimal valid .docx file (ZIP with minimal content)
267267
// Using a simple HTML-like approach via a .txt renamed - Gotenberg can handle basic office docs
268-
return System.Text.Encoding.UTF8.GetBytes("Hello World - LibreOffice test document");
268+
return "Hello World - LibreOffice test document"u8.ToArray();
269269
}
270270

271271
#endregion

test/GotenbergSharpClient.Tests/PdfEngineOperationsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ private static async Task<byte[]> GenerateTestPdf(Gotenberg.Sharp.API.Client.Got
220220
var builder = new HtmlRequestBuilder()
221221
.AddDocument(doc => doc.SetBody("<html><body><h1>Test PDF</h1></body></html>"));
222222

223-
using var stream = await client.HtmlToPdfAsync(builder);
223+
await using var stream = await client.HtmlToPdfAsync(builder);
224224

225225
using var ms = new MemoryStream();
226226
await stream.CopyToAsync(ms);

0 commit comments

Comments
 (0)