Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace CallbackHandler.BusinessLogic.Tests.Mediator

public class MediatorTests
{
private List<IBaseRequest> Requests = new List<IBaseRequest>();
private readonly List<IBaseRequest> Requests = new List<IBaseRequest>();

public MediatorTests()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

public class CallbackDomainServiceTests
{
private ICallbackDomainService DomainService;
private readonly ICallbackDomainService DomainService;

private Mock<IAggregateRepository<CallbackMessageAggregate, DomainEvent>> AggregateRepository;
private readonly Mock<IAggregateRepository<CallbackMessageAggregate, DomainEvent>> AggregateRepository;
public CallbackDomainServiceTests() {
this.AggregateRepository = new Mock<IAggregateRepository<CallbackMessageAggregate, DomainEvent>>();
this.DomainService = new CallbackDomainService(this.AggregateRepository.Object);
Expand All @@ -29,7 +29,7 @@
}

[Fact]
public async Task CallbackDomainService_RecordCallback_CallbackRecorded() {

Check warning on line 32 in CallbackHandler.BusinessLogic.Tests/Services/CallbackDomainServiceTests.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
this.AggregateRepository.Setup(a => a.GetLatestVersion(It.IsAny<Guid>(), It.IsAny<CancellationToken>())).ReturnsAsync(TestData.EmptyCallbackMessageAggregate());

Should.NotThrow(async () => {
Expand Down
Loading