public void Test() { BasicBooter.Use<Win32AdbManager>(); var getter = new DevicesGetter(); getter.GetDevices().All((dev) => { Debug.WriteLine(dev); return true; }); ; BasicBooter.Free(); }
private void InitAutumnBoxBasic(IOperatingSystemService operatingSystemService) { try { Logger.Info("killing other adb processes"); operatingSystemService.KillProcess("adb.exe"); Logger.Info("autumnbox-adb-server is starting"); BasicBooter.Use <Win32AdbManager>(); Logger.Info($"autumnbox-adb-server is started at {BasicBooter.ServerEndPoint}"); } catch (Exception e) { Logger.Warn("there's some error happened while starting autumnbox-adb-server", e); throw e; } }
public void LoadManager() { BasicBooter.Use <Win32AdbManager>(); using var cpm = BasicBooter.CommandProcedureManager; using var cmd = cpm.OpenCommand("adb", "devices"); cmd.Execute(); if (cmd.Status == AutumnBox.Basic.ManagedAdb.CommandDriven.CommandStatus.InnerException) { Debug.WriteLine(cmd.Exception); } SLogger <BooterTest> .CDebug(cmd.Result.Output); Assert.IsTrue(cmd.Result.ExitCode == 0); Assert.IsFalse(cmd.Result.Output.Contains("daemon not running")); Assert.IsTrue(cmd.Result.Output.Contains("List of devices attached")); BasicBooter.Free(); }
public void DisposeTest() { bool cpmDisposed = false; bool cmdDisposed = false; BasicBooter.Use <Win32AdbManager>(); BasicBooter.CommandProcedureManager.Disposed += (s, e) => cpmDisposed = true; using var cmd = BasicBooter.CommandProcedureManager.OpenCommand("cmd.exe"); cmd.Disposed += (s, e) => cmdDisposed = true; var task = cmd.ExecuteAsync(); Thread.Sleep(1000); BasicBooter.Free(); Thread.Sleep(1000); Assert.IsTrue(cpmDisposed); Assert.IsTrue(cmdDisposed); Assert.IsFalse(task.Status == TaskStatus.Running); }
public static void Startup(TestContext context) { BasicBooter.Use <Win32AdbManager>(); }
public DevicesTest() { BasicBooter.Use <Win32AdbManager>(); }
public HestExecutorTest() { BasicBooter.Use <Win32AdbManager>(); }