public void TestConnection() { using (var device = new ASCOM.DriverAccess.Telescope("ASCOM.EQ500X.Telescope")) { bool dummy = false; Assert.IsFalse(device.Connected); Assert.IsFalse(device.CommandBool("isSimulated", dummy)); try { device.Connected = true; //Assert.IsTrue(device.Connected); //Assert.IsTrue(device.CommandBool("isSimulated", dummy)); device.Connected = false; } catch (Exception) { } Assert.IsFalse(device.Connected); Assert.IsFalse(device.CommandBool("isSimulated", dummy)); } }
public void TestSimulation() { using (var device = new ASCOM.DriverAccess.Telescope("ASCOM.EQ500X.Telescope")) { bool dummy = false; Assert.IsFalse(device.Connected); Assert.IsFalse(device.CommandBool("isSimulated", dummy)); Assert.IsTrue(device.CommandBool("Simulated", true)); Assert.IsTrue(device.CommandBool("isSimulated", dummy)); device.Connected = true; Assert.IsTrue(device.Connected); Assert.IsTrue(device.CommandBool("isSimulated", dummy)); device.Connected = false; Assert.IsFalse(device.Connected); Assert.IsTrue(device.CommandBool("isSimulated", dummy)); Assert.IsFalse(device.CommandBool("Simulated", false)); Assert.IsFalse(device.CommandBool("isSimulated", dummy)); } }
public void setUp() { device = new ASCOM.DriverAccess.Telescope("ASCOM.EQ500X.Telescope"); device.CommandBool("Simulated", true); }
public bool CommandBool(string command, bool raw) { CheckConnected(); return(m_mount.CommandBool(command, raw)); }