public void ReturnStringNotNullWhenRequestShowMeCode() { InterestCalculatorModel icModel = new InterestCalculatorModel(); var result = icModel.ShowMeCode(); Assert.NotNull(result); Assert.IsType <String>(result); }
public async Task ShowMeTheCode() { var client = _factory.CreateClient(); var response = await client.GetAsync("interestCalculator/showmethecode"); var valueString = await response.Content.ReadAsStringAsync(); InterestCalculatorModel icModel = new InterestCalculatorModel(); response.EnsureSuccessStatusCode(); Assert.Equal(icModel.ShowMeCode(), valueString); }