public void FetchByDynamicObjParamsTest() { SqlDataRequest dataRequest = new SqlDataRequest(ConnectionString); string result = dataRequest.Fetch("[dbo].[usp_Test_Select]", new { Id = idGuid }); Assert.IsFalse(string.IsNullOrWhiteSpace(result)); }
public void FetchByJSONStringParamsTest() { SqlDataRequest dataRequest = new SqlDataRequest(ConnectionString); string result = dataRequest.Fetch("[dbo].[usp_Test_Select]", JsonConvert.SerializeObject(new { Id = idGuid })); Assert.IsFalse(string.IsNullOrWhiteSpace(result)); }
public void FetchWithoutParamsTest() { SqlDataRequest dataRequest = new SqlDataRequest(ConnectionString); string result = dataRequest.Fetch("[dbo].[usp_Test_Select]"); var token = JToken.Parse(result); Assert.IsTrue(token is JArray); }