예제 #1
0
        public void TestListServiceAsync()
        {
            ApplicationSeeder.Seed();

            var bo = new ServiceBO();

            var resList = bo.ListAsync().Result;

            Assert.IsTrue(resList.Success && resList.Result.Count > 0);
        }
예제 #2
0
        public void TestDeleteServiceAsync()
        {
            ApplicationSeeder.Seed();

            var bo = new ServiceBO();

            var resList = bo.ListAsync().Result;
            var total   = resList.Result.Count;

            var resDelete = bo.Delete(resList.Result.First().Id);

            var list = bo.ListUndeletedAsync().Result;

            Assert.IsTrue(resDelete.Success && resList.Success && list.Result.Count == (total - 1));
        }
예제 #3
0
        public void TestUpdateServiceAsync()
        {
            ApplicationSeeder.Seed();

            var bo = new ServiceBO();

            var resList = bo.ListAsync().Result;

            var item = resList.Result.FirstOrDefault();

            item.IsActive = false;

            var resUpdate = bo.UpdateAsync(item).Result;

            var list = bo.ListUndeletedAsync().Result;

            Assert.IsTrue(resList.Success && resUpdate.Success && list.Result.First().IsActive == false);
        }