Пример #1
0
 public void Test_TryPoke_Variation_2()
 {
     using (TestServer server = new TestServer(ServiceName))
     {
         server.Register();
         using (DdeClient client = new DdeClient(ServiceName, TopicName))
         {
             client.Connect();
             int result = client.TryPoke(ItemName, Encoding.ASCII.GetBytes(TestData), 1, Timeout);
             Assert.AreEqual(0, result);
             Assert.AreEqual(TestData, Encoding.ASCII.GetString(server.GetData(TopicName, ItemName, 1)));
         }
     }
 }
Пример #2
0
 public void Test_TryPoke_Variation_1()
 {
     using (TestServer server = new TestServer(ServiceName))
     {
         server.Register();
         using (DdeClient client = new DdeClient(ServiceName, TopicName))
         {
             int result = client.TryPoke(ItemName, Encoding.ASCII.GetBytes(TestData), 1, Timeout);
             Assert.AreNotEqual(0, result);
         }
     }
 }