public void Test_CreateUserTwice()
 {
     //arrange
     var userRepository = new UsersRepository(_connectionString);
     var user = TestHelper.GenerateTestUser();
     //act
     userRepository.Create(user);
     userRepository.Create(user);
 }
 public void Test_DeleteUser()
 {
     //arrange
     var userRepository = new UsersRepository(_connectionString);
     var user = TestHelper.GenerateTestUser();
     userRepository.Create(user);
     //act
     userRepository.Delete(user.Id);
     //asserts
     userRepository.Get(user.Id);
 }
 public void Test_CreateAndGetUser()
 {
     //arrange
     var userRepository = new UsersRepository(_connectionString);
     var user = TestHelper.GenerateTestUser();
     //act
     userRepository.Create(user);
     var resultUser = userRepository.Get(user.Id);
     //asserts
     Assert.IsTrue(user.FirstName.Equals(resultUser.FirstName));
 }
 public void ShouldCreateUser()
 {
     //arrange
     var userRepository = new UsersRepository();
     var user = new User
     {
         Email = "*****@*****.**",
         FirstName = "name",
         LastName = "lastname",
         Id = Guid.NewGuid()
     };
     //act
     userRepository.Create(user);
     //asserts
     var resultUser = userRepository.Get(user.Id);
     Assert.AreEqual(user.Email, resultUser.Email);
 }
 public void Test_GetAllUsers()
 {
     //arrange
     var userRepository = new UsersRepository(_connectionString);
     var user1 = TestHelper.GenerateTestUser();
     var user2 = TestHelper.GenerateTestUser();
     var user3 = TestHelper.GenerateTestUser();
     var user4 = TestHelper.GenerateTestUser();
     userRepository.Create(user1);
     userRepository.Create(user2);
     userRepository.Create(user3);
     userRepository.Create(user4);
     //act
     var users = userRepository.GetAllUsers();
     //asserts
     Assert.IsTrue(users.Count() == 4);
 }