public async Task CodeUnderTestReturnsCorrectValue(HttpStatusCode statusCode, bool expectedResult) { //Arrange bool result; var codeToTest = new ExternalApiCaller(); using (var httpTest = new HttpTest()) { httpTest.RespondWith(statusCode.ToString(), (int)statusCode); //Act result = await codeToTest.MakeTheCall(); } //Assert Assert.That(result, Is.EqualTo(expectedResult)); }
public void Setup() { _httpTest = new HttpTest(); _codeToTest = new ExternalApiCaller(); }