Skip to content

Commit

Permalink
Compilation error fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
KonstantinRyazantsev committed Aug 12, 2020
1 parent 51f2ff2 commit beb7989
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/Tests/UsageExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ namespace Tests
public class UsageExample
{
private readonly IUnitOfWorkManager<ExampleUnitOfWork> _unitOfWorkManager;
private readonly IIdGenerator _idGenerator;

public UsageExample(IUnitOfWorkManager<ExampleUnitOfWork> unitOfWorkManager)
public UsageExample(IUnitOfWorkManager<ExampleUnitOfWork> unitOfWorkManager,
IIdGenerator idGenerator)
{
_unitOfWorkManager = unitOfWorkManager;
_idGenerator = idGenerator;
}

public async Task Foo()
Expand All @@ -18,7 +21,7 @@ public async Task Foo()

if (!unitOfWork.Outbox.IsClosed)
{
var id = await unitOfWork.GenerateId("id-generator-account");
var id = await _idGenerator.GetId(unitOfWork.IdempotencyId, "id-generator-account");

// DB state updated here

Expand Down

0 comments on commit beb7989

Please sign in to comment.