public void DefaultProperties() { TestCreateUserWizard w = new TestCreateUserWizard(); Assert.AreEqual(0, w.Attributes.Count, "Attributes.Count"); Assert.AreEqual(0, w.StateBag.Count, "ViewState.Count"); Assert.AreEqual("Security Answer:", w.AnswerLabelText, "AnswerLabelText"); Assert.AreEqual("Security answer is required.", w.AnswerRequiredErrorMessage, "AnswerRequiredErrorMessage"); Assert.IsFalse(w.AutoGeneratePassword, "AutoGeneratePassword"); Assert.AreEqual("Your account has been successfully created.", w.CompleteSuccessText, "CompleteSuccessText"); Assert.AreEqual("The Password and Confirmation Password must match.", w.ConfirmPasswordCompareErrorMessage, "ConfirmPasswordCompareErrorMessage"); Assert.AreEqual("Confirm Password:"******"ConfirmPasswordLabelText"); Assert.AreEqual("Confirm Password is required.", w.ConfirmPasswordRequiredErrorMessage, "ConfirmPasswordRequiredErrorMessage"); Assert.AreEqual(string.Empty, w.ContinueButtonImageUrl, "ContinueButtonImageUrl"); Assert.AreEqual("Continue", w.ContinueButtonText, "ContinueButtonText"); Assert.AreEqual(ButtonType.Button, w.ContinueButtonType, "ContinueButtonType"); Assert.AreEqual(string.Empty, w.ContinueDestinationPageUrl, "ContinueDestinationPageUrl"); Assert.AreEqual(string.Empty, w.CreateUserButtonImageUrl, "CreateUserButtonImageUrl"); Assert.AreEqual("Create User", w.CreateUserButtonText, "CreateUserButtonText"); Assert.AreEqual(ButtonType.Button, w.CreateUserButtonType, "CreateUserButtonType"); Assert.IsFalse(w.DisableCreatedUser, "DisableCreatedUser"); Assert.AreEqual("The e-mail address that you entered is already in use. Please enter a different e-mail address.", w.DuplicateEmailErrorMessage, "DuplicateEmailErrorMessage"); Assert.AreEqual("Please enter a different user name.", w.DuplicateUserNameErrorMessage, "DuplicateUserNameErrorMessage"); Assert.AreEqual(string.Empty, w.EditProfileIconUrl, "EditProfileIconUrl"); Assert.AreEqual(string.Empty, w.EditProfileText, "EditProfileText"); Assert.AreEqual(string.Empty, w.EditProfileUrl, "EditProfileUrl"); Assert.AreEqual("E-mail:", w.EmailLabelText, "EmailLabelText"); Assert.AreEqual(string.Empty, w.EmailRegularExpression, "EmailRegularExpression"); Assert.AreEqual("Please enter a different e-mail.", w.EmailRegularExpressionErrorMessage, "EmailRegularExpressionErrorMessage"); Assert.AreEqual("E-mail is required.", w.EmailRequiredErrorMessage, "EmailRequiredErrorMessage"); Assert.AreEqual(string.Empty, w.HelpPageIconUrl, "HelpPageIconUrl"); Assert.AreEqual(string.Empty, w.HelpPageText, "HelpPageText"); Assert.AreEqual(string.Empty, w.HelpPageUrl, "HelpPageUrl"); Assert.AreEqual(string.Empty, w.InstructionText, "InstructionText"); Assert.AreEqual("Please enter a different security answer.", w.InvalidAnswerErrorMessage, "InvalidAnswerErrorMessage"); Assert.AreEqual("Please enter a valid e-mail address.", w.InvalidEmailErrorMessage, "InvalidEmailErrorMessage"); Assert.AreEqual("Password length minimum: {0}. Non-alphanumeric characters required: {1}.", w.InvalidPasswordErrorMessage, "InvalidPasswordErrorMessage"); Assert.AreEqual("Please enter a different security question.", w.InvalidQuestionErrorMessage, "InvalidQuestionErrorMessage"); Assert.IsTrue(w.LoginCreatedUser, "LoginCreatedUser"); Assert.AreEqual(string.Empty, w.MembershipProvider, "MembershipProvider"); Assert.AreEqual(string.Empty, w.PasswordHintText, "PasswordHintText"); Assert.AreEqual("Password:"******"PasswordLabelText"); Assert.AreEqual(string.Empty, w.PasswordRegularExpression, "PasswordRegularExpression"); Assert.AreEqual("Please enter a different password.", w.PasswordRegularExpressionErrorMessage, "PasswordRegularExpressionErrorMessage"); Assert.AreEqual("Password is required.", w.PasswordRequiredErrorMessage, "PasswordRequiredErrorMessage"); Assert.AreEqual("Security Question:", w.QuestionLabelText, "QuestionLabelText"); Assert.AreEqual("Security question is required.", w.QuestionRequiredErrorMessage, "QuestionRequiredErrorMessage"); Assert.IsTrue(w.RequireEmail, "RequireEmail"); Assert.AreEqual("Your account was not created. Please try again.", w.UnknownErrorMessage, "UnknownErrorMessage"); Assert.AreEqual("User Name:", w.UserNameLabelText, "UserNameLabelText"); Assert.AreEqual("User Name is required.", w.UserNameRequiredErrorMessage, "UserNameRequiredErrorMessage"); Assert.IsNotNull(w.WizardSteps, "WizardSteps"); }
public void BibbleEvent_ContinueButtonCommand() { TestCreateUserWizard w = new TestCreateUserWizard(); w.ContinueButtonClick += new EventHandler(w_ContinueButtonClick); w.FinishButtonClick += new WizardNavigationEventHandler(w_FinishButtonClick); _ContinueButtonClickFlag = false; _FinishButtonClickFlag = false; CommandEventArgs continueCommandArg = new CommandEventArgs(CreateUserWizard.ContinueButtonCommandName, null); Assert.AreEqual(true, w.DoOnBubbleEvent(continueCommandArg), "Bubble Event#1"); Assert.AreEqual(true, _ContinueButtonClickFlag, "Bubble Event#2"); Assert.AreEqual(false, _FinishButtonClickFlag, "Bubble Event#3"); }
public static void ActiveStepIndex_Load(Page p) { TestCreateUserWizard wizard = new TestCreateUserWizard(); p.Controls.Add(wizard); Assert.AreEqual(-1, wizard.ActiveStepIndex_Before_Init, "ActiveStepIndex_Before_Init #1"); Assert.AreEqual(0, wizard.ActiveStepIndex_After_Init, "ActiveStepIndex_After_Init #1"); Assert.AreEqual(2, wizard.WizardSteps.Count); wizard = new TestCreateUserWizard(); wizard.ActiveStepIndex = 1; p.Controls.Add(wizard); Assert.AreEqual(1, wizard.ActiveStepIndex_Before_Init, "ActiveStepIndex_Before_Init #2"); Assert.AreEqual(1, wizard.ActiveStepIndex_After_Init, "ActiveStepIndex_After_Init #2"); Assert.AreEqual(2, wizard.WizardSteps.Count); }
public void BibbleEvent_ContinueButtonCommand () { TestCreateUserWizard w = new TestCreateUserWizard (); w.ContinueButtonClick += new EventHandler (w_ContinueButtonClick); w.FinishButtonClick += new WizardNavigationEventHandler (w_FinishButtonClick); _ContinueButtonClickFlag = false; _FinishButtonClickFlag = false; CommandEventArgs continueCommandArg = new CommandEventArgs (CreateUserWizard.ContinueButtonCommandName, null); Assert.AreEqual (true, w.DoOnBubbleEvent (continueCommandArg), "Bubble Event#1"); Assert.AreEqual (true, _ContinueButtonClickFlag, "Bubble Event#2"); Assert.AreEqual (false, _FinishButtonClickFlag, "Bubble Event#3"); }
public void AssignToDefaultProperties () { TestCreateUserWizard w = new TestCreateUserWizard (); Assert.AreEqual (0, w.Attributes.Count, "Attributes.Count"); Assert.AreEqual (0, w.StateBag.Count, "ViewState.Count"); int count = 0; w.AnswerLabelText = "value"; Assert.AreEqual ("value", w.AnswerLabelText, "CancelButtonImageUrl"); Assert.AreEqual (++count, w.StateBag.Count, "ViewState.Count-1"); w.AutoGeneratePassword = true; Assert.AreEqual (true, w.AutoGeneratePassword, "Assign AutoGeneratePassword"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate AutoGeneratePassword"); w.CompleteSuccessText = "text"; Assert.AreEqual ("text", w.CompleteSuccessText, "Assign CompleteSuccessText"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate CompleteSuccessText"); w.ConfirmPasswordCompareErrorMessage = "text"; Assert.AreEqual ("text", w.ConfirmPasswordCompareErrorMessage, "Assign ConfirmPasswordCompareErrorMessage,"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate ConfirmPasswordCompareErrorMessage,"); w.ConfirmPasswordLabelText = "text"; Assert.AreEqual ("text", w.ConfirmPasswordLabelText, "Assign ConfirmPasswordLabelText"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate ConfirmPasswordLabelText"); w.ConfirmPasswordRequiredErrorMessage = "text"; Assert.AreEqual ("text", w.ConfirmPasswordRequiredErrorMessage, "Assign ConfirmPasswordRequiredErrorMessage"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate ConfirmPasswordRequiredErrorMessage"); w.ContinueButtonImageUrl = "text"; Assert.AreEqual ("text", w.ContinueButtonImageUrl, "Assign ContinueButtonImageUrl"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate ContinueButtonImageUrl"); w.ContinueButtonText = "text"; Assert.AreEqual ("text", w.ContinueButtonText, "Assign ContinueButtonText"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate ContinueButtonText"); //w.ContinueButtonType = ButtonType.Button; //Assert.AreEqual(ButtonType.Button, w.ContinueButtonType, "Assign ContinueButtonType"); //Assert.AreEqual(count, w.StateBag.Count, "Viewstate ContinueButtonType"); w.ContinueDestinationPageUrl = "text"; Assert.AreEqual ("text", w.ContinueDestinationPageUrl, "Assign ContinueDestinationPageUrl"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate ContinueDestinationPageUrl"); w.CreateUserButtonImageUrl = "text"; Assert.AreEqual ("text", w.CreateUserButtonImageUrl, "Assign CreateUserButtonImageUrl"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate CreateUserButtonImageUrl"); w.CreateUserButtonText = "text"; Assert.AreEqual ("text", w.CreateUserButtonText, "Assign CreateUserButtonText"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate CreateUserButtonText"); //w.CreateUserButtonType = ButtonType.Button; //Assert.AreEqual(ButtonType.Button, w.CreateUserButtonType, "Assign CreateUserButtonType"); //Assert.AreEqual(count, w.StateBag.Count, "Viewstate CreateUserButtonType"); w.DisableCreatedUser = false; Assert.AreEqual (false, w.DisableCreatedUser, "Assign DisableCreatedUser"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate DisableCreatedUser"); w.DuplicateEmailErrorMessage = "msg"; Assert.AreEqual ("msg", w.DuplicateEmailErrorMessage, "Assign DuplicateEmailErrorMessage"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate DuplicateEmailErrorMessage"); w.DuplicateUserNameErrorMessage = "msg"; Assert.AreEqual ("msg", w.DuplicateUserNameErrorMessage, "Assign DuplicateUserNameErrorMessage"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate DuplicateUserNameErrorMessage"); w.EditProfileIconUrl = "msg"; Assert.AreEqual ("msg", w.EditProfileIconUrl, "Assign EditProfileIconUrl"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate EditProfileIconUrl"); w.EditProfileText = "msg"; Assert.AreEqual ("msg", w.EditProfileText, "Assign EditProfileText"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate EditProfileText"); w.EditProfileUrl = "msg"; Assert.AreEqual ("msg", w.EditProfileUrl, "Assign EditProfileUrl"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate EditProfileUrl"); w.EmailLabelText = "msg"; Assert.AreEqual ("msg", w.EmailLabelText, "Assign EmailLabelText"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate EmailLabelText"); w.EmailRegularExpression = "msg"; Assert.AreEqual ("msg", w.EmailRegularExpression, "Assign EmailRegularExpression"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate EmailRegularExpression"); w.EmailRegularExpressionErrorMessage = "msg"; Assert.AreEqual ("msg", w.EmailRegularExpressionErrorMessage, "Assign EmailRegularExpressionErrorMessage"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate EmailRegularExpressionErrorMessage"); w.EmailRequiredErrorMessage = "msg"; Assert.AreEqual ("msg", w.EmailRequiredErrorMessage, "Assign EmailRequiredErrorMessage"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate EmailRequiredErrorMessage"); w.HelpPageIconUrl = "msg"; Assert.AreEqual ("msg", w.HelpPageIconUrl, "Assign HelpPageIconUrl"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate HelpPageIconUrl"); w.HelpPageText = "msg"; Assert.AreEqual ("msg", w.HelpPageText, "Assign HelpPageText"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate HelpPageText"); w.HelpPageUrl = "msg"; Assert.AreEqual ("msg", w.HelpPageUrl, "Assign HelpPageUrl"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate HelpPageUrl"); w.InstructionText = "msg"; Assert.AreEqual ("msg", w.InstructionText, "Assign InstructionText"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate InstructionText"); w.InvalidAnswerErrorMessage = "msg"; Assert.AreEqual ("msg", w.InvalidAnswerErrorMessage, "Assign InvalidAnswerErrorMessage"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate InvalidAnswerErrorMessage"); w.InvalidEmailErrorMessage = "msg"; Assert.AreEqual ("msg", w.InvalidEmailErrorMessage, "Assign InvalidEmailErrorMessage"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate InvalidEmailErrorMessage"); w.InvalidPasswordErrorMessage = "msg"; Assert.AreEqual ("msg", w.InvalidPasswordErrorMessage, "Assign InvalidPasswordErrorMessage"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate InvalidPasswordErrorMessage"); w.InvalidQuestionErrorMessage = "msg"; Assert.AreEqual ("msg", w.InvalidQuestionErrorMessage, "Assign InvalidQuestionErrorMessage"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate InvalidQuestionErrorMessage"); w.LoginCreatedUser = false; Assert.AreEqual (false, w.LoginCreatedUser, "Assign LoginCreatedUser"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate LoginCreatedUser"); w.MembershipProvider = "msg"; Assert.AreEqual ("msg", w.MembershipProvider, "Assign MembershipProvider"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate MembershipProvider"); w.PasswordHintText = "msg"; Assert.AreEqual ("msg", w.PasswordHintText, "Assign PasswordHintText"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate PasswordHintText"); w.PasswordLabelText = "msg"; Assert.AreEqual ("msg", w.PasswordLabelText, "Assign PasswordLabelText"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate PasswordLabelText"); w.PasswordRegularExpression = "msg"; Assert.AreEqual ("msg", w.PasswordRegularExpression, "Assign PasswordRegularExpression"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate PasswordRegularExpression"); w.PasswordRegularExpressionErrorMessage = "msg"; Assert.AreEqual ("msg", w.PasswordRegularExpressionErrorMessage, "Assign PasswordRegularExpressionErrorMessage"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate PasswordRegularExpressionErrorMessage"); w.PasswordRequiredErrorMessage = "msg"; Assert.AreEqual ("msg", w.PasswordRequiredErrorMessage, "Assign PasswordRequiredErrorMessage"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate PasswordRequiredErrorMessage"); w.QuestionLabelText = "msg"; Assert.AreEqual ("msg", w.QuestionLabelText, "Assign QuestionLabelText"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate QuestionLabelText"); w.QuestionRequiredErrorMessage = "msg"; Assert.AreEqual ("msg", w.QuestionRequiredErrorMessage, "Assign QuestionRequiredErrorMessage"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate QuestionRequiredErrorMessage"); w.RequireEmail = false; Assert.AreEqual (false, w.RequireEmail, "Assign RequireEmail"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate RequireEmail"); w.UnknownErrorMessage = "msg"; Assert.AreEqual ("msg", w.UnknownErrorMessage, "Assign UnknownErrorMessage"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate UnknownErrorMessage"); w.UserNameLabelText = "msg"; Assert.AreEqual ("msg", w.UserNameLabelText, "Assign UserNameLabelText"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate UserNameLabelText"); w.UserNameRequiredErrorMessage = "msg"; Assert.AreEqual ("msg", w.UserNameRequiredErrorMessage, "Assign UserNameRequiredErrorMessage"); Assert.AreEqual (++count, w.StateBag.Count, "Viewstate UserNameRequiredErrorMessage"); }
public void DefaultProperties () { TestCreateUserWizard w = new TestCreateUserWizard (); Assert.AreEqual (0, w.Attributes.Count, "Attributes.Count"); Assert.AreEqual (0, w.StateBag.Count, "ViewState.Count"); Assert.AreEqual ("Security Answer:", w.AnswerLabelText, "AnswerLabelText"); Assert.AreEqual ("Security answer is required.", w.AnswerRequiredErrorMessage, "AnswerRequiredErrorMessage"); Assert.IsFalse (w.AutoGeneratePassword, "AutoGeneratePassword"); Assert.AreEqual ("Your account has been successfully created.", w.CompleteSuccessText, "CompleteSuccessText"); Assert.AreEqual ("The Password and Confirmation Password must match.", w.ConfirmPasswordCompareErrorMessage, "ConfirmPasswordCompareErrorMessage"); Assert.AreEqual ("Confirm Password:"******"ConfirmPasswordLabelText"); Assert.AreEqual ("Confirm Password is required.", w.ConfirmPasswordRequiredErrorMessage, "ConfirmPasswordRequiredErrorMessage"); Assert.AreEqual (string.Empty, w.ContinueButtonImageUrl, "ContinueButtonImageUrl"); Assert.AreEqual ("Continue", w.ContinueButtonText, "ContinueButtonText"); Assert.AreEqual (ButtonType.Button, w.ContinueButtonType, "ContinueButtonType"); Assert.AreEqual (string.Empty, w.ContinueDestinationPageUrl, "ContinueDestinationPageUrl"); Assert.AreEqual (string.Empty, w.CreateUserButtonImageUrl, "CreateUserButtonImageUrl"); Assert.AreEqual ("Create User", w.CreateUserButtonText, "CreateUserButtonText"); Assert.AreEqual (ButtonType.Button, w.CreateUserButtonType, "CreateUserButtonType"); Assert.IsFalse (w.DisableCreatedUser, "DisableCreatedUser"); Assert.AreEqual ("The e-mail address that you entered is already in use. Please enter a different e-mail address.", w.DuplicateEmailErrorMessage, "DuplicateEmailErrorMessage"); Assert.AreEqual ("Please enter a different user name.", w.DuplicateUserNameErrorMessage, "DuplicateUserNameErrorMessage"); Assert.AreEqual (string.Empty, w.EditProfileIconUrl, "EditProfileIconUrl"); Assert.AreEqual (string.Empty, w.EditProfileText, "EditProfileText"); Assert.AreEqual (string.Empty, w.EditProfileUrl, "EditProfileUrl"); Assert.AreEqual ("E-mail:", w.EmailLabelText, "EmailLabelText"); Assert.AreEqual (string.Empty, w.EmailRegularExpression, "EmailRegularExpression"); Assert.AreEqual ("Please enter a different e-mail.", w.EmailRegularExpressionErrorMessage, "EmailRegularExpressionErrorMessage"); Assert.AreEqual ("E-mail is required.", w.EmailRequiredErrorMessage, "EmailRequiredErrorMessage"); Assert.AreEqual (string.Empty, w.HelpPageIconUrl, "HelpPageIconUrl"); Assert.AreEqual (string.Empty, w.HelpPageText, "HelpPageText"); Assert.AreEqual (string.Empty, w.HelpPageUrl, "HelpPageUrl"); Assert.AreEqual (string.Empty, w.InstructionText, "InstructionText"); Assert.AreEqual ("Please enter a different security answer.", w.InvalidAnswerErrorMessage, "InvalidAnswerErrorMessage"); Assert.AreEqual ("Please enter a valid e-mail address.", w.InvalidEmailErrorMessage, "InvalidEmailErrorMessage"); Assert.AreEqual ("Password length minimum: {0}. Non-alphanumeric characters required: {1}.", w.InvalidPasswordErrorMessage, "InvalidPasswordErrorMessage"); Assert.AreEqual ("Please enter a different security question.", w.InvalidQuestionErrorMessage, "InvalidQuestionErrorMessage"); Assert.IsTrue (w.LoginCreatedUser, "LoginCreatedUser"); Assert.AreEqual (string.Empty, w.MembershipProvider, "MembershipProvider"); Assert.AreEqual (string.Empty, w.PasswordHintText, "PasswordHintText"); Assert.AreEqual ("Password:"******"PasswordLabelText"); Assert.AreEqual (string.Empty, w.PasswordRegularExpression, "PasswordRegularExpression"); Assert.AreEqual ("Please enter a different password.", w.PasswordRegularExpressionErrorMessage, "PasswordRegularExpressionErrorMessage"); Assert.AreEqual ("Password is required.", w.PasswordRequiredErrorMessage, "PasswordRequiredErrorMessage"); Assert.AreEqual ("Security Question:", w.QuestionLabelText, "QuestionLabelText"); Assert.AreEqual ("Security question is required.", w.QuestionRequiredErrorMessage, "QuestionRequiredErrorMessage"); Assert.IsTrue (w.RequireEmail, "RequireEmail"); Assert.AreEqual ("Your account was not created. Please try again.", w.UnknownErrorMessage, "UnknownErrorMessage"); Assert.AreEqual ("User Name:", w.UserNameLabelText, "UserNameLabelText"); Assert.AreEqual ("User Name is required.", w.UserNameRequiredErrorMessage, "UserNameRequiredErrorMessage"); Assert.IsNotNull (w.WizardSteps, "WizardSteps"); }
public static void ActiveStepIndex_Load (Page p) { TestCreateUserWizard wizard = new TestCreateUserWizard (); p.Controls.Add (wizard); Assert.AreEqual (-1, wizard.ActiveStepIndex_Before_Init, "ActiveStepIndex_Before_Init #1"); Assert.AreEqual (0, wizard.ActiveStepIndex_After_Init, "ActiveStepIndex_After_Init #1"); Assert.AreEqual (2, wizard.WizardSteps.Count); wizard = new TestCreateUserWizard (); wizard.ActiveStepIndex = 1; p.Controls.Add (wizard); Assert.AreEqual (1, wizard.ActiveStepIndex_Before_Init, "ActiveStepIndex_Before_Init #2"); Assert.AreEqual (1, wizard.ActiveStepIndex_After_Init, "ActiveStepIndex_After_Init #2"); Assert.AreEqual (2, wizard.WizardSteps.Count); }
public void AssignToDefaultProperties() { TestCreateUserWizard w = new TestCreateUserWizard(); Assert.AreEqual(0, w.Attributes.Count, "Attributes.Count"); Assert.AreEqual(0, w.StateBag.Count, "ViewState.Count"); int count = 0; w.AnswerLabelText = "value"; Assert.AreEqual("value", w.AnswerLabelText, "CancelButtonImageUrl"); Assert.AreEqual(++count, w.StateBag.Count, "ViewState.Count-1"); w.AutoGeneratePassword = true; Assert.AreEqual(true, w.AutoGeneratePassword, "Assign AutoGeneratePassword"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate AutoGeneratePassword"); w.CompleteSuccessText = "text"; Assert.AreEqual("text", w.CompleteSuccessText, "Assign CompleteSuccessText"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate CompleteSuccessText"); w.ConfirmPasswordCompareErrorMessage = "text"; Assert.AreEqual("text", w.ConfirmPasswordCompareErrorMessage, "Assign ConfirmPasswordCompareErrorMessage,"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate ConfirmPasswordCompareErrorMessage,"); w.ConfirmPasswordLabelText = "text"; Assert.AreEqual("text", w.ConfirmPasswordLabelText, "Assign ConfirmPasswordLabelText"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate ConfirmPasswordLabelText"); w.ConfirmPasswordRequiredErrorMessage = "text"; Assert.AreEqual("text", w.ConfirmPasswordRequiredErrorMessage, "Assign ConfirmPasswordRequiredErrorMessage"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate ConfirmPasswordRequiredErrorMessage"); w.ContinueButtonImageUrl = "text"; Assert.AreEqual("text", w.ContinueButtonImageUrl, "Assign ContinueButtonImageUrl"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate ContinueButtonImageUrl"); w.ContinueButtonText = "text"; Assert.AreEqual("text", w.ContinueButtonText, "Assign ContinueButtonText"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate ContinueButtonText"); //w.ContinueButtonType = ButtonType.Button; //Assert.AreEqual(ButtonType.Button, w.ContinueButtonType, "Assign ContinueButtonType"); //Assert.AreEqual(count, w.StateBag.Count, "Viewstate ContinueButtonType"); w.ContinueDestinationPageUrl = "text"; Assert.AreEqual("text", w.ContinueDestinationPageUrl, "Assign ContinueDestinationPageUrl"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate ContinueDestinationPageUrl"); w.CreateUserButtonImageUrl = "text"; Assert.AreEqual("text", w.CreateUserButtonImageUrl, "Assign CreateUserButtonImageUrl"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate CreateUserButtonImageUrl"); w.CreateUserButtonText = "text"; Assert.AreEqual("text", w.CreateUserButtonText, "Assign CreateUserButtonText"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate CreateUserButtonText"); //w.CreateUserButtonType = ButtonType.Button; //Assert.AreEqual(ButtonType.Button, w.CreateUserButtonType, "Assign CreateUserButtonType"); //Assert.AreEqual(count, w.StateBag.Count, "Viewstate CreateUserButtonType"); w.DisableCreatedUser = false; Assert.AreEqual(false, w.DisableCreatedUser, "Assign DisableCreatedUser"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate DisableCreatedUser"); w.DuplicateEmailErrorMessage = "msg"; Assert.AreEqual("msg", w.DuplicateEmailErrorMessage, "Assign DuplicateEmailErrorMessage"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate DuplicateEmailErrorMessage"); w.DuplicateUserNameErrorMessage = "msg"; Assert.AreEqual("msg", w.DuplicateUserNameErrorMessage, "Assign DuplicateUserNameErrorMessage"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate DuplicateUserNameErrorMessage"); w.EditProfileIconUrl = "msg"; Assert.AreEqual("msg", w.EditProfileIconUrl, "Assign EditProfileIconUrl"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate EditProfileIconUrl"); w.EditProfileText = "msg"; Assert.AreEqual("msg", w.EditProfileText, "Assign EditProfileText"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate EditProfileText"); w.EditProfileUrl = "msg"; Assert.AreEqual("msg", w.EditProfileUrl, "Assign EditProfileUrl"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate EditProfileUrl"); w.EmailLabelText = "msg"; Assert.AreEqual("msg", w.EmailLabelText, "Assign EmailLabelText"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate EmailLabelText"); w.EmailRegularExpression = "msg"; Assert.AreEqual("msg", w.EmailRegularExpression, "Assign EmailRegularExpression"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate EmailRegularExpression"); w.EmailRegularExpressionErrorMessage = "msg"; Assert.AreEqual("msg", w.EmailRegularExpressionErrorMessage, "Assign EmailRegularExpressionErrorMessage"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate EmailRegularExpressionErrorMessage"); w.EmailRequiredErrorMessage = "msg"; Assert.AreEqual("msg", w.EmailRequiredErrorMessage, "Assign EmailRequiredErrorMessage"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate EmailRequiredErrorMessage"); w.HelpPageIconUrl = "msg"; Assert.AreEqual("msg", w.HelpPageIconUrl, "Assign HelpPageIconUrl"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate HelpPageIconUrl"); w.HelpPageText = "msg"; Assert.AreEqual("msg", w.HelpPageText, "Assign HelpPageText"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate HelpPageText"); w.HelpPageUrl = "msg"; Assert.AreEqual("msg", w.HelpPageUrl, "Assign HelpPageUrl"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate HelpPageUrl"); w.InstructionText = "msg"; Assert.AreEqual("msg", w.InstructionText, "Assign InstructionText"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate InstructionText"); w.InvalidAnswerErrorMessage = "msg"; Assert.AreEqual("msg", w.InvalidAnswerErrorMessage, "Assign InvalidAnswerErrorMessage"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate InvalidAnswerErrorMessage"); w.InvalidEmailErrorMessage = "msg"; Assert.AreEqual("msg", w.InvalidEmailErrorMessage, "Assign InvalidEmailErrorMessage"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate InvalidEmailErrorMessage"); w.InvalidPasswordErrorMessage = "msg"; Assert.AreEqual("msg", w.InvalidPasswordErrorMessage, "Assign InvalidPasswordErrorMessage"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate InvalidPasswordErrorMessage"); w.InvalidQuestionErrorMessage = "msg"; Assert.AreEqual("msg", w.InvalidQuestionErrorMessage, "Assign InvalidQuestionErrorMessage"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate InvalidQuestionErrorMessage"); w.LoginCreatedUser = false; Assert.AreEqual(false, w.LoginCreatedUser, "Assign LoginCreatedUser"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate LoginCreatedUser"); w.MembershipProvider = "msg"; Assert.AreEqual("msg", w.MembershipProvider, "Assign MembershipProvider"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate MembershipProvider"); w.PasswordHintText = "msg"; Assert.AreEqual("msg", w.PasswordHintText, "Assign PasswordHintText"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate PasswordHintText"); w.PasswordLabelText = "msg"; Assert.AreEqual("msg", w.PasswordLabelText, "Assign PasswordLabelText"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate PasswordLabelText"); w.PasswordRegularExpression = "msg"; Assert.AreEqual("msg", w.PasswordRegularExpression, "Assign PasswordRegularExpression"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate PasswordRegularExpression"); w.PasswordRegularExpressionErrorMessage = "msg"; Assert.AreEqual("msg", w.PasswordRegularExpressionErrorMessage, "Assign PasswordRegularExpressionErrorMessage"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate PasswordRegularExpressionErrorMessage"); w.PasswordRequiredErrorMessage = "msg"; Assert.AreEqual("msg", w.PasswordRequiredErrorMessage, "Assign PasswordRequiredErrorMessage"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate PasswordRequiredErrorMessage"); w.QuestionLabelText = "msg"; Assert.AreEqual("msg", w.QuestionLabelText, "Assign QuestionLabelText"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate QuestionLabelText"); w.QuestionRequiredErrorMessage = "msg"; Assert.AreEqual("msg", w.QuestionRequiredErrorMessage, "Assign QuestionRequiredErrorMessage"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate QuestionRequiredErrorMessage"); w.RequireEmail = false; Assert.AreEqual(false, w.RequireEmail, "Assign RequireEmail"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate RequireEmail"); w.UnknownErrorMessage = "msg"; Assert.AreEqual("msg", w.UnknownErrorMessage, "Assign UnknownErrorMessage"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate UnknownErrorMessage"); w.UserNameLabelText = "msg"; Assert.AreEqual("msg", w.UserNameLabelText, "Assign UserNameLabelText"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate UserNameLabelText"); w.UserNameRequiredErrorMessage = "msg"; Assert.AreEqual("msg", w.UserNameRequiredErrorMessage, "Assign UserNameRequiredErrorMessage"); Assert.AreEqual(++count, w.StateBag.Count, "Viewstate UserNameRequiredErrorMessage"); }