public void testAdd(PrintServices.Client client, UpdateDelegate action) { int x = 1; int y = 2; int sum = client.add(x, y); m_result = "x=" + x + "," + "y=" + y + "," + "Sum=" + sum; string str = m_StrTransport + "\n" + m_StrProtocol + "\n" + m_result + "\n"; action(str); if (sum != x + y) { throw new TestFailedException("testAdd Fail!"); } return; }