Index: /branches/HeuristicLab.Services.Authentication Prototype/Service/Provider/HeuristicLabMembershipProvider.cs
===================================================================
--- /branches/HeuristicLab.Services.Authentication Prototype/Service/Provider/HeuristicLabMembershipProvider.cs	(revision 4017)
+++ /branches/HeuristicLab.Services.Authentication Prototype/Service/Provider/HeuristicLabMembershipProvider.cs	(revision 4018)
@@ -37,9 +37,9 @@
 
     public override bool EnablePasswordReset {
-      get { return pEnablePasswordReset; }
+      get { return false; }
     }
 
     public override bool EnablePasswordRetrieval {
-      get { return pEnablePasswordRetrieval; }
+      get { return false; }
     }
 
@@ -199,7 +199,7 @@
           u.PasswordAnswer = newPasswordAnswer;
           u.PasswordQuestion = newPasswordQuestion;
-          
+
           db.SubmitChanges();
-          
+
           return true;
         }
@@ -327,5 +327,5 @@
         return PagedCollection(users, pageIndex, pageSize, out totalRecords);
       }
-      
+
     }
 
@@ -345,5 +345,5 @@
         return PagedCollection(users, pageIndex, pageSize, out totalRecords);
       }
-      
+
     }
 
@@ -415,10 +415,13 @@
     public override string GetUserNameByEmail(string email) {
       using (DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext()) {
-        HeuristicLabUser u =
-          db.HeuristicLabUsers.Single<HeuristicLabUser>(x => x.Email == email);
-        if (u != null)
+
+        if (db.HeuristicLabUsers.Count(x => x.Email == email) > 0) {
+
+          HeuristicLabUser u =
+            db.HeuristicLabUsers.Single<HeuristicLabUser>(x => x.Email == email);
+
           return u.UserName;
-        else
-          return null;
+        }
+        return null;
       }
     }
@@ -473,5 +476,15 @@
 
     public override void UpdateUser(MembershipUser user) {
-      throw new NotImplementedException();
+      using (DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext()) {
+        if (user != null && user.ProviderUserKey != null && db.HeuristicLabUsers.Count(x => x.ID == (long)user.ProviderUserKey) > 0) {
+          HeuristicLabUser u = db.HeuristicLabUsers.Single(x => x.ID == (long)user.ProviderUserKey);
+          u.UserName = user.UserName;
+          u.Comment = user.Comment;
+          u.Email = user.Email;
+          u.Locked = user.IsLockedOut;
+          db.SubmitChanges();
+
+        }
+      }
     }
     /// <summary>
Index: /branches/HeuristicLab.Services.Authentication Prototype/UnitTests/HeuristicLabMembershipProviderTest.cs
===================================================================
--- /branches/HeuristicLab.Services.Authentication Prototype/UnitTests/HeuristicLabMembershipProviderTest.cs	(revision 4017)
+++ /branches/HeuristicLab.Services.Authentication Prototype/UnitTests/HeuristicLabMembershipProviderTest.cs	(revision 4018)
@@ -70,5 +70,5 @@
       bool actual;
       actual = target.RequiresUniqueEmail;
-      Assert.Inconclusive("Verify the correctness of this test method.");
+      Assert.IsTrue(actual);
     }
 
@@ -92,28 +92,10 @@
       string actual;
       actual = target.PasswordStrengthRegularExpression;
-      Assert.Inconclusive("Verify the correctness of this test method.");
-    }
-
-    /// <summary>
-    ///A test for PasswordFormat
-    ///</summary>
-    [TestMethod()]
-    public void PasswordFormatTest() {
-      MembershipProvider target = Membership.Provider;
-      MembershipPasswordFormat actual;
-      actual = target.PasswordFormat;
-      Assert.Inconclusive("Verify the correctness of this test method.");
-    }
-
-    /// <summary>
-    ///A test for PasswordAttemptWindow
-    ///</summary>
-    [TestMethod()]
-    public void PasswordAttemptWindowTest() {
-      MembershipProvider target = Membership.Provider;  // TODO: Initialize to an appropriate value
-      int actual;
-      actual = target.PasswordAttemptWindow;
-      Assert.Inconclusive("Verify the correctness of this test method.");
-    }
+      Assert.AreEqual(actual, String.Empty);
+    }
+
+
+
+  
 
     /// <summary>
@@ -187,5 +169,5 @@
       bool actual;
       actual = target.EnablePasswordRetrieval;
-      Assert.Inconclusive("Verify the correctness of this test method.");
+      Assert.IsFalse(actual);
     }
 
@@ -198,19 +180,5 @@
       bool actual;
       actual = target.EnablePasswordReset;
-      Assert.Inconclusive("Verify the correctness of this test method.");
-    }
-
-    /// <summary>
-    ///A test for ApplicationName
-    ///</summary>
-    [TestMethod()]
-    public void ApplicationNameTest() {
-      MembershipProvider target = Membership.Provider;
-      string expected = string.Empty; // TODO: Initialize to an appropriate value
-      string actual;
-      target.ApplicationName = expected;
-      actual = target.ApplicationName;
-      Assert.AreEqual(expected, actual);
-      Assert.Inconclusive("Verify the correctness of this test method.");
+      Assert.IsFalse(actual);
     }
 
@@ -255,8 +223,15 @@
     [TestMethod()]
     public void UpdateUserTest() {
-      MembershipProvider target = Membership.Provider; // TODO: Initialize to an appropriate value
-      MembershipUser user = null; // TODO: Initialize to an appropriate value
+      MembershipProvider target = Membership.Provider;
+      MembershipCreateStatus status;
+      MembershipUser user = null;
+      target.CreateUser("testUser", "myPassword", "mail", "question", "answer", true, null, out status);
+      Assert.AreEqual(MembershipCreateStatus.Success, status);
+      user =target.GetUser("testUser", true);
+      Assert.IsNotNull(user);
+      user.Email = "newMail";
       target.UpdateUser(user);
-      Assert.Inconclusive("A method that does not return a value cannot be verified.");
+      user = target.GetUser("testUser", true);
+      Assert.AreEqual(user.Email, "newMail");
     }
 
@@ -282,12 +257,16 @@
     [TestMethod()]
     public void ResetPasswordTest() {
-      MembershipProvider target = Membership.Provider; // TODO: Initialize to an appropriate value
-      string username = string.Empty; // TODO: Initialize to an appropriate value
-      string answer = string.Empty; // TODO: Initialize to an appropriate value
-      string expected = string.Empty; // TODO: Initialize to an appropriate value
+      MembershipProvider target = Membership.Provider; 
+      string username = string.Empty; 
+      string answer = string.Empty; 
+      string expected = string.Empty;
       string actual;
-      actual = target.ResetPassword(username, answer);
-      Assert.AreEqual(expected, actual);
-      Assert.Inconclusive("Verify the correctness of this test method.");
+      try {
+        target.ResetPassword("foo", "foo");
+      }
+      catch (NotSupportedException) {
+      //should be thrown
+      }
+      
     }
 
@@ -302,6 +281,9 @@
       string actual;
       actual = target.GetUserNameByEmail(email);
-      Assert.AreEqual(expected, actual);
-      Assert.Inconclusive("Verify the correctness of this test method.");
+      Assert.IsNull(actual);
+      MembershipCreateStatus status;
+      target.CreateUser("testuser", "mySecret", "testmail", "question", "answer", true, null, out status);
+      Assert.AreEqual(status, MembershipCreateStatus.Success);
+      Assert.AreEqual(target.GetUserNameByEmail("testmail"), "testuser");
     }
 
@@ -334,7 +316,12 @@
       string expected = string.Empty; // TODO: Initialize to an appropriate value
       string actual;
-      actual = target.GetPassword(username, answer);
-      Assert.AreEqual(expected, actual);
-      Assert.Inconclusive("Verify the correctness of this test method.");
+      try {
+        actual = target.GetPassword(username, answer);
+        Assert.Fail();
+      }
+      catch (NotSupportedException) {
+        //swallow because expected
+      }
+     
     }
 
