Initialize() public method

public Initialize ( string name, NameValueCollection config ) : void
name string
config System.Collections.Specialized.NameValueCollection
return void
        public void GivenRequiresUniqueEmailWhenInitializeThenRequiresUniqueEmailIsCorrectValue()
        {
            // arrange
            var testClass = new BetterMembershipProvider();
            var config = new NameValueCollection { { "requiresUniqueEmail", "true" }, { "userEmailColumn", "Email" } };

            // act
            testClass.Initialize("name", config);

            // assert
            Assert.That(testClass.RequiresUniqueEmail, Is.True);
        }
        public void GivenRequiresEmailWithoutEmailColumnWhenInitializeThenProviderException()
        {
            // arrange
            var provider = new BetterMembershipProvider();
            var config = new NameValueCollection
                             {
                                 { "requiresUniqueEmail", "true" },
                                 { "userEmailColumn", string.Empty }
                             };

            // act // assert
            Assert.Throws<ProviderException>(() => provider.Initialize("name", config));
        }
        public void GivenRequiresQuestionAndAnswerAttributeWhenInitializeThenProviderException()
        {
            // arrange
            var provider = new BetterMembershipProvider();
            var config = new NameValueCollection { { "requiresQuestionAndAnswer", "true" } };

            // act // assert
            Assert.Throws<ProviderException>(() => provider.Initialize("name", config));
        }
        public void GivenNoRequiresUniqueEmailAttributeWhenInitializeThenRequiresUniqueEmailIsFalse()
        {
            // arrange
            var testClass = new BetterMembershipProvider();
            var config = new NameValueCollection();

            // act
            testClass.Initialize("name", config);

            // assert
            Assert.That(testClass.RequiresUniqueEmail, Is.False);
        }