Beispiel #1
0
 public void AwaitClientTask_NullAddress_ThrowsNullReferenceException()
 {
     using (var server = new AsyncServerSafe(new Handler()))
         Assert.Throws <ArgumentNullException>(
             async() => { server.Init(); server.Bind(null); await server.Task; });
 }
Beispiel #2
0
 public void AwaitClientTask_InvalidAddress_ThrowsArgumentOutOfRangeException()
 {
     using (var server = new AsyncServerSafe(new Handler()))
         Assert.Throws <ArgumentOutOfRangeException>(
             async() => { server.Init(); server.Bind("abc"); await server.Task; });
 }
Beispiel #3
0
 public void Init_InvalidAddress_NotFails()
 {
     using (var server = new AsyncServerSafe(new Handler()))
         Assert.DoesNotThrow(() => { server.Init(); server.Bind("abc"); });
 }