Esempio n. 1
0
        public void TestListClient()
        {
            ApplicationSeeder.Seed();

            var bo = new ClientBO();

            var resList = bo.List();

            Assert.IsTrue(resList.Success && resList.Result.Count > 0);
        }
Esempio n. 2
0
        public void TestDeleteClient()
        {
            ApplicationSeeder.Seed();

            var bo = new ClientBO();

            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));
        }
Esempio n. 3
0
        public void TestUpdateClient()
        {
            ApplicationSeeder.Seed();

            var bo        = new ClientBO();
            var foreignBO = new ProfileBO();

            var resList = bo.List();

            var item = resList.Result.FirstOrDefault();

            item.ProfileId = foreignBO.ListUndeleted().Result.Last().Id;

            var resUpdate = bo.Update(item);

            var list = bo.ListUndeleted();

            Assert.IsTrue(resList.Success && resUpdate.Success && list.Result.First().ProfileId == foreignBO.ListUndeleted().Result.Last().Id);
        }