Skip to content

Commit

Permalink
Stop using shared CollectionDefinition.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
JackLewis-digirati committed Nov 28, 2024
1 parent b5c028c commit f366036
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using API.Features.Storage.Helpers;
using API.Tests.Integration.Infrastructure;
using Repository;
using Test.Helpers.Integration;
using Test.Helpers.Integration.Infrastructure;

namespace API.Tests.Helpers;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@
using Repository;
using Test.Helpers.Helpers;
using Test.Helpers.Integration;
using Test.Helpers.Integration.Infrastructure;

namespace API.Tests.Integration;

[Trait("Category", "Integration")]
[Collection(CollectionDefinitions.StorageCollection.CollectionName)]
public class DeleteCollectionTests : IClassFixture<PresentationAppFactory<Program>>, IClassFixture<StorageFixture>
public class DeleteCollectionTests : IClassFixture<PresentationAppFactory<Program>>
{
private readonly HttpClient httpClient;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
using Repository;
using Test.Helpers.Helpers;
using Test.Helpers.Integration;
using Test.Helpers.Integration.Infrastructure;

namespace API.Tests.Integration;

[Trait("Category", "Integration")]
[Collection(CollectionDefinitions.StorageCollection.CollectionName)]
public class DeleteManifestTests : IClassFixture<PresentationAppFactory<Program>>, IClassFixture<StorageFixture>
public class DeleteManifestTests : IClassFixture<PresentationAppFactory<Program>>
{
private readonly HttpClient httpClient;
private readonly PresentationContext dbContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
using Models.API.Collection;
using Test.Helpers.Helpers;
using Test.Helpers.Integration;
using Test.Helpers.Integration.Infrastructure;

namespace API.Tests.Integration;

[Trait("Category", "Integration")]
[Collection(CollectionDefinitions.StorageCollection.CollectionName)]
public class GetCollectionTests : IClassFixture<PresentationAppFactory<Program>>, IClassFixture<StorageFixture>
public class GetCollectionTests : IClassFixture<PresentationAppFactory<Program>>
{
private readonly HttpClient httpClient;
private const int TotalDatabaseChildItems = 4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
using Models.API.Manifest;
using Microsoft.Net.Http.Headers;
using Test.Helpers.Integration;
using Test.Helpers.Integration.Infrastructure;

namespace API.Tests.Integration;

[Trait("Category", "Integration")]
[Collection(CollectionDefinitions.StorageCollection.CollectionName)]
public class GetManifestTests : IClassFixture<PresentationAppFactory<Program>>, IClassFixture<StorageFixture>
public class GetManifestTests : IClassFixture<PresentationAppFactory<Program>>
{
private readonly HttpClient httpClient;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Test.Helpers.Integration.Infrastructure;
using Test.Helpers.Integration;

namespace API.Tests.Integration.Infrastructure;

public class CollectionDefinitions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@
using Repository;
using Test.Helpers.Helpers;
using Test.Helpers.Integration;
using Test.Helpers.Integration.Infrastructure;
using JsonSerializer = System.Text.Json.JsonSerializer;

namespace API.Tests.Integration;

[Trait("Category", "Integration")]
[Collection(CollectionDefinitions.StorageCollection.CollectionName)]
public class ModifyCollectionTests : IClassFixture<PresentationAppFactory<Program>>, IClassFixture<StorageFixture>
public class ModifyCollectionTests : IClassFixture<PresentationAppFactory<Program>>
{
private readonly HttpClient httpClient;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
using Test.Helpers;
using Test.Helpers.Helpers;
using Test.Helpers.Integration;
using Test.Helpers.Integration.Infrastructure;

namespace API.Tests.Integration;

[Trait("Category", "Integration")]
[Collection(CollectionDefinitions.StorageCollection.CollectionName)]
public class ModifyManifestCreateTests : IClassFixture<PresentationAppFactory<Program>>, IClassFixture<StorageFixture>
public class ModifyManifestCreateTests : IClassFixture<PresentationAppFactory<Program>>
{
private readonly HttpClient httpClient;
private readonly PresentationContext dbContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
using Repository;
using Test.Helpers.Helpers;
using Test.Helpers.Integration;
using Test.Helpers.Integration.Infrastructure;

namespace API.Tests.Integration;

[Trait("Category", "Integration")]
[Collection(CollectionDefinitions.StorageCollection.CollectionName)]
public class ModifyManifestUpdateTests : IClassFixture<PresentationAppFactory<Program>>, IClassFixture<StorageFixture>
public class ModifyManifestUpdateTests : IClassFixture<PresentationAppFactory<Program>>
{
private readonly HttpClient httpClient;
private readonly PresentationContext dbContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using AWS.SQS;
using BackgroundHandler.CustomerCreation;
using BackgroundHandler.Tests.infrastructure;
using FluentAssertions;
using Microsoft.Extensions.Logging.Abstractions;
using Models.Database.General;
using Repository;
using Test.Helpers.Integration;
using Test.Helpers.Integration.Infrastructure;

namespace BackgroundServices.Tests.CustomerCreation;
namespace BackgroundHandler.Tests.CustomerCreation;

[Trait("Category", "Database")]
[Collection(CollectionDefinitions.DatabaseCollection.CollectionName)]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Test.Helpers.Integration;

namespace BackgroundHandler.Tests.infrastructure;

public class CollectionDefinitions
{
[CollectionDefinition(CollectionName)]
public class DatabaseCollection : ICollectionFixture<PresentationContextFixture>
{
public const string CollectionName = "Database Collection";
}
}

0 comments on commit f366036

Please sign in to comment.