示例#1
0
        public void TestMethod1()
        {
            DataTable        dt         = SqlCommon.GetDataTable();
            WebApiController controller = new WebApiController();

            string methodName = "";
            string param      = "";
            string type       = "1";
            string t          = controller.Get(methodName, param, type);

            // Act

            // Assert
            Assert.AreEqual("1", "1");
        }
示例#2
0
 /// <summary>
 /// newtonsoft 转换字符串参考  http://www.newtonsoft.com/json
 /// </summary>
 /// <param name="methodName"></param>
 /// <param name="param"></param>
 /// <param name="type"></param>
 /// <returns></returns>
 public string Get(string methodName, string param, string type)
 {
     return(JsonConvert.SerializeObject(SqlCommon.GetDataTable()));
 }