public void Test_Unregister_Before_Register() { using (DdeServer server = new TestServer(ServiceName)) { Assert.Throws<InvalidOperationException>(() => server.Unregister()); } }
public void Test_Unregister_Before_Register() { using (DdeServer server = new TestServer(ServiceName)) { server.Unregister(); } }
public void Test_Unregister_After_Dispose() { using DdeServer server = new TestServer(ServiceName); server.Register(); server.Dispose(); Assert.Throws<ObjectDisposedException>(() => server.Unregister()); }
public void Test_Unregister_After_Dispose() { using (DdeServer server = new TestServer(ServiceName)) { server.Register(); server.Dispose(); server.Unregister(); } }
public void Test_Unregister() { using var context = new DdeContext(); var listener = new EventListener(); context.Unregister += listener.OnEvent; context.Initialize(); using (DdeServer server = new TestServer(ServiceName)) { server.Register(); server.Unregister(); } Assert.IsTrue(listener.Received.WaitOne(Timeout, false)); }
public void Test_Unregister() { using DdeServer server = new TestServer(ServiceName); server.Register(); server.Unregister(); using var client = new DdeClient(ServiceName, TopicName); try { client.Connect(); Assert.Fail(); } catch (DdeException e) { Assert.AreEqual(0x400A, e.Code); } }
public void Test_Unregister() { using (DdeContext context = new DdeContext()) { EventListener listener = new EventListener(); context.Unregister += listener.OnEvent; context.Initialize(); using (DdeServer server = new TestServer(ServiceName)) { server.Register(); server.Unregister(); } Assert.IsTrue(listener.Received.WaitOne(Timeout, false)); } }
public void Test_Unregister_Before_Register() { using (DdeServer server = new TestServer(ServiceName)) { server.Unregister(); } }
public void Test_Unregister_After_Dispose() { using (DdeServer server = new TestServer(ServiceName)) { server.Register(); server.Dispose(); server.Unregister(); } }
public void Test_Unregister() { using (DdeServer server = new TestServer(ServiceName)) { server.Register(); server.Unregister(); using (DdeClient client = new DdeClient(ServiceName, TopicName)) { try { client.Connect(); Assert.Fail(); } catch (DdeException e) { Assert.AreEqual(0x400A, e.Code); } } } }