Ejemplo n.º 1
0
        public async Task TestUrlGitHub()
        {
            var options = Options.Create <ServiceSettings>(_serviceSettings);

            var controller = new CalcularController(options);

            // Act
            var response = await controller.GetUrlGitHub() as ObjectResult;

            var value = response.Value;

            // Assert
            Assert.Equal(value, _myGitHub);
        }
Ejemplo n.º 2
0
        public async Task TestCalculoJuros()
        {
            var options = Options.Create <ServiceSettings>(_serviceSettings);

            var controller = new CalcularController(options);

            // Arrange
            var valorInicial = 100;
            var tempoMeses   = 5;

            // Act
            var response = await controller.GetJuros(valorInicial, tempoMeses) as ObjectResult;

            var value = response.Value;

            // Assert
            Assert.Equal(value, (decimal)105.10);
        }