diff --git a/tests/IntegrationTests/Lumina.DataAccess.IntegrationTests/Core/Repositories/Common/Factory/RepositoryFactoryTests.cs b/tests/IntegrationTests/Lumina.DataAccess.IntegrationTests/Core/Repositories/Common/Factory/RepositoryFactoryTests.cs new file mode 100644 index 00000000..1382c3d0 --- /dev/null +++ b/tests/IntegrationTests/Lumina.DataAccess.IntegrationTests/Core/Repositories/Common/Factory/RepositoryFactoryTests.cs @@ -0,0 +1,25 @@ +#region ========================================================================= USING ===================================================================================== +using Lumina.DataAccess.Core.Repositories.Common.Factory; +using System.Diagnostics.CodeAnalysis; +#endregion + +namespace Lumina.DataAccess.IntegrationTests.Core.Repositories.Common.Factory; + +/// +/// Contains integration tests for the class. +/// +[ExcludeFromCodeCoverage] +public class RepositoryFactoryTests +{ + #region ===================================================================== METHODS =================================================================================== + [Fact] + public void RepositoryFactoryImplementsRepositoryFactoryInterface_InterfaceIsImplemented_ReturnsTrue() + { + // Arrange + var repositoryFactory = new RepositoryFactory(null!); + + // Assert + Assert.True(repositoryFactory is IRepositoryFactory); + } + #endregion +} diff --git a/tests/IntegrationTests/Lumina.DataAccess.IntegrationTests/Core/UoW/UnitOfWorkTests.cs b/tests/IntegrationTests/Lumina.DataAccess.IntegrationTests/Core/UoW/UnitOfWorkTests.cs new file mode 100644 index 00000000..4245457b --- /dev/null +++ b/tests/IntegrationTests/Lumina.DataAccess.IntegrationTests/Core/UoW/UnitOfWorkTests.cs @@ -0,0 +1,32 @@ + +#region ========================================================================= USING ===================================================================================== +using Lumina.Application.Common.DataAccess.UoW; +using Lumina.DataAccess.Common.DependencyInjection; +using Lumina.DataAccess.Core.UoW; +using Microsoft.Extensions.DependencyInjection; +using System.Diagnostics.CodeAnalysis; +#endregion + +namespace Lumina.DataAccess.IntegrationTests.Core.UoW; + +/// +/// Contains integration tests for the class. +/// +[ExcludeFromCodeCoverage] +public class UnitOfWorkTests +{ + #region ===================================================================== METHODS =================================================================================== + [Fact] + public void UnitOfWorkImplementsUnitOfWorkInterface_InterfaceIsImplemented_ReturnsTrue() + { + // Arrange + var services = new ServiceCollection(); + DataAccessLayerServices.AddDataAccessLayerServices(services); + var serviceProvider = services.BuildServiceProvider(); + var unitOfWork = (UnitOfWork)serviceProvider.GetRequiredService(); + + // Assert + Assert.True(unitOfWork is IUnitOfWork); + } + #endregion +} \ No newline at end of file diff --git a/tests/IntegrationTests/Lumina.DataAccess.IntegrationTests/Lumina.DataAccess.IntegrationTests.csproj b/tests/IntegrationTests/Lumina.DataAccess.IntegrationTests/Lumina.DataAccess.IntegrationTests.csproj new file mode 100644 index 00000000..e134d618 --- /dev/null +++ b/tests/IntegrationTests/Lumina.DataAccess.IntegrationTests/Lumina.DataAccess.IntegrationTests.csproj @@ -0,0 +1,37 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + +