public async Task Generate_ReturnsOk_IfRequestIsCorrect() { var request = new GenerationRequest { DinosaursCount = 1, SpeciesCount = 1, }; var result = await _api.Generate <string>(request); Assert.AreEqual(result.StatusCode, HttpStatusCode.OK); }
public async Task GetAll_ReturnsFullPage_IfRequiredItemsWasGenerated() { const int expectedCount = 5; var generationRequest = new GenerationRequest { SpeciesCount = 1, DinosaursCount = expectedCount, }; await _generatorApi.Generate <GenerationResponse>(generationRequest); var result = await _dinosaursApi.GetAll <DinosaursResponse>(1, expectedCount); Assert.AreEqual(result.Content.Items.Count, expectedCount); }
public async Task GetParkInfo_ReturnsOk_IfDataGenerated() { await _generationApi.Generate <string>(new GenerationRequest { SpeciesCount = 1, DinosaursCount = 10 }); var result = await _informationApi.GetParkInfo <string>(); Assert.AreEqual(HttpStatusCode.OK, result.StatusCode, result.Error?.Content ?? result.Content); }