Start() public static method

public static Start ( ) : void
return void
Beispiel #1
0
        public void OpenFileDialog()
        {
            using (var runner = new DialogRunner(new SWF.OpenFileDialog())) {
                VerifyBasicProperties(runner.Dialog);

                UiaAtkBridge.Window dialogAdapter =
                    BridgeTester.GetAdapterForWidget(runner.Dialog) as UiaAtkBridge.Window;

                Atk.Object popupButtonPanelAdapter = dialogAdapter.RefAccessibleChild(10);
                Assert.AreEqual(5, popupButtonPanelAdapter.NAccessibleChildren, "PopupButtonPanel (toolbar) should have 5 children");

                Atk.Object popupButtonAdapter1 = popupButtonPanelAdapter.RefAccessibleChild(0).RefAccessibleChild(0);
                AtkTester.States(popupButtonAdapter1,
                                 Atk.StateType.Enabled,
                                 Atk.StateType.Selectable,
                                 Atk.StateType.Focusable,
                                 Atk.StateType.Sensitive,
                                 Atk.StateType.Showing,
                                 Atk.StateType.Visible);

                // TODO: Enable the below if we find a way
                // to get the MWFFileView to update
                //Atk.Object treeTable = dialogAdapter.RefAccessibleChild (3);
                //Assert.AreEqual (Atk.Role.TreeTable, treeTable.Role, "TreeTable Role");
                //Atk.Object tableCell = treeTable.RefAccessibleChild (1);;
                //Assert.IsNotNull (tableCell, "TableCell should not be null");
                //Assert.AreEqual (Atk.Role.TableCell, tableCell.Role, "TableCell role");
                //Atk.Action atkAction = Atk.ActionAdapter.GetObject (tableCell.Handle, false);
                //Assert.AreEqual (2, atkAction.NActions, "TableCell NActions");
                //Assert.AreEqual ("invoke", atkAction.GetName (1), "TableCell Action.GetName (1)");

                Atk.Object comboBox = dialogAdapter.RefAccessibleChild(8);
                Assert.AreEqual(Atk.Role.ComboBox, comboBox.Role, "ComboBox Role");
                Atk.Object list = comboBox.RefAccessibleChild(0);
                Assert.IsTrue(list.NAccessibleChildren > 0, "ComboBox child should have children");
                EventMonitor.Start();
                Atk.ISelection atkSelection = Atk.SelectionAdapter.GetObject(list.Handle, false);
                atkSelection.AddSelection(5);
                string          evType      = "object:state-changed:selected";
                EventCollection events      = EventMonitor.Pause();
                EventCollection evs         = events.FindByType(evType).FindWithDetail1("1");
                string          eventsInXml = String.Format(" events in XML: {0}", Environment.NewLine + events.OriginalGrossXml);
                Assert.IsTrue(evs.Count > 0, "bad number of " + evType + " events: " + eventsInXml);
            }
        }
Beispiel #2
0
        static GailTester()
        {
            try {
                GLib.Global.ProgramName = "nunit-console";
                guiThread = new GailTestApp.MovingThread();
                guiThread.NotMainLoopDeleg = Gtk.Application.Init;
                guiThread.Start();
                guiThread.JoinUntilSuspendedByMainLoop();

                GailTestApp.MainClass.StartRemotely(guiThread);
                System.Threading.Thread.Sleep(1000);
                EventMonitor.Start();
                System.Threading.Thread.Sleep(1000);
            }
            catch (Exception e) {
                Console.WriteLine("Exception at tests initialization: " + e);
                throw;
            }
        }
Beispiel #3
0
 protected void StartEventMonitor()
 {
     events = null;
     EventMonitor.Start();
 }