コード例 #1
0
        private DTOs.Debit CreateDTO()
        {
            DTOs.Debit debit = new DTOs.Debit
            {
                CardId = "9876543210987654",
                Code   = "2100-B",
                Value  = 15.00M
            };

            return(debit);
        }
コード例 #2
0
        public async Task PostDebitBadRequestTest()
        {
            Mappers.MapperConfig.RegisterMappings();
            DebitsController debitsController = new DebitsController();

            var dtoDebit = new DTOs.Debit
            {
                CardId = "0",
                Code   = "0",
                Value  = 0M
            };

            var result = await debitsController.PostDebit(dtoDebit) as BadRequestErrorMessageResult;

            Assert.AreEqual("Requisiçâo inválida.", result.Message);
        }