public void TestDeleteProposal() { ApplicationSeeder.Seed(); var bo = new ProposalBO(); var resList = bo.List(); var total = resList.Result.Count; var resDelete = bo.Delete(resList.Result.First().Id); var list = bo.ListUndeleted(); Assert.IsTrue(resDelete.Success && resList.Success && list.Result.Count == (total - 1)); }
public void TestUpdateProposal() { ApplicationSeeder.Seed(); var bo = new ProposalBO(); var resList = bo.List(); var item = resList.Result.FirstOrDefault(); item.Message = "Oi"; var resUpdate = bo.Update(item); var list = bo.ListUndeleted(); Assert.IsTrue(resList.Success && resUpdate.Success && list.Result.First().Message == "Oi"); }