public void SetDeviceOtherException() { var requests = new string[] { "host:transport:169.254.109.177:5555" }; Assert.Throws <AdbException>(() => this.RunTest( new AdbResponse[] { AdbResponse.FromError("Too many cats.") }, NoResponseMessages, requests, () => { this.Socket.SetDevice(Device); })); }
public void SetInvalidDeviceTest() { var requests = new string[] { "host:transport:169.254.109.177:5555" }; Assert.Throws <DeviceNotFoundException>(() => this.RunTest( new AdbResponse[] { AdbResponse.FromError("device not found") }, NoResponseMessages, requests, () => { this.Socket.SetDevice(Device); })); }
public void SetDeviceOtherException() { var requests = new string[] { "host:transport:169.254.109.177:5555" }; this.RunTest( new AdbResponse[] { AdbResponse.FromError("Too many cats.") }, NoResponseMessages, requests, () => { AdbClient.Instance.SetDevice(this.Socket, Device); }); }
public void SetInvalidDeviceTest() { var requests = new string[] { "host:transport:169.254.109.177:5555" }; this.RunTest( new AdbResponse[] { AdbResponse.FromError("device not found") }, NoResponseMessages, requests, () => { AdbClient.Instance.SetDevice(this.Socket, Device); }); }
public void CreateDuplicateForwardTest() { var responses = new AdbResponse[] { AdbResponse.FromError("cannot rebind existing socket") }; var requests = new string[] { "host-serial:169.254.109.177:5555:forward:norebind:tcp:1;tcp:2" }; Assert.Throws <AdbException>(() => this.RunTest( responses, NoResponseMessages, requests, () => { this.TestClient.CreateForward(Device, "tcp:1", "tcp:2", false); })); }
public void ToStringTest() { Assert.AreEqual("OK", AdbResponse.OK.ToString()); Assert.AreEqual("Error: Huh?", AdbResponse.FromError("Huh?").ToString()); }