diff --git a/src/BuildingBlocks/BuildingBlocks.csproj b/src/BuildingBlocks/BuildingBlocks.csproj
index e773b06..61fca02 100644
--- a/src/BuildingBlocks/BuildingBlocks.csproj
+++ b/src/BuildingBlocks/BuildingBlocks.csproj
@@ -94,10 +94,10 @@
-
-
-
-
+
+
+
+
diff --git a/src/BuildingBlocks/PersistMessageProcessor/PersistMessageBackgroundService.cs b/src/BuildingBlocks/PersistMessageProcessor/PersistMessageBackgroundService.cs
index 5fc37d6..09527f9 100644
--- a/src/BuildingBlocks/PersistMessageProcessor/PersistMessageBackgroundService.cs
+++ b/src/BuildingBlocks/PersistMessageProcessor/PersistMessageBackgroundService.cs
@@ -1,4 +1,5 @@
-using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
@@ -7,18 +8,18 @@ namespace BuildingBlocks.PersistMessageProcessor;
public class PersistMessageBackgroundService : BackgroundService
{
private readonly ILogger _logger;
- private readonly IPersistMessageProcessor _persistMessageProcessor;
+ private readonly IServiceProvider _serviceProvider;
private PersistMessageOptions _options;
private Task? _executingTask;
public PersistMessageBackgroundService(
ILogger logger,
- IPersistMessageProcessor persistMessageProcessor,
+ IServiceProvider serviceProvider,
IOptions options)
{
_logger = logger;
- _persistMessageProcessor = persistMessageProcessor;
+ _serviceProvider = serviceProvider;
_options = options.Value;
}
@@ -44,7 +45,11 @@ public class PersistMessageBackgroundService : BackgroundService
{
try
{
- await _persistMessageProcessor.ProcessAllAsync(stoppingToken);
+ await using (var scope = _serviceProvider.CreateAsyncScope())
+ {
+ var service = scope.ServiceProvider.GetRequiredService();
+ await service.ProcessAllAsync(stoppingToken);
+ }
var delay = _options.Interval is { }
? TimeSpan.FromSeconds((int)_options.Interval)
diff --git a/src/BuildingBlocks/TestBase/EndToEndTest/Auth/AuthServiceCollectionExtensions.cs b/src/BuildingBlocks/TestBase/EndToEndTest/Auth/AuthServiceCollectionExtensions.cs
new file mode 100644
index 0000000..21b02a5
--- /dev/null
+++ b/src/BuildingBlocks/TestBase/EndToEndTest/Auth/AuthServiceCollectionExtensions.cs
@@ -0,0 +1,25 @@
+using Microsoft.AspNetCore.Authentication;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.Extensions.DependencyInjection;
+
+namespace BuildingBlocks.TestBase.EndToEndTest.Auth;
+
+//ref: https://blog.joaograssi.com/posts/2021/asp-net-core-testing-permission-protected-api-endpoints/
+public static class AuthServiceCollectionExtensions
+{
+ public static AuthenticationBuilder AddTestAuthentication(
+ this IServiceCollection services)
+ {
+ services.AddAuthorization(options =>
+ {
+ // AuthConstants.Scheme is just a scheme we define. I called it "TestAuth"
+ options.DefaultPolicy = new AuthorizationPolicyBuilder("Test")
+ .RequireAuthenticatedUser()
+ .Build();
+ });
+
+ // Register our custom authentication handler
+ return services.AddAuthentication("Test")
+ .AddScheme("Test", options => { });
+ }
+}
diff --git a/src/BuildingBlocks/TestBase/EndToEndTest/Auth/MockAuthUser.cs b/src/BuildingBlocks/TestBase/EndToEndTest/Auth/MockAuthUser.cs
new file mode 100644
index 0000000..6359297
--- /dev/null
+++ b/src/BuildingBlocks/TestBase/EndToEndTest/Auth/MockAuthUser.cs
@@ -0,0 +1,9 @@
+using System.Security.Claims;
+
+namespace BuildingBlocks.TestBase.EndToEndTest.Auth;
+
+public class MockAuthUser
+{
+ public List Claims { get; }
+ public MockAuthUser(params Claim[] claims) => Claims = claims.ToList();
+}
diff --git a/src/BuildingBlocks/TestBase/EndToEndTest/Auth/TestAuthHandler.cs b/src/BuildingBlocks/TestBase/EndToEndTest/Auth/TestAuthHandler.cs
new file mode 100644
index 0000000..1dfbe69
--- /dev/null
+++ b/src/BuildingBlocks/TestBase/EndToEndTest/Auth/TestAuthHandler.cs
@@ -0,0 +1,41 @@
+using System.Security.Claims;
+using System.Text.Encodings.Web;
+using Microsoft.AspNetCore.Authentication;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Options;
+
+namespace BuildingBlocks.TestBase.EndToEndTest.Auth;
+
+//ref: https://blog.joaograssi.com/posts/2021/asp-net-core-testing-permission-protected-api-endpoints/
+public class TestAuthHandler : AuthenticationHandler
+{
+ private readonly MockAuthUser _mockAuthUser;
+
+ public TestAuthHandler(
+ IOptionsMonitor options,
+ ILoggerFactory logger,
+ UrlEncoder encoder,
+ ISystemClock clock,
+ MockAuthUser mockAuthUser)
+ : base(options, logger, encoder, clock)
+ {
+ // 1. We get a "mock" user instance here via DI.
+ // we'll see how this work later, don't worry
+ _mockAuthUser = mockAuthUser;
+ }
+
+ protected override Task HandleAuthenticateAsync()
+ {
+ if (_mockAuthUser.Claims.Count == 0)
+ return Task.FromResult(AuthenticateResult.Fail("Mock auth user not configured."));
+
+ // 2. Create the principal and the ticket
+ var identity = new ClaimsIdentity(_mockAuthUser.Claims, "Test");
+ var principal = new ClaimsPrincipal(identity);
+ var ticket = new AuthenticationTicket(principal, "Test");
+
+ // 3. Authenticate the request
+ var result = AuthenticateResult.Success(ticket);
+ return Task.FromResult(result);
+ }
+}
diff --git a/src/BuildingBlocks/TestBase/EndToEndTest/EndToEndTestBase.cs b/src/BuildingBlocks/TestBase/EndToEndTest/EndToEndTestBase.cs
new file mode 100644
index 0000000..a4bf04a
--- /dev/null
+++ b/src/BuildingBlocks/TestBase/EndToEndTest/EndToEndTestBase.cs
@@ -0,0 +1,46 @@
+using System.Net.Http.Json;
+using BuildingBlocks.Mongo;
+using BuildingBlocks.TestBase.IntegrationTest;
+using BuildingBlocks.Web;
+using Microsoft.EntityFrameworkCore;
+using Xunit.Abstractions;
+
+namespace BuildingBlocks.TestBase.EndToEndTest;
+
+public class EndToEndTestBase :
+ IntegrationTestBase
+ where TWContext : DbContext
+ where TRContext : MongoDbContext
+ where TEntryPoint : class
+{
+ public EndToEndTestBase(
+ IntegrationTestFactory sharedFixture,
+ ITestOutputHelper outputHelper = null)
+ : base(sharedFixture, outputHelper)
+ {
+ }
+
+ public async Task GetAsync(string requestUrl, CancellationToken cancellationToken = default)
+ {
+ return await Fixture.HttpClient.GetFromJsonAsync(requestUrl, cancellationToken: cancellationToken);
+ }
+
+ public async Task PostAsync(string requestUrl, TRequest request,
+ CancellationToken cancellationToken = default)
+ {
+ return await Fixture.HttpClient.PostAsJsonAsync(requestUrl, request, cancellationToken);
+ }
+
+ public async Task PutAsync(
+ string requestUrl,
+ TRequest request,
+ CancellationToken cancellationToken = default)
+ {
+ return await Fixture.HttpClient.PutAsJsonAsync(requestUrl, request, cancellationToken);
+ }
+
+ public async Task Delete(string requestUrl, CancellationToken cancellationToken = default)
+ {
+ await Fixture.HttpClient.DeleteAsync(requestUrl, cancellationToken);
+ }
+}
diff --git a/src/BuildingBlocks/TestBase/IntegrationTestBase.cs b/src/BuildingBlocks/TestBase/IntegrationTest/IntegrationTestBase.cs
similarity index 96%
rename from src/BuildingBlocks/TestBase/IntegrationTestBase.cs
rename to src/BuildingBlocks/TestBase/IntegrationTest/IntegrationTestBase.cs
index 2afdc07..b07ee8b 100644
--- a/src/BuildingBlocks/TestBase/IntegrationTestBase.cs
+++ b/src/BuildingBlocks/TestBase/IntegrationTest/IntegrationTestBase.cs
@@ -1,10 +1,12 @@
-using Ardalis.GuardClauses;
+using System.Security.Claims;
+using Ardalis.GuardClauses;
using BuildingBlocks.Core.Event;
using BuildingBlocks.Core.Model;
using BuildingBlocks.EFCore;
using BuildingBlocks.MassTransit;
using BuildingBlocks.Mongo;
using BuildingBlocks.PersistMessageProcessor;
+using BuildingBlocks.TestBase.EndToEndTest.Auth;
using BuildingBlocks.Web;
using DotNet.Testcontainers.Containers;
using EasyNetQ.Management.Client;
@@ -27,8 +29,9 @@ using Respawn.Graph;
using Serilog;
using Xunit;
using Xunit.Abstractions;
+using ILogger = Serilog.ILogger;
-namespace BuildingBlocks.TestBase;
+namespace BuildingBlocks.TestBase.IntegrationTest;
public class IntegrationTestFactory : IAsyncLifetime
where TEntryPoint : class
@@ -43,9 +46,7 @@ public class IntegrationTestFactory : IAsyncLifetime
private ITestHarness TestHarness => ServiceProvider?.GetTestHarness();
public HttpClient HttpClient => _factory?.CreateClient();
-
public GrpcChannel Channel => GrpcChannel.ForAddress(HttpClient.BaseAddress!, new GrpcChannelOptions { HttpClient = HttpClient });
-
public Action TestRegistrationServices { get; set; }
public IServiceProvider ServiceProvider => _factory?.Services;
public IConfiguration Configuration => _factory?.Services.GetRequiredService();
@@ -63,6 +64,11 @@ public class IntegrationTestFactory : IAsyncLifetime
{
TestRegistrationServices?.Invoke(services);
services.ReplaceSingleton(AddHttpContextAccessorMock);
+ // Add our custom handler
+ services.AddTestAuthentication();
+
+ // Register a default user, so all requests have it by default
+ services.AddScoped(_ => GetMockUser());
});
});
}
@@ -255,6 +261,10 @@ public class IntegrationTestFactory : IAsyncLifetime
return httpContextAccessorMock;
}
+
+ private MockAuthUser GetMockUser() =>
+ new MockAuthUser(new Claim("sub", Guid.NewGuid().ToString()),
+ new Claim("email", "sam@test.com"));
}
public class IntegrationTestFactory : IntegrationTestFactory
@@ -514,4 +524,3 @@ public abstract class IntegrationTestBase : I
public IntegrationTestFactory Fixture { get; }
}
-
diff --git a/src/BuildingBlocks/Web/HttpClientExtensions.cs b/src/BuildingBlocks/Web/HttpClientExtensions.cs
new file mode 100644
index 0000000..d29243f
--- /dev/null
+++ b/src/BuildingBlocks/Web/HttpClientExtensions.cs
@@ -0,0 +1,36 @@
+using System.Net.Http.Json;
+
+namespace BuildingBlocks.Web;
+
+public static class HttpClientExtensions
+{
+ public static async Task
+ PostAsJsonAsync(
+ this HttpClient httpClient,
+ string requestUri,
+ TRequest request,
+ CancellationToken cancellationToken = default)
+ {
+ var responseMessage =
+ await httpClient.PostAsJsonAsync(requestUri, request, cancellationToken: cancellationToken);
+
+ var result = await responseMessage.Content.ReadFromJsonAsync(cancellationToken: cancellationToken);
+
+ return result;
+ }
+
+ public static async Task
+ PutAsJsonAsync(
+ this HttpClient httpClient,
+ string requestUri,
+ TRequest request,
+ CancellationToken cancellationToken = default)
+ {
+ var responseMessage =
+ await httpClient.PutAsJsonAsync(requestUri, request, cancellationToken: cancellationToken);
+
+ var result = await responseMessage.Content.ReadFromJsonAsync(cancellationToken: cancellationToken);
+
+ return result;
+ }
+}
diff --git a/src/Services/Booking/tests/IntegrationTest/Booking/Features/CreateBookingTests.cs b/src/Services/Booking/tests/IntegrationTest/Booking/Features/CreateBookingTests.cs
index 30fe75c..4dff3c2 100644
--- a/src/Services/Booking/tests/IntegrationTest/Booking/Features/CreateBookingTests.cs
+++ b/src/Services/Booking/tests/IntegrationTest/Booking/Features/CreateBookingTests.cs
@@ -4,7 +4,7 @@ using Booking.Api;
using Booking.Data;
using BuildingBlocks.Contracts.EventBus.Messages;
using BuildingBlocks.PersistMessageProcessor.Data;
-using BuildingBlocks.TestBase;
+using BuildingBlocks.TestBase.IntegrationTest;
using Flight;
using FluentAssertions;
using Grpc.Core;
diff --git a/src/Services/Booking/tests/IntegrationTest/BookingIntegrationTestBase.cs b/src/Services/Booking/tests/IntegrationTest/BookingIntegrationTestBase.cs
index 7e8dc96..3ac53e2 100644
--- a/src/Services/Booking/tests/IntegrationTest/BookingIntegrationTestBase.cs
+++ b/src/Services/Booking/tests/IntegrationTest/BookingIntegrationTestBase.cs
@@ -1,7 +1,7 @@
using Booking.Api;
using Booking.Data;
using BuildingBlocks.PersistMessageProcessor.Data;
-using BuildingBlocks.TestBase;
+using BuildingBlocks.TestBase.IntegrationTest;
using Xunit;
namespace Integration.Test;
diff --git a/src/Services/Flight/tests/IntegrationTest/Aircraft/Features/CreateAircraftTests.cs b/src/Services/Flight/tests/IntegrationTest/Aircraft/Features/CreateAircraftTests.cs
index 940b910..caff7f1 100644
--- a/src/Services/Flight/tests/IntegrationTest/Aircraft/Features/CreateAircraftTests.cs
+++ b/src/Services/Flight/tests/IntegrationTest/Aircraft/Features/CreateAircraftTests.cs
@@ -1,6 +1,6 @@
using System.Threading.Tasks;
using BuildingBlocks.Contracts.EventBus.Messages;
-using BuildingBlocks.TestBase;
+using BuildingBlocks.TestBase.IntegrationTest;
using Flight.Aircrafts.Features.CreateAircraft.Commands.V1.Reads;
using Flight.Api;
using Flight.Data;
diff --git a/src/Services/Flight/tests/IntegrationTest/Airport/Features/CreateAirportTests.cs b/src/Services/Flight/tests/IntegrationTest/Airport/Features/CreateAirportTests.cs
index 53c0964..9c0b1ac 100644
--- a/src/Services/Flight/tests/IntegrationTest/Airport/Features/CreateAirportTests.cs
+++ b/src/Services/Flight/tests/IntegrationTest/Airport/Features/CreateAirportTests.cs
@@ -1,6 +1,6 @@
using System.Threading.Tasks;
using BuildingBlocks.Contracts.EventBus.Messages;
-using BuildingBlocks.TestBase;
+using BuildingBlocks.TestBase.IntegrationTest;
using Flight.Airports.Features.CreateAirport.Commands.V1.Reads;
using Flight.Api;
using Flight.Data;
diff --git a/src/Services/Flight/tests/IntegrationTest/Flight/Features/CreateFlightTests.cs b/src/Services/Flight/tests/IntegrationTest/Flight/Features/CreateFlightTests.cs
index 0c52ea4..00981fb 100644
--- a/src/Services/Flight/tests/IntegrationTest/Flight/Features/CreateFlightTests.cs
+++ b/src/Services/Flight/tests/IntegrationTest/Flight/Features/CreateFlightTests.cs
@@ -1,6 +1,6 @@
using System.Threading.Tasks;
using BuildingBlocks.Contracts.EventBus.Messages;
-using BuildingBlocks.TestBase;
+using BuildingBlocks.TestBase.IntegrationTest;
using Flight.Api;
using Flight.Data;
using Flight.Flights.Features.CreateFlight.Commands.V1.Reads;
diff --git a/src/Services/Flight/tests/IntegrationTest/Flight/Features/DeleteFlightTests.cs b/src/Services/Flight/tests/IntegrationTest/Flight/Features/DeleteFlightTests.cs
index 0242aa8..5b0c42d 100644
--- a/src/Services/Flight/tests/IntegrationTest/Flight/Features/DeleteFlightTests.cs
+++ b/src/Services/Flight/tests/IntegrationTest/Flight/Features/DeleteFlightTests.cs
@@ -1,7 +1,7 @@
using System.Linq;
using System.Threading.Tasks;
using BuildingBlocks.Contracts.EventBus.Messages;
-using BuildingBlocks.TestBase;
+using BuildingBlocks.TestBase.IntegrationTest;
using Flight.Api;
using Flight.Data;
using Flight.Flights.Features.DeleteFlight.Commands.V1;
diff --git a/src/Services/Flight/tests/IntegrationTest/Flight/Features/GetAvailableFlightsTests.cs b/src/Services/Flight/tests/IntegrationTest/Flight/Features/GetAvailableFlightsTests.cs
index 83b7c6f..785d0dc 100644
--- a/src/Services/Flight/tests/IntegrationTest/Flight/Features/GetAvailableFlightsTests.cs
+++ b/src/Services/Flight/tests/IntegrationTest/Flight/Features/GetAvailableFlightsTests.cs
@@ -1,6 +1,6 @@
using System.Linq;
using System.Threading.Tasks;
-using BuildingBlocks.TestBase;
+using BuildingBlocks.TestBase.IntegrationTest;
using Flight.Api;
using Flight.Data;
using Flight.Flights.Features.CreateFlight.Commands.V1.Reads;
diff --git a/src/Services/Flight/tests/IntegrationTest/Flight/Features/GetFlightByIdTests.cs b/src/Services/Flight/tests/IntegrationTest/Flight/Features/GetFlightByIdTests.cs
index 39880ae..9886680 100644
--- a/src/Services/Flight/tests/IntegrationTest/Flight/Features/GetFlightByIdTests.cs
+++ b/src/Services/Flight/tests/IntegrationTest/Flight/Features/GetFlightByIdTests.cs
@@ -1,5 +1,5 @@
using System.Threading.Tasks;
-using BuildingBlocks.TestBase;
+using BuildingBlocks.TestBase.IntegrationTest;
using Flight;
using Flight.Api;
using Flight.Data;
diff --git a/src/Services/Flight/tests/IntegrationTest/Flight/Features/UpdateFlightTests.cs b/src/Services/Flight/tests/IntegrationTest/Flight/Features/UpdateFlightTests.cs
index 18184d1..7b49d4d 100644
--- a/src/Services/Flight/tests/IntegrationTest/Flight/Features/UpdateFlightTests.cs
+++ b/src/Services/Flight/tests/IntegrationTest/Flight/Features/UpdateFlightTests.cs
@@ -1,6 +1,6 @@
using System.Threading.Tasks;
using BuildingBlocks.Contracts.EventBus.Messages;
-using BuildingBlocks.TestBase;
+using BuildingBlocks.TestBase.IntegrationTest;
using Flight.Api;
using Flight.Data;
using Flight.Flights.Features.UpdateFlight.Commands.V1.Reads;
diff --git a/src/Services/Flight/tests/IntegrationTest/FlightIntegrationTestBase.cs b/src/Services/Flight/tests/IntegrationTest/FlightIntegrationTestBase.cs
index 6743eb7..73a93b0 100644
--- a/src/Services/Flight/tests/IntegrationTest/FlightIntegrationTestBase.cs
+++ b/src/Services/Flight/tests/IntegrationTest/FlightIntegrationTestBase.cs
@@ -1,4 +1,4 @@
-using BuildingBlocks.TestBase;
+using BuildingBlocks.TestBase.IntegrationTest;
using Flight.Api;
using Flight.Data;
using Xunit;
diff --git a/src/Services/Flight/tests/IntegrationTest/Seat/Features/GetAvailableSeatsTests.cs b/src/Services/Flight/tests/IntegrationTest/Seat/Features/GetAvailableSeatsTests.cs
index 05e671b..34f2e50 100644
--- a/src/Services/Flight/tests/IntegrationTest/Seat/Features/GetAvailableSeatsTests.cs
+++ b/src/Services/Flight/tests/IntegrationTest/Seat/Features/GetAvailableSeatsTests.cs
@@ -1,5 +1,5 @@
using System.Threading.Tasks;
-using BuildingBlocks.TestBase;
+using BuildingBlocks.TestBase.IntegrationTest;
using Flight;
using Flight.Api;
using Flight.Data;
diff --git a/src/Services/Flight/tests/IntegrationTest/Seat/Features/ReserveSeatTests.cs b/src/Services/Flight/tests/IntegrationTest/Seat/Features/ReserveSeatTests.cs
index b6c6ce9..8d6aa84 100644
--- a/src/Services/Flight/tests/IntegrationTest/Seat/Features/ReserveSeatTests.cs
+++ b/src/Services/Flight/tests/IntegrationTest/Seat/Features/ReserveSeatTests.cs
@@ -1,5 +1,5 @@
using System.Threading.Tasks;
-using BuildingBlocks.TestBase;
+using BuildingBlocks.TestBase.IntegrationTest;
using Flight;
using Flight.Api;
using Flight.Data;
diff --git a/src/Services/Identity/tests/IntegrationTest/Identity/Features/RegisterNewUserTests.cs b/src/Services/Identity/tests/IntegrationTest/Identity/Features/RegisterNewUserTests.cs
index 374d9b4..159e282 100644
--- a/src/Services/Identity/tests/IntegrationTest/Identity/Features/RegisterNewUserTests.cs
+++ b/src/Services/Identity/tests/IntegrationTest/Identity/Features/RegisterNewUserTests.cs
@@ -1,6 +1,6 @@
using System.Threading.Tasks;
using BuildingBlocks.Contracts.EventBus.Messages;
-using BuildingBlocks.TestBase;
+using BuildingBlocks.TestBase.IntegrationTest;
using FluentAssertions;
using Identity.Api;
using Identity.Data;
diff --git a/src/Services/Identity/tests/IntegrationTest/IdentityIntegrationTestBase.cs b/src/Services/Identity/tests/IntegrationTest/IdentityIntegrationTestBase.cs
index 61df267..4e73c48 100644
--- a/src/Services/Identity/tests/IntegrationTest/IdentityIntegrationTestBase.cs
+++ b/src/Services/Identity/tests/IntegrationTest/IdentityIntegrationTestBase.cs
@@ -1,4 +1,4 @@
-using BuildingBlocks.TestBase;
+using BuildingBlocks.TestBase.IntegrationTest;
using Identity.Api;
using Identity.Data;
using Xunit;
diff --git a/src/Services/Passenger/tests/IntegrationTest/Passenger/Features/CompleteRegisterPassengerTests.cs b/src/Services/Passenger/tests/IntegrationTest/Passenger/Features/CompleteRegisterPassengerTests.cs
index 41879c9..eee63c8 100644
--- a/src/Services/Passenger/tests/IntegrationTest/Passenger/Features/CompleteRegisterPassengerTests.cs
+++ b/src/Services/Passenger/tests/IntegrationTest/Passenger/Features/CompleteRegisterPassengerTests.cs
@@ -1,6 +1,6 @@
using System.Threading.Tasks;
using BuildingBlocks.Contracts.EventBus.Messages;
-using BuildingBlocks.TestBase;
+using BuildingBlocks.TestBase.IntegrationTest;
using FluentAssertions;
using Integration.Test.Fakes;
using Passenger.Api;
diff --git a/src/Services/Passenger/tests/IntegrationTest/Passenger/Features/GetPassengerByIdTests.cs b/src/Services/Passenger/tests/IntegrationTest/Passenger/Features/GetPassengerByIdTests.cs
index dec0350..dde9ae7 100644
--- a/src/Services/Passenger/tests/IntegrationTest/Passenger/Features/GetPassengerByIdTests.cs
+++ b/src/Services/Passenger/tests/IntegrationTest/Passenger/Features/GetPassengerByIdTests.cs
@@ -1,5 +1,5 @@
using System.Threading.Tasks;
-using BuildingBlocks.TestBase;
+using BuildingBlocks.TestBase.IntegrationTest;
using FluentAssertions;
using Integration.Test.Fakes;
using Passenger;
diff --git a/src/Services/Passenger/tests/IntegrationTest/PassengerIntegrationTestBase.cs b/src/Services/Passenger/tests/IntegrationTest/PassengerIntegrationTestBase.cs
index 2a627bb..9effed9 100644
--- a/src/Services/Passenger/tests/IntegrationTest/PassengerIntegrationTestBase.cs
+++ b/src/Services/Passenger/tests/IntegrationTest/PassengerIntegrationTestBase.cs
@@ -1,4 +1,4 @@
-using BuildingBlocks.TestBase;
+using BuildingBlocks.TestBase.IntegrationTest;
using Passenger.Api;
using Passenger.Data;
using Xunit;