public void TestMethod() { WCFTest.SearcherClient client = null; try { client = new WCFTest.SearcherClient(); string result = client.QueryCommodityPage(1, 30, "男装", null, null, null); client.Close(); } catch (Exception ex) { if (client != null) { client.Abort(); } } }
public void TestMethod() { WCFTest.SearcherClient client = null; try { client = new WCFTest.SearcherClient(); string result = client.QueryCommodityPage(1, 30, "男装", null, null, null); client.Close(); Assert.IsNotNull(result); } catch { if (client != null) { client.Abort(); } } }