本文整理汇总了C#中TestClient.WaitAndClose方法的典型用法代码示例。如果您正苦于以下问题:C# TestClient.WaitAndClose方法的具体用法?C# TestClient.WaitAndClose怎么用?C# TestClient.WaitAndClose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestClient
的用法示例。
在下文中一共展示了TestClient.WaitAndClose方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: T01_Successful2
public void T01_Successful2()
{
TestConnector c = new TestConnector();
TestClient t= new TestClient();
c.AsyncConnect(t, new TelnetParameter(GetConnectableIP(), GetConnectablePort()));
t.WaitAndClose();
Assert.IsTrue(c.Succeeded);
}
示例2: T05_NotConnectable3
public void T05_NotConnectable3()
{
TestConnector c = new TestConnector();
TestClient t= new TestClient();
c.AsyncConnect(t, new TelnetParameter(GetConnectableDNSName(), GetClosedPort())); //ホストはあるがポートが開いてない
t.WaitAndClose();
Assert.IsFalse(c.Succeeded);
Debug.WriteLine(String.Format("NotConnectable3 [{0}]", c.ErrorMessage));
}
示例3: T04_NotConnectable2
public void T04_NotConnectable2()
{
TestConnector c = new TestConnector();
TestClient t= new TestClient();
c.AsyncConnect(t, new TelnetParameter(GetUnknownDNSName(), GetConnectablePort())); //DNSエラー
t.WaitAndClose();
Assert.IsFalse(c.Succeeded);
Debug.WriteLine(String.Format("NotConnectable2 [{0}]", c.ErrorMessage));
}
示例4: T03_NotConnectable1
public void T03_NotConnectable1()
{
TestConnector c = new TestConnector();
TestClient t= new TestClient();
c.AsyncConnect(t, new TelnetParameter(GetUnreachableIP(), GetConnectablePort())); //存在しないホスト
t.WaitAndClose();
Assert.IsFalse(c.Succeeded);
Debug.WriteLine(String.Format("NotConnectable1 [{0}]", c.ErrorMessage));
}
示例5: T06_NegotiationFailed
public void T06_NegotiationFailed()
{
TestConnector c = new TestConnector();
c.SetError(true);
TestClient t= new TestClient();
c.AsyncConnect(t, new TelnetParameter(GetConnectableDNSName(), GetConnectablePort()));
t.WaitAndClose();
Assert.IsFalse(c.Succeeded);
Debug.WriteLine(String.Format("NegotiationFailed [{0}]", c.ErrorMessage));
}