Skip to content

Commit 8e99e22

Browse files
committed
refactor: Remove redundant private keyword from static fields, update namespace import, and adjust book handler test assertion.
1 parent 16ce736 commit 8e99e22

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/ApiService/BookStore.ApiService.Tests/Handlers/BookHandlerTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using BookStore.ApiService.Aggregates;
2-
using BookStore.ApiService.Commands.Books;
2+
using BookStore.ApiService.Commands;
33
using BookStore.ApiService.Events;
44
using BookStore.ApiService.Handlers.Books;
55
using Marten;
@@ -35,7 +35,7 @@ public async Task CreateBookHandler_ShouldStartStreamWithBookAddedEvent()
3535
var result = BookHandlers.Handle(command, session);
3636

3737
// Assert
38-
await Assert.That(result).IsNotNull();
38+
await Assert.That(result.Item1).IsNotNull();
3939
session.Events.Received(1).StartStream<BookAggregate>(
4040
command.Id,
4141
Arg.Is<BookAdded>(e =>

src/ApiService/BookStore.ApiService.Tests/JsonSerializationTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace BookStore.ApiService.Tests;
1212
public class JsonSerializationTests
1313
{
1414
// Static lazy initialization for better performance - shared across all tests
15-
private static readonly Lazy<JsonSerializerOptions> _options = new(() => new()
15+
static readonly Lazy<JsonSerializerOptions> _options = new(() => new()
1616
{
1717
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
1818
Converters = { new System.Text.Json.Serialization.JsonStringEnumConverter(JsonNamingPolicy.CamelCase) }

src/Web/BookStore.Web.Tests/WebTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace BookStore.Web.Tests;
44

55
public class WebTests
66
{
7-
private static readonly TimeSpan DefaultTimeout = TimeSpan.FromSeconds(30);
7+
static readonly TimeSpan DefaultTimeout = TimeSpan.FromSeconds(30);
88

99
[Test]
1010
[Category("Integration")]

0 commit comments

Comments
 (0)