public static void ClassCleanup()
 {
     //We will remove our sample users
     var NHPCleanup = new EncryptionProvider();
     NHPCleanup.Initialize("RethinkDbMemberShipProviderEncrypted", _testConfig);
     foreach (var user in _testUsers)
     {
         NHPCleanup.DeleteUser(user.username, true);
     }
 }
        public static void ClassSetup()
        {
            //Set up a test configuration to use.
            var cfg = ConfigurationManager.OpenExeConfiguration(System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath);
            MembershipSection ms = (MembershipSection)cfg.GetSection("system.web/membership");

            ProviderSettings psDefault = (ProviderSettings)ms.Providers["RethinkDbMemberShipProviderEncrypted"];
            _testConfig = psDefault.Parameters;

            //We will create three test users to work with while
            //exercising our tests.  These will be used for various
            //read and find operations.
            var NHPSetup = new EncryptionProvider();
            NHPSetup.Initialize("RethinkDbMemberShipProviderEncrypted", _testConfig);
            _testUsers = TestUtils.GetTestUsers(5, "Encrypted");
            foreach (var u in _testUsers)
            {
                MembershipCreateStatus status;
                NHPSetup.CreateUser(u.username, u.password, u.email, u.passwordQuestion,
                    u.passwordAnswer, u.isApproved, u.providerUserKey, out status);
            }
        }
 public void TestCleanup()
 {
     _rhp = null;
 }
 public void TestSetup()
 {
     _rhp = new EncryptionProvider();
     _rhp.Initialize("RethinkDbMemberShipProviderEncrypted", _testConfig);
 }