[Test] // bug #79988 public void OutParametersTest () { IPEndPoint localEP = new IPEndPoint (IPAddress.Loopback, 5000); using (SocketResponder sr = new SocketResponder (localEP, s => OutParametersResponse (s))) { FooService service = new FooService (); service.Url = "http://" + IPAddress.Loopback.ToString () + ":5000/"; int a; bool b; Elem [] e = service.Req ("x", out a, out b); Assert.IsNull (e, "#A1"); Assert.AreEqual (0, a, "#A2"); Assert.IsFalse (b, "#A3"); service.Dispose (); } }
[Test] // bug #79988 public void OutParametersTest() { IPEndPoint localEP = new IPEndPoint(IPAddress.Loopback, 5000); using (SocketResponder sr = new SocketResponder(localEP, s => OutParametersResponse(s))) { FooService service = new FooService(); service.Url = "http://" + IPAddress.Loopback.ToString() + ":5000/"; int a; bool b; Elem [] e = service.Req("x", out a, out b); Assert.IsNull(e, "#A1"); Assert.AreEqual(0, a, "#A2"); Assert.IsFalse(b, "#A3"); service.Dispose(); } }
static void Main () { IPEndPoint localEP = new IPEndPoint (IPAddress.Loopback, 5000); using (SocketResponder sr = new SocketResponder (localEP, new SocketRequestHandler (Response_Bug79988))) { sr.Start (); FooService service = new FooService (); service.Url = "http://" + IPAddress.Loopback.ToString () + ":5000/"; int a; bool b; Elem [] e = service.Req ("x", out a, out b); Assert.IsNull (e, "#A1"); Assert.AreEqual (0, a, "#A2"); Assert.IsFalse (b, "#A3"); } }
static void Main () { IPEndPoint localEP = new IPEndPoint (IPAddress.Loopback, 5000); using (SocketResponder sr = new SocketResponder (localEP, new SocketRequestHandler (Response_Bug80131))) { sr.Start (); FooService service = new FooService (); service.Url = "http://" + sr.LocalEndPoint.Address.ToString () + ":5000/"; int a; bool b; Elem [] e = service.Req ("x", out a, out b); Assert.IsNotNull (e, "#B1"); Assert.AreEqual (1, e.Length, "#B2"); Assert.AreEqual ("whatever", e [0].attr, "#B2"); Assert.AreEqual (5, a, "#B3"); Assert.IsTrue (b, "#B4"); } }