public async Task Transfer_between_accounts_negative_value()
        {
            //Arrange
            var transferenciaController = new TransferenciaController(_context);

            var transferencia = new TransferenciaDTO()
            {
                Origem = new ContaCorrente()
                {
                    Agencia     = "5207",
                    NumeroConta = "000000000015489",
                    Digito      = "02"
                },
                Destino = new ContaCorrente()
                {
                    Agencia     = "9512",
                    NumeroConta = "000000000026841",
                    Digito      = "12"
                },
                Valor = -300
            };

            //Act
            var actionResult = await transferenciaController.EnviaDinheiroAsync(transferencia) as BadRequestResult;

            //Assert
            Assert.Equal(actionResult.StatusCode, (int)System.Net.HttpStatusCode.BadRequest);
        }
Beispiel #2
0
        public void HayFondos()
        {
            //Arrange
            TransferenciaController controller = new TransferenciaController();

            //Act
            bool existe = controller.HayFondos("Javier", 1.2);

            // assert
            Assert.IsTrue(existe, "Numero de cuenta destino no existe");
        }
Beispiel #3
0
        public void ExisteDestino()
        {
            //Arrange
            TransferenciaController controller = new TransferenciaController();

            //Act
            bool existe = controller.ExisteDestino("DTQ5Q");

            // assert
            Assert.IsTrue(existe, "Numero de cuenta destino no existe");
        }