Пример #1
0
        public void Repo_Users_GetV1_Success()
        {
            var data = new TestDataFactory(UoW);

            data.Destroy();
            data.CreateUsers();

            var results = UoW.Users.Get();

            results.Should().BeAssignableTo <IEnumerable <tbl_User> >();
            results.Count().Should().Be(UoW.Users.Count());
        }
Пример #2
0
        public void Repo_Users_DeleteV1_Success()
        {
            var data = new TestDataFactory(UoW);

            data.Destroy();
            data.CreateUsers();

            var user = UoW.Users.Get(QueryExpressionFactory.GetQueryExpression <tbl_User>()
                                     .Where(x => x.UserName == TestDefaultConstants.UserName).ToLambda()).Single();

            UoW.Users.Delete(user);
            UoW.Commit();
        }
Пример #3
0
        public void Repo_Users_UpdateV1_Success()
        {
            var data = new TestDataFactory(UoW);

            data.Destroy();
            data.CreateUsers();

            var user = UoW.Users.Get(QueryExpressionFactory.GetQueryExpression <tbl_User>()
                                     .Where(x => x.UserName == TestDefaultConstants.UserName).ToLambda()).Single();

            user.FirstName += "(Updated)";
            user.LastName  += "(Updated)";

            var result = UoW.Users.Update(user);

            UoW.Commit();

            result.Should().BeAssignableTo <tbl_User>();
        }