public void Post(int id, [FromBody] BudgetTO budget) { bool exists = personModel.Exists(id); if (exists) { budgetModel.CreateBudget(id, budget.DevCount, budget.DesCount, budget.SMCount, budget.POCount, budget.Duration); } }
public void GetBudgetsTest() { var model = new BudgetModel(context); var personModel = new PersonModel(context); var person = personModel.CreatePerson("FULANO", "DE TAL", "12345678909", "*****@*****.**", "9999999999"); model.CreateBudget(person.Id, 1, 1, 1, 1, 1); Assert.NotEmpty(model.GetBudgets(person.Id)); }