Example #1
0
        public override void DidFinishLaunching(NSNotification notification)
        {
            ui = new MacUI();

            isStopped = true;
            ui.TestRunner.Stop.NotifyStateChanged.StateChanged     += (sender, e) => IsStopped = !e;
            ui.ServerManager.Start.NotifyStateChanged.StateChanged += (sender, e) => HasServer = !e;
            IsStopped = true;

            settingsDialogController = new SettingsDialogController();

            mainWindowController = new MainWindowController();
            mainWindowController.Window.MakeKeyAndOrderFront(this);

            ui.ServerManager.TestSession.PropertyChanged += (sender, e) => {
                currentSession = e;
                if (SessionChangedEvent != null)
                {
                    SessionChangedEvent(this, e);
                }
            };

            var options = Environment.GetEnvironmentVariable("XAMARIN_ASYNCTESTS_OPTIONS");

            if (options != null)
            {
                StartWithOptions(options);
            }
            else
            {
                StartServer();
            }

            settingsDialogController.DidFinishLaunching();
        }
Example #2
0
        public CommandProvider(MacUI app, CommandProvider parent)
        {
            App = app;

            IsEnabled = new BooleanProperty("IsEnabled", true);
            CanStart  = new BooleanProperty("CanStart", true);
            CanStop   = new BooleanProperty("CanStop", false);

            notifyCanExecute = new NotifyStateChanged(IsEnabled, CanStart);
            if (parent != null)
            {
                notifyCanExecute.Register(parent.NotifyHasInstance);
            }

            stopCommand = new StopCommand(this);
        }
Example #3
0
        async void RunInitialize()
        {
            MacUI.Debug("INIT: {0} {1} {2}\n{3}", Test.Path.FullName, Test.HasChildren, Test.HasParameters, Test.Path.SerializePath());

            initTcs = new TaskCompletionSource <bool> ();
            if (!Test.HasChildren && !Test.HasParameters)
            {
                children = new TestCaseModel [0];
                initTcs.SetResult(false);
                return;
            }

            try {
                await DoInitialize();

                initTcs.SetResult(children.Count > 0);
            } catch (Exception ex) {
                initTcs.SetException(ex);
            }
        }
Example #4
0
 public ServerManager(MacUI app)
     : base(app, null)
 {
     startCommand = new ServerCommand(this);
 }
Example #5
0
 public TestRunner(MacUI app)
     : base(app, app.ServerManager)
 {
     runCommand = new RunCommand(this);
 }
Example #6
0
 public UILogger(MacUI app)
 {
     App = app;
 }