From 0ce82d658e6e2f5f5e54093051fc2a0151bc28cc Mon Sep 17 00:00:00 2001 From: Craig Edmunds Date: Fri, 3 Jan 2025 10:37:29 +0000 Subject: [PATCH] Refactoring fixtures --- .../DecisionTests/ChedPSimpleTests.cs | 9 ++------- TestGenerator.IntegrationTesting.Backend/BaseTest.cs | 3 ++- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Btms.Backend.IntegrationTests/DecisionTests/ChedPSimpleTests.cs b/Btms.Backend.IntegrationTests/DecisionTests/ChedPSimpleTests.cs index 41f78ae9..904b4995 100644 --- a/Btms.Backend.IntegrationTests/DecisionTests/ChedPSimpleTests.cs +++ b/Btms.Backend.IntegrationTests/DecisionTests/ChedPSimpleTests.cs @@ -16,14 +16,9 @@ namespace Btms.Backend.IntegrationTests.DecisionTests; // public class ChedPSimpleTests(InMemoryScenarioApplicationFactory factory, ITestOutputHelper testOutputHelper) // : BaseApiTests(factory, testOutputHelper, "DecisionTests"), IClassFixture> -public class ChedPSimpleTests(ITestOutputHelper testOutputHelper, +public class ChedPSimpleTests(ITestOutputHelper testOutputHelper, BackendFixture backendFixture, TestGeneratorFixture generatorFixture) // BackendGeneratorFixture backendGeneratorFixture) - BackendFixture backendFixture, - TestGeneratorFixture generatorFixture) - : BaseTest(testOutputHelper, generatorFixture, backendFixture), - IClassFixture>, - IClassFixture> - + : BaseTest(testOutputHelper, generatorFixture, backendFixture) { [Fact] diff --git a/TestGenerator.IntegrationTesting.Backend/BaseTest.cs b/TestGenerator.IntegrationTesting.Backend/BaseTest.cs index 3358c1de..8464d57c 100644 --- a/TestGenerator.IntegrationTesting.Backend/BaseTest.cs +++ b/TestGenerator.IntegrationTesting.Backend/BaseTest.cs @@ -21,7 +21,6 @@ protected BaseTest(ITestOutputHelper testOutputHelper, BackendFixture backendFixture ) { - Client = backendFixture.BtmsClient; TestGeneratorFixture = testGeneratorFixture; BackendFixture = backendFixture; @@ -29,10 +28,12 @@ BackendFixture backendFixture // TestGeneratorFixture = backendGeneratorFixture.TestGenerator; // BackendFixture = backendGeneratorFixture.Backend; TestOutputHelper = testOutputHelper; + backendFixture.TestOutputHelper = testOutputHelper; backendFixture.DatabaseName = GetType().Name; backendFixture.Init(GetType().Name); + Client = backendFixture.BtmsClient; var data = TestGeneratorFixture.GenerateTestData(); LoadedData = BackendFixture