Skip to content

Commit

Permalink
Refactoring fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
craigedmunds committed Jan 3, 2025
1 parent 534daff commit 0ce82d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,9 @@ namespace Btms.Backend.IntegrationTests.DecisionTests;
// public class ChedPSimpleTests(InMemoryScenarioApplicationFactory<SimpleMatchScenarioGenerator> factory, ITestOutputHelper testOutputHelper)
// : BaseApiTests(factory, testOutputHelper, "DecisionTests"), IClassFixture<InMemoryScenarioApplicationFactory<SimpleMatchScenarioGenerator>>

public class ChedPSimpleTests(ITestOutputHelper testOutputHelper,
public class ChedPSimpleTests(ITestOutputHelper testOutputHelper, BackendFixture backendFixture, TestGeneratorFixture generatorFixture)
// BackendGeneratorFixture<CrNoMatchSingleItemWithDecisionScenarioGenerator> backendGeneratorFixture)
BackendFixture<SimpleMatchScenarioGenerator> backendFixture,
TestGeneratorFixture<SimpleMatchScenarioGenerator> generatorFixture)
: BaseTest<SimpleMatchScenarioGenerator>(testOutputHelper, generatorFixture, backendFixture),
IClassFixture<BackendFixture<SimpleMatchScenarioGenerator>>,
IClassFixture<TestGeneratorFixture<SimpleMatchScenarioGenerator>>

: BaseTest<SimpleMatchScenarioGenerator>(testOutputHelper, generatorFixture, backendFixture)
{

[Fact]
Expand Down
3 changes: 2 additions & 1 deletion TestGenerator.IntegrationTesting.Backend/BaseTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,19 @@ protected BaseTest(ITestOutputHelper testOutputHelper,
BackendFixture backendFixture
)
{
Client = backendFixture.BtmsClient;
TestGeneratorFixture = testGeneratorFixture;
BackendFixture = backendFixture;

// Client = backendGeneratorFixture.Backend.BtmsClient;
// 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<T>();
LoadedData = BackendFixture
Expand Down

0 comments on commit 0ce82d6

Please sign in to comment.