title: testing ASP.NET membership provider Duplicate Email on create user
body: <p>I' trying to exercise membership and role provider methods. So far so good, but I'm stuck currently on Create user with submited duplicated email.</p>
  
  <pre><code>    [Test]
      public void can_create_user_with_given_duplic_Email()
      {
          MembershipCreateStatus status = new MembershipCreateStatus();
          provider.CreateUser("FirstUser", _Password, _Email, null, null, true, Guid.NewGuid(), out status);
          provider.CreateUser("SecondUser", _Password, _Email, null, null, true, Guid.NewGuid(), out status);
  
          Assert.AreEqual(MembershipCreateStatus.DuplicateEmail, status);
      }
  </code></pre>
  
  <p>as you can see I'm expecting Duplicate Email message from MembershipCreateStatus.</p>
  
  <p>Error message I'm actually got with running this test is following</p>
  
  <pre><code>can_create_user_with_given_duplic_Email has failed:
    Expected: DuplicateEmail
    But was:  ProviderError
  </code></pre>
  
  <p>Just to mention that provider.CreateUser() works with no problem.</p>