public void TestEmulateChangeSelectionEventAsync()
        {
            //文字列設定 テスト対象ではないがここでもメッセージボックスが表示される。
            NativeEdit rich = new NativeEdit(testDlg.IdentifyFromDialogId(1040));
            Async async = new Async();
            rich.EmulateChangeText("abcdef", async);
            Assert.IsTrue(0 < MessageBoxUtility.CloseAll(testDlg, async));

            //EmulateChangeSelectionの非同期確認。
            async = new Async();
            rich.EmulateChangeSelection(1, 1, async);
            Assert.IsTrue(0 < MessageBoxUtility.CloseAll(testDlg, async));
        }
        public void TestEmulateChangeSelectionEvent()
        {
            //Edit 何もイベントは発生しない。
            NativeEdit edit = new NativeEdit(testDlg.IdentifyFromDialogId(1020));
            edit.EmulateChangeText("123");
            Assert.IsTrue(EventChecker.IsSameTestEvent(testDlg,
                delegate { edit.EmulateChangeSelection(1, 2); }));

            //RitchEdit EN_SELCHANGEが発生することを確認。
            NativeEdit rich = new NativeEdit(testDlg.IdentifyFromDialogId(1038));
            rich.EmulateChangeText("123");
            Assert.IsTrue(EventChecker.IsSameTestEvent(testDlg,
                delegate { rich.EmulateChangeSelection(1, 2); },
                //無視
                new CodeInfo[] {new CodeInfo(1038, NativeMethods.WM_COMMAND, EN_UPDATE)},
                //期待値
                new CodeInfo(1038, NativeMethods.WM_NOTIFY, EN_SELCHANGE)
                ));
        }