コード例 #1
0
        public void TestCheckBoxCheck()
        {
            FormsCheckBox checkbox = new FormsCheckBox(testDlg["checkBox"]());

            checkbox.EmulateCheck(CheckState.Checked);
            Assert.AreEqual(CheckState.Checked, checkbox.CheckState);

            //非同期
            app[GetType(), "CheckedChangeEvent"](checkbox.AppVar);
            checkbox.EmulateCheck(CheckState.Unchecked, new Async());
            new NativeMessageBox(testDlg.WaitForNextModal()).EmulateButtonClick("OK");
            Assert.AreEqual(CheckState.Unchecked, checkbox.CheckState);
        }
コード例 #2
0
 static void Assert(string accessPath, FormsCheckBox checkBox)
 {
     CaptureAdaptor.AddUsing(typeof(CheckState).Namespace);
     CaptureAdaptor.AddCode($"{accessPath}.CheckState.Is(CheckState.{checkBox.CheckState});");
 }