/// <summary> /// Create mystic code game data endpoints as WireMock stubs /// </summary> private void AddMysticCodeStubs(WireMockFixture wiremockFixture) { // build mock mystic code response MysticCodeNiceJson mockResponse = LoadTestData.DeserializeMysticCodeJson(_region, $"{ARTIC_ID}-Artic.json"); LoadTestData.CreateNiceWireMockStub(wiremockFixture, _region, "MC", ARTIC_ID, mockResponse); mockResponse = LoadTestData.DeserializeMysticCodeJson(_region, $"{PLUGSUIT_ID}-CombatUniform.json"); LoadTestData.CreateNiceWireMockStub(wiremockFixture, _region, "MC", PLUGSUIT_ID, mockResponse); mockResponse = LoadTestData.DeserializeMysticCodeJson(_region, $"{FRAGMENT_2004_ID}-Fragment2004.json"); LoadTestData.CreateNiceWireMockStub(wiremockFixture, _region, "MC", FRAGMENT_2004_ID, mockResponse); }
public async Task GetMysticCodeInfo() { _wiremockFixture.CheckIfMockServerInUse(); MysticCodeNiceJson mockResponse = new MysticCodeNiceJson { Id = 1 }; LoadTestData.CreateNiceWireMockStub(_wiremockFixture, REGION, "MC", "1", mockResponse); using (var scope = _container.BeginLifetimeScope()) { ScopedClasses resolvedClasses = AutofacUtility.ResolveScope(scope); MysticCodeNiceJson response = await resolvedClasses.AtlasAcademyClient.GetMysticCodeInfo("1"); response.Id.Should().Be(1); } }