public void Test_Abandon_After_Dispose() { using (TestServer server = new TestServer(ServiceName)) { server.Register(); using (DdeClient client = new DdeClient(ServiceName, TopicName)) { client.Connect(); client.Pause(); IAsyncResult ar = client.BeginExecute(CommandText, null, null); client.Dispose(); client.Abandon(ar); } } }
public void Test_Abandon() { using (TestServer server = new TestServer(ServiceName)) { server.Register(); using (DdeClient client = new DdeClient(ServiceName, TopicName)) { client.Connect(); client.Pause(); IAsyncResult ar = client.BeginExecute(CommandText, null, null); Assert.IsFalse(ar.AsyncWaitHandle.WaitOne(Timeout, false)); client.Abandon(ar); client.Resume(); Assert.IsFalse(ar.AsyncWaitHandle.WaitOne(Timeout, false)); } } }
public void Test_Resume_After_Dispose() { using (TestServer server = new TestServer(ServiceName)) { server.Register(); using (DdeClient client = new DdeClient(ServiceName, TopicName)) { client.Connect(); client.Pause(); client.Dispose(); client.Resume(); } } }
public void Test_IsPaused_Variation_3() { using (TestServer server = new TestServer(ServiceName)) { server.Register(); using (DdeClient client = new DdeClient(ServiceName, TopicName)) { client.Connect(); client.Pause(); client.Resume(); Assert.IsFalse(client.IsPaused); } } }