示例#1
0
        public void SaveExistingUserToRepository()
        {
            UserModel userModel = new UserModel()
            {
                Login = "******",
                Password = "******",
                LastName = "Test",
                FirstName = "Test",
                BirthDate = DateTime.UtcNow,
                Email = "Test"
            };

            var repository = new UserRepository();
            Assert.IsNull(repository.AddUser(userModel));
        }
示例#2
0
        public void SaveNewUserToRepository()
        {
            UserModel userModel = new UserModel()
            {
                Login = "******" + Guid.NewGuid().ToString().Substring(0, 10),
                Password = Guid.NewGuid().ToString().Substring(0, 10),
                LastName = "Last Name",
                FirstName = "First Name",
                BirthDate = DateTime.UtcNow,
                Email = Guid.NewGuid().ToString().Substring(0, 10),
                Roles = new [] { "User" }
            };

            var repository = new UserRepository();

            Assert.IsNotNull(repository.AddUser(userModel));
        }
示例#3
0
 public void CreateUserRepositoryObject()
 {
     var repository = new UserRepository();
 }