public void TestNewParentCheckIfSame() { AdminTools.NewParentLogin newParent = new AdminTools.NewParentLogin(); Assert.IsTrue(newParent.CheckIfSame("", "")); Assert.IsTrue(newParent.CheckIfSame("123450", "123450")); Assert.IsFalse(newParent.CheckIfSame("123450", "123451")); Assert.IsFalse(newParent.CheckIfSame("123450", "0123450")); }
public void TestNewParentCheckIfNull() { AdminTools.NewParentLogin newParent = new AdminTools.NewParentLogin(); Assert.IsTrue(newParent.CheckIfNull()); newParent.txt_ParentID1.Text = "123450"; Assert.IsTrue(newParent.CheckIfNull()); newParent.txt_ParentID2.Text = "123451"; Assert.IsTrue(newParent.CheckIfNull()); newParent.psw_ParentPIN1.Password = "******"; Assert.IsTrue(newParent.CheckIfNull()); newParent.psw_ParentPIN2.Password = "******"; Assert.IsFalse(newParent.CheckIfNull()); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.win_NewParent = ((AdminTools.NewParentLogin)(target)); return; case 2: this.txt_ParentID1 = ((System.Windows.Controls.TextBox)(target)); #line 11 "..\..\..\..\AdminTools\NewParentLogin.xaml" this.txt_ParentID1.GotFocus += new System.Windows.RoutedEventHandler(this.SelectAllGotFocus); #line default #line hidden #line 11 "..\..\..\..\AdminTools\NewParentLogin.xaml" this.txt_ParentID1.KeyUp += new System.Windows.Input.KeyEventHandler(this.Key_Up_Event); #line default #line hidden return; case 3: this.txt_ParentID2 = ((System.Windows.Controls.TextBox)(target)); #line 12 "..\..\..\..\AdminTools\NewParentLogin.xaml" this.txt_ParentID2.GotFocus += new System.Windows.RoutedEventHandler(this.SelectAllGotFocus); #line default #line hidden #line 12 "..\..\..\..\AdminTools\NewParentLogin.xaml" this.txt_ParentID2.KeyUp += new System.Windows.Input.KeyEventHandler(this.Key_Up_Event); #line default #line hidden return; case 4: this.psw_ParentPIN1 = ((System.Windows.Controls.PasswordBox)(target)); #line 13 "..\..\..\..\AdminTools\NewParentLogin.xaml" this.psw_ParentPIN1.GotFocus += new System.Windows.RoutedEventHandler(this.SelectAllGotFocusPW); #line default #line hidden #line 13 "..\..\..\..\AdminTools\NewParentLogin.xaml" this.psw_ParentPIN1.KeyUp += new System.Windows.Input.KeyEventHandler(this.Key_Up_Event); #line default #line hidden return; case 5: this.psw_ParentPIN2 = ((System.Windows.Controls.PasswordBox)(target)); #line 14 "..\..\..\..\AdminTools\NewParentLogin.xaml" this.psw_ParentPIN2.GotFocus += new System.Windows.RoutedEventHandler(this.SelectAllGotFocusPW); #line default #line hidden #line 14 "..\..\..\..\AdminTools\NewParentLogin.xaml" this.psw_ParentPIN2.KeyUp += new System.Windows.Input.KeyEventHandler(this.Key_Up_Event); #line default #line hidden return; case 6: this.btn_AddNewParent = ((System.Windows.Controls.Button)(target)); #line 19 "..\..\..\..\AdminTools\NewParentLogin.xaml" this.btn_AddNewParent.Click += new System.Windows.RoutedEventHandler(this.btn_AddNewParent_Click); #line default #line hidden return; case 7: this.btn_Cancel = ((System.Windows.Controls.Button)(target)); #line 20 "..\..\..\..\AdminTools\NewParentLogin.xaml" this.btn_Cancel.Click += new System.Windows.RoutedEventHandler(this.btn_Cancel_Click); #line default #line hidden return; } this._contentLoaded = true; }