コード例 #1
0
        public void TestListProposal()
        {
            ApplicationSeeder.Seed();

            var bo = new ProposalBO();

            var resList = bo.List();

            Assert.IsTrue(resList.Success && resList.Result.Count > 0);
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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");
        }