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