Exemple #1
0
 public override void ViewDidLoad()
 {
     base.ViewDidLoad ();
     // Perform any additional setup after loading the view, typically from a nib.
     CommunicationManager cm = new CommunicationManager();
     btn_Log_In.TouchDown += delegate {
         if (cm.ValidSocialSecurityNumber(TxtBox_CPRTextField.Text))
         {
             UIStoryboard board = UIStoryboard.FromName ("MainWindow", null);
             UIViewController ctrl = (UIViewController)board.InstantiateViewController ("MainWindow");
             ctrl.ModalTransitionStyle = UIModalTransitionStyle.FlipHorizontal;
             //this.PresentedViewController (ctrl, true, null);
         }
     };
 }
        public void ValidSocialSecurityNumber_ZeroInput_AssertFalse()
        {
            CommunicationManager comMan = new CommunicationManager();

            Assert.IsFalse(comMan.ValidSocialSecurityNumber("0000000000"));
        }
        public void ValidSocialSecurityNumber_VeryInvalidInput_AsserFalse()
        {
            CommunicationManager comMan = new CommunicationManager();

            Assert.IsFalse(comMan.ValidSocialSecurityNumber("9999999999"));
        }
        public void ValidSocialSecurityNumber_ValidInput_AssertTrue()
        {
            CommunicationManager comMan = new CommunicationManager();

            Assert.IsTrue(comMan.ValidSocialSecurityNumber("0706950435"));
        }
        public void ValidSocialSecurityNumber_MonthOverBorderImput_AsserFalse()
        {
            CommunicationManager comMan = new CommunicationManager();

            Assert.IsFalse(comMan.ValidSocialSecurityNumber("3113999999"));
        }
        public void ValidSocialSecurityNumber_BorderInput_AssertTrue()
        {
            CommunicationManager comMan = new CommunicationManager();

            Assert.IsTrue(comMan.ValidSocialSecurityNumber("3112999999"));
        }