public void TestGetUserNameByEmailWhenNonUnique()
        {
            var provider = new MongoMembershipProvider();
            provider.Initialize(DefaultName, _config);

            MembershipCreateStatus status;
            provider.CreateUser("bbb", "123456", "*****@*****.**", null, null, true, null, out status);
            provider.CreateUser("aaa", "123456", "*****@*****.**", null, null, true, null, out status);
            var retrievedUserName = provider.GetUserNameByEmail("*****@*****.**");

            Assert.AreEqual("aaa", retrievedUserName);
        }
        public void TestGetUserNameByEmailWhenNonExistent()
        {
            var provider = new MongoMembershipProvider();
            provider.Initialize(DefaultName, _config);

            MembershipCreateStatus status;
            provider.CreateUser("test1", "123456", "*****@*****.**", null, null, true, null, out status);
            provider.CreateUser("test2", "123456", "*****@*****.**", null, null, true, null, out status);
            var retrievedUserName = provider.GetUserNameByEmail("*****@*****.**");

            Assert.IsNull(retrievedUserName);
        }