Skip to content

Commit

Permalink
Fix Build
Browse files Browse the repository at this point in the history
  • Loading branch information
gritcsenko committed May 26, 2024
1 parent b485164 commit a946d5f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using HomeInventory.Web.Configuration;
using HomeInventory.Domain.Primitives.Ids;
using HomeInventory.Web.Configuration;

namespace HomeInventory.Tests.Middlewares;

Expand All @@ -8,7 +9,7 @@ public class CorrelationIdContainerTests : BaseTest
[Fact]
public void CorrelationId_Should_NotBeEmpty_When_Created()
{
var sut = new CorrelationIdContainer();
var sut = new CorrelationIdContainer(IdSuppliers.Cuid);

var actual = sut.CorrelationId;

Expand All @@ -18,7 +19,7 @@ public void CorrelationId_Should_NotBeEmpty_When_Created()
[Fact]
public void GenerateNew_Should_UpdateCorrelationId()
{
var sut = new CorrelationIdContainer();
var sut = new CorrelationIdContainer(IdSuppliers.Cuid);
var original = sut.CorrelationId;

sut.GenerateNew();
Expand All @@ -30,7 +31,7 @@ public void GenerateNew_Should_UpdateCorrelationId()
[Fact]
public void SetExisting_Should_UpdateCorrelationId()
{
var sut = new CorrelationIdContainer();
var sut = new CorrelationIdContainer(IdSuppliers.Cuid);
var expected = Fixture.Create<string>();

sut.SetExisting(expected);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using HomeInventory.Web.Configuration;
using HomeInventory.Domain.Primitives.Ids;
using HomeInventory.Web.Configuration;
using HomeInventory.Web.Middleware;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
Expand All @@ -9,7 +10,7 @@ namespace HomeInventory.Tests.Middlewares;
public class CorrelationIdMiddlewareTests : BaseTest
{
private readonly TestingLogger<CorrelationIdMiddleware> _logger = Substitute.For<TestingLogger<CorrelationIdMiddleware>>();
private readonly CorrelationIdContainer _container = new();
private readonly CorrelationIdContainer _container = new(IdSuppliers.Cuid);
private readonly DefaultHttpContext _httpContext = new();
private readonly IHttpResponseFeature _httpResponseFeature = Substitute.For<IHttpResponseFeature>();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using HomeInventory.Web.Authentication;
using HomeInventory.Domain.Primitives.Ids;
using HomeInventory.Web.Authentication;

namespace HomeInventory.Tests.Systems.Authentication;

Expand All @@ -8,7 +9,7 @@ public class GuidJwtIdentityGeneratorTests : BaseTest
[Fact]
public void GenerateNew_Should_ReturnNotEmpty()
{
var sut = new CuidJwtIdentityGenerator();
var sut = new CuidJwtIdentityGenerator(IdSuppliers.Cuid);

var actual = sut.GenerateNew();

Expand All @@ -18,7 +19,7 @@ public void GenerateNew_Should_ReturnNotEmpty()
[Fact]
public void GenerateNew_Should_ReturnNewValue_WhenCalledSecondTime()
{
var sut = new CuidJwtIdentityGenerator();
var sut = new CuidJwtIdentityGenerator(IdSuppliers.Cuid);
var first = sut.GenerateNew();

var actual = sut.GenerateNew();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

namespace HomeInventory.Web.Configuration;

internal class CorrelationIdContainerr : ICorrelationIdContainer
internal class CorrelationIdContainer : ICorrelationIdContainer
{
private readonly ISupplier<Cuid> _supplier;

public CorrelationIdContainerr(ISupplier<Cuid> supplier)
public CorrelationIdContainer(ISupplier<Cuid> supplier)
{
_supplier = supplier;
CorrelationId = CreateNewId();
Expand Down

0 comments on commit a946d5f

Please sign in to comment.