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(); }
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); }
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); } }
public ServerManager(MacUI app) : base(app, null) { startCommand = new ServerCommand(this); }
public TestRunner(MacUI app) : base(app, app.ServerManager) { runCommand = new RunCommand(this); }
public UILogger(MacUI app) { App = app; }