public AddFormDriver(WindowControl window, Async async)
 {
     Window           = window;
     Async            = async;
     ButtonEntry      = new FormsButton(Window.Dynamic()._buttonEntry);
     TextBoxName      = new FormsTextBox(Window.Dynamic()._textBoxName);
     TextBoxAddress   = new FormsTextBox(Window.Dynamic()._textBoxAddress);
     RadioButtonWoman = new FormsRadioButton(Window.Dynamic()._radioButtonWoman);
     RadioButtonMan   = new FormsRadioButton(Window.Dynamic()._radioButtonMan);
 }
 public AddFormDriver(WindowControl window, Async async)
 {
     Window = window;
     Async = async;
     ButtonEntry = new FormsButton(Window.Dynamic()._buttonEntry);
     TextBoxName = new FormsTextBox(Window.Dynamic()._textBoxName);
     TextBoxAddress = new FormsTextBox(Window.Dynamic()._textBoxAddress);
     RadioButtonWoman = new FormsRadioButton(Window.Dynamic()._radioButtonWoman);
     RadioButtonMan = new FormsRadioButton(Window.Dynamic()._radioButtonMan);
 }
        public void TestCheckBoxCheck()
        {
            FormsRadioButton radiobutton1 = new FormsRadioButton(testDlg["radioButton1"]());

            radiobutton1.EmulateCheck();
            Assert.AreEqual(true, radiobutton1.Checked);

            //非同期
            FormsRadioButton radiobutton2 = new FormsRadioButton(testDlg["radioButton2"]());

            app[GetType(), "CheckedChangeEvent"](radiobutton2.AppVar);
            radiobutton2.EmulateCheck(new Async());
            new NativeMessageBox(testDlg.WaitForNextModal()).EmulateButtonClick("OK");
            int count = (int)testDlg["async_counter"]().Core;

            Assert.AreEqual(11, count);
        }
Beispiel #4
0
 static void Assert(string accessPath, FormsRadioButton radioButton)
 => CaptureAdaptor.AddCode($"{accessPath}.Checked.Is({radioButton.Checked.ToString().ToLower()});");