Exemplo n.º 1
0
        public async Task EditIncome_WrongIDIncome_ReturnProperlyMessage()
        {
            var    testGuidID     = new Guid();
            Income incomeToUpdate = new Income
            {
                Title = "Income21",
                Value = 15
            };
            var incomeUpdated = await IncomesControl.UpdateIncome(incomeToUpdate, testGuidID);

            Assert.AreEqual("Income with provided ID hasn't been found", incomeUpdated.ClientError);
        }
Exemplo n.º 2
0
        public async Task EditIncome_CorrectData_ReturnSuccessMessage()
        {
            List <Income> incomes = await databaseContext.Incomes.ToListAsync();

            Income incomeToUpdate = new Income
            {
                Title = "Income21",
                Value = 15
            };

            var incomeUpdated = await IncomesControl.UpdateIncome(incomeToUpdate, incomes[0].Id);

            Assert.AreEqual("Income has been changed", incomeUpdated.SuccessMessage);
        }