public void Data_Delete_User()
        {
            var repository = new UserRepository(_dataConnectionString, 1);

            var result = repository.Delete(1);

            var user = repository.Get(1);

            Assert.IsTrue(user == null);
            Assert.IsTrue(result.Deleted == true);
            Assert.IsTrue(result.DeletedBy == 1);
            Assert.IsTrue(result.DeletedDate.Value.Date == DateTime.Now.Date);
        }
        public void Data_Read_User()
        {
            var repository = new UserRepository(_dataConnectionString, 1);

            var data = repository.Get(1);

            Assert.IsTrue(data.UserID == 1);
            Assert.IsTrue(data.Email == "*****@*****.**");
        }
        public void Data_Update_User()
        {
            var repository = new UserRepository(_dataConnectionString, 1);

            var user = repository.Get(1);

            user.Forename = "UPDATEDFORENAME";
            user.Surname = "UPDATEDSURNAME";
            user.Email = "*****@*****.**";
            user.Password = "******"; // "password"
            user.PasswordResetGUID = "0c4ffa03-e3d7-48b6-b657-bdae23f5d14d";
            user.PasswordResetExpiry = new DateTime(2015, 1, 1);

            var result = repository.Update(user);

            Assert.IsTrue(result.Forename == "UPDATEDFORENAME");
            Assert.IsTrue(result.Surname == "UPDATEDSURNAME");
            Assert.IsTrue(result.Email == "*****@*****.**");
            Assert.IsTrue(result.Password == "AEVg+8Chm8T0NSff0k0qegArPYXetlQfvKEoaDXwnT0N9fj0TVAjorveDX9vfbcVwA==");
            Assert.IsTrue(result.PasswordResetGUID == "0c4ffa03-e3d7-48b6-b657-bdae23f5d14d");
            Assert.IsTrue(result.PasswordResetExpiry == new DateTime(2015, 1, 1));
            Assert.IsTrue(result.LastModifiedBy == 1);
            Assert.IsTrue(result.LastModifiedDate.Date == DateTime.Now.Date);
        }