refactor: corrections and refinements
This commit is contained in:
@@ -474,9 +474,6 @@ public class CustomersControllerTests : IAsyncLifetime
|
||||
return new WebApplicationFactory<Program>()
|
||||
.WithWebHostBuilder(hostBuilder =>
|
||||
{
|
||||
hostBuilder.UseSetting("Urls:LinkedIn", "https://www.linkedin.com/in/jeangatto/");
|
||||
hostBuilder.UseSetting("Urls:Github", "https://github.com/jeangatto/ASP.NET-Core-Clean-Architecture-CQRS-Event-Sourcing/blob/main/LICENSE");
|
||||
|
||||
hostBuilder.UseSetting("ConnectionStrings:SqlConnection", "InMemory");
|
||||
hostBuilder.UseSetting("ConnectionStrings:NoSqlConnection", "InMemory");
|
||||
hostBuilder.UseSetting("ConnectionStrings:CacheConnection", "InMemory");
|
||||
@@ -528,4 +525,4 @@ public class CustomersControllerTests : IAsyncLifetime
|
||||
private static WebApplicationFactoryClientOptions CreateClientOptions() => new() { AllowAutoRedirect = false };
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,4 +7,4 @@ internal static class FakerExtensions
|
||||
{
|
||||
public static Faker<T> UsePrivateConstructor<T>(this Faker<T> faker) where T : class =>
|
||||
faker.CustomInstantiator(_ => Activator.CreateInstance(typeof(T), nonPublic: true) as T);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Ardalis.Result" />
|
||||
<PackageReference Include="AutoMapper" />
|
||||
@@ -37,15 +37,15 @@
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Shop.PublicApi\Shop.PublicApi.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="xunit.runner.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
||||
+1
-1
@@ -118,4 +118,4 @@ public class CreateCustomerCommandHandlerTests : IClassFixture<EfSqliteFixture>
|
||||
act.IsSuccess.Should().BeFalse();
|
||||
act.ValidationErrors.Should().NotBeNullOrEmpty().And.OnlyHaveUniqueItems();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -108,4 +108,4 @@ public class DeleteCustomerCommandHandlerTests : IClassFixture<EfSqliteFixture>
|
||||
act.IsSuccess.Should().BeFalse();
|
||||
act.ValidationErrors.Should().NotBeNullOrEmpty().And.OnlyHaveUniqueItems();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -155,4 +155,4 @@ public class UpdateCustomerCommandHandlerTest : IClassFixture<EfSqliteFixture>
|
||||
act.IsSuccess.Should().BeFalse();
|
||||
act.ValidationErrors.Should().NotBeNullOrEmpty().And.OnlyHaveUniqueItems();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,4 +35,4 @@ public class ConfigurationExtensionsTests
|
||||
act.AbsoluteExpirationInHours.Should().Be(absoluteExpirationInHours);
|
||||
act.SlidingExpirationInSeconds.Should().Be(slidingExpirationInSeconds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,4 +78,4 @@ public class JsonExtensionsTests
|
||||
public string UserName { get; } = UserName;
|
||||
public EStatus Status { get; } = Status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,4 +42,4 @@ public class ServicesCollectionExtensionsTests
|
||||
act.AbsoluteExpirationInHours.Should().Be(absoluteExpirationInHours);
|
||||
act.SlidingExpirationInSeconds.Should().Be(slidingExpirationInSeconds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,4 +83,4 @@ public class CustomerTests
|
||||
.And.OnlyHaveUniqueItems()
|
||||
.And.ContainItemsAssignableTo<CustomerDeletedEvent>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,4 +79,4 @@ public class EmailTests
|
||||
.And.HaveCount(1)
|
||||
.And.Satisfy(message => message == "The e-mail address must be provided.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,4 +66,4 @@ public class EfSqliteFixture : IAsyncLifetime, IDisposable
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,4 +22,4 @@ public class AutoMapperTests
|
||||
// Assert
|
||||
act.Should().NotThrow();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
<SonarQubeTestProject>True</SonarQubeTestProject>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoMapper" />
|
||||
<PackageReference Include="Bogus" />
|
||||
@@ -35,7 +35,7 @@
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Shop.Infrastructure\Shop.Infrastructure.csproj" />
|
||||
<ProjectReference Include="..\..\src\Shop.Domain\Shop.Domain.csproj" />
|
||||
@@ -44,11 +44,11 @@
|
||||
<ProjectReference Include="..\..\src\Shop.PublicApi\Shop.PublicApi.csproj" />
|
||||
<ProjectReference Include="..\..\src\Shop.Query\Shop.Query.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="xunit.runner.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user