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

            var bo = new ProfileBO();

            var resList = bo.ListAsync().Result;

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

            var bo = new ProfileBO();

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

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

            var list = bo.ListUndeletedAsync().Result;

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

            var bo = new ProfileBO();

            var resList = bo.ListAsync().Result;

            var item = resList.Result.FirstOrDefault();

            item.Country = "Spain";

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

            var list = bo.ListUndeletedAsync().Result;

            Assert.IsTrue(resList.Success && resUpdate.Success && list.Result.First().Country == "Spain");
        }