예제 #1
0
        public void ReturnStringNotNullWhenRequestShowMeCode()
        {
            InterestCalculatorModel icModel = new InterestCalculatorModel();
            var result = icModel.ShowMeCode();

            Assert.NotNull(result);
            Assert.IsType <String>(result);
        }
예제 #2
0
        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);
        }