예제 #1
0
        public void TestListLennyouseUserAsync()
        {
            ContextSeeders.Seed();
            var bo      = new LennyouseUserBusinessObject();
            var resList = bo.ListAsync().Result;

            Assert.IsTrue(resList.Success && resList.Result.Count == 1);
        }
예제 #2
0
        public void TestDeleteLennyouseUserAsync()
        {
            ContextSeeders.Seed();
            var bo = new LennyouseUserBusinessObject();

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

            resList = bo.ListAsync().Result;

            Assert.IsTrue(resDelete.Success && resList.Success);
        }
예제 #3
0
        public void TestUpdateLennyouseUserAsync()
        {
            ContextSeeders.Seed();
            var lubo    = new LennyouseUserBusinessObject();
            var resList = lubo.List();
            var item    = resList.Result.FirstOrDefault();

            var _newLennyouseUser = new LennyouseUser(Guid.NewGuid());

            item.PersonId = _newLennyouseUser.PersonId;

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

            resList = lubo.ListAsync().Result;

            Assert.IsTrue(resList.Success && resUpdate.Success &&
                          resList.Result.First().PersonId == _newLennyouseUser.PersonId);
        }