Ejemplo n.º 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 <uvw_User> >();
            results.Count().Should().Be(UoW.Users.Count());
        }
Ejemplo n.º 2
0
        public void Repo_Users_DeleteV1_Success()
        {
            var data = new TestDataFactory(UoW);

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

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

            UoW.Users.Delete(user);
            UoW.Commit();
        }
Ejemplo n.º 3
0
        public void Repo_Users_UpdateV1_Success()
        {
            var data = new TestDataFactory(UoW);

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

            var user = UoW.Users.Get(QueryExpressionFactory.GetQueryExpression <uvw_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 <uvw_User>();
        }