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
17 changes: 8 additions & 9 deletions FileProcessor.BusinessLogic.Tests/FileProcessingManagerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -349,21 +349,20 @@ private void VerifyImportLog(FileImportLog source, FIleProcessor.Models.FileImpo
}
}

private Mock<Shared.EntityFramework.IDbContextFactory<EstateReportingContext>> CreateMockContextFactory()
private Mock<Shared.EntityFramework.IDbContextFactory<EstateReportingGenericContext>> CreateMockContextFactory()
{
return new Mock<Shared.EntityFramework.IDbContextFactory<EstateReportingContext>>();
return new Mock<Shared.EntityFramework.IDbContextFactory<EstateReportingGenericContext>>();
}

private async Task<EstateReportingContext> GetContext(String databaseName)
private async Task<EstateReportingGenericContext> GetContext(String databaseName)
{
EstateReportingContext context = null;
EstateReportingGenericContext context = null;

DbContextOptionsBuilder<EstateReportingContext> builder = new DbContextOptionsBuilder<EstateReportingContext>()
.UseInMemoryDatabase(databaseName)
.ConfigureWarnings(w => w.Ignore(InMemoryEventId.TransactionIgnoredWarning));
context = new EstateReportingContext(builder.Options);
DbContextOptionsBuilder<EstateReportingGenericContext> builder = new DbContextOptionsBuilder<EstateReportingGenericContext>()
.UseInMemoryDatabase(databaseName)
.ConfigureWarnings(w => w.Ignore(InMemoryEventId.TransactionIgnoredWarning));
context = new EstateReportingSqlServerContext(builder.Options);


return context;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="Shouldly" Version="4.0.3" />
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="13.2.29" />
Expand Down
16 changes: 8 additions & 8 deletions FileProcessor.BusinessLogic/FileProcessor.BusinessLogic.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="EstateManagement.Client" Version="1.0.10.2" />
<PackageReference Include="EstateReporting.Database" Version="1.0.17-build76" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.7" />
<PackageReference Include="SecurityService.Client" Version="1.0.6.2" />
<PackageReference Include="Shared" Version="1.0.14" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.14" />
<PackageReference Include="EstateManagement.Client" Version="1.0.16.2" />
<PackageReference Include="EstateReporting.Database" Version="1.0.18.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.12" />
<PackageReference Include="SecurityService.Client" Version="1.0.8" />
<PackageReference Include="Shared" Version="1.1.0" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.1.0" />
<PackageReference Include="MediatR" Version="9.0.0" />
<PackageReference Include="Shared.EventStore" Version="1.0.14" />
<PackageReference Include="Shared.EventStore" Version="1.1.0" />
<PackageReference Include="System.IO.Abstractions" Version="13.2.29" />
<PackageReference Include="TransactionProcessor.Client" Version="1.0.12.3" />
<PackageReference Include="TransactionProcessor.Client" Version="1.0.16.3" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions FileProcessor.BusinessLogic/Managers/FileProcessorManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class FileProcessorManager : IFileProcessorManager
/// </summary>
private readonly List<FileProfile> FileProfiles;

private readonly Shared.EntityFramework.IDbContextFactory<EstateReportingContext> DbContextFactory;
private readonly Shared.EntityFramework.IDbContextFactory<EstateReportingGenericContext> DbContextFactory;

private readonly IModelFactory ModelFactory;

Expand All @@ -49,7 +49,7 @@ public class FileProcessorManager : IFileProcessorManager
/// <param name="dbContextFactory">The database context factory.</param>
/// <param name="modelFactory">The model factory.</param>
public FileProcessorManager(List<FileProfile> fileProfiles,
Shared.EntityFramework.IDbContextFactory<EstateReportingContext> dbContextFactory,
Shared.EntityFramework.IDbContextFactory<EstateReportingGenericContext> dbContextFactory,
IModelFactory modelFactory,
IAggregateRepository<FileAggregate, DomainEventRecord.DomainEvent> fileAggregateRepository)
{
Expand Down Expand Up @@ -100,7 +100,7 @@ public async Task<List<FileImportLog>> GetFileImportLogs(Guid estateId,
Guid? merchantId,
CancellationToken cancellationToken)
{
EstateReportingContext context = await this.DbContextFactory.GetContext(estateId, cancellationToken);
EstateReportingGenericContext context = await this.DbContextFactory.GetContext(estateId, cancellationToken);

List<EstateReporting.Database.Entities.FileImportLog> importLogQuery =
await context.FileImportLogs.AsAsyncEnumerable().Where(f => f.ImportLogDateTime >= startDateTime).ToListAsync(cancellationToken);
Expand Down Expand Up @@ -130,7 +130,7 @@ public async Task<FileImportLog> GetFileImportLog(Guid fileImportLogId,
Guid? merchantId,
CancellationToken cancellationToken)
{
EstateReportingContext context = await this.DbContextFactory.GetContext(estateId, cancellationToken);
EstateReportingGenericContext context = await this.DbContextFactory.GetContext(estateId, cancellationToken);

EstateReporting.Database.Entities.FileImportLog importLogQuery =
await context.FileImportLogs.AsAsyncEnumerable().SingleOrDefaultAsync(f => f.FileImportLogId == fileImportLogId, cancellationToken);
Expand Down Expand Up @@ -168,7 +168,7 @@ public async Task<FileDetails> GetFile(Guid fileId,

FileDetails fileDetails = fileAggregate.GetFile();

EstateReportingContext context = await this.DbContextFactory.GetContext(estateId, cancellationToken);
EstateReportingGenericContext context = await this.DbContextFactory.GetContext(estateId, cancellationToken);

Merchant merchant = await context.Merchants.AsAsyncEnumerable()
.SingleOrDefaultAsync(m => m.MerchantId == fileDetails.MerchantId, cancellationToken);
Expand Down
2 changes: 1 addition & 1 deletion FileProcessor.Client/FileProcessor.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ClientProxyBase" Version="1.0.14" />
<PackageReference Include="ClientProxyBase" Version="1.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="Shouldly" Version="4.0.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.14" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.1.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="Shouldly" Version="4.0.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.14" />
<PackageReference Include="Shared.EventStore" Version="1.0.14" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.1.0" />
<PackageReference Include="Shared.EventStore" Version="1.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.14" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.1.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="Shouldly" Version="4.0.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.EventStore" Version="1.0.14" />
<PackageReference Include="Shared.EventStore" Version="1.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading