public void TestThatIntsAreConvertedToStringsProperly() { // send up an int and see if it is coerced to a string properly for (int i = 0; i < 3; i++) { // build test data InsightTestDataIntString[] array = new InsightTestDataIntString[i]; for (int j = 0; j < i; j++) { array[j] = new InsightTestDataIntString() { String = j } } ; // run the query var items = Connection().Query <InsightTestDataString>("InsightTestDataStringTestProc", new { p = array.ToList() }); Assert.IsNotNull(items); Assert.AreEqual(i, items.Count); for (int j = 0; j < i; j++) { Assert.AreEqual(j.ToString(), items[j].String); } } }
public void TestThatIntsAreConvertedToStringsProperly() { // send up an int and see if it is coerced to a string properly for (int i = 0; i < 3; i++) { // build test data InsightTestDataIntString[] array = new InsightTestDataIntString[i]; for (int j = 0; j < i; j++) array[j] = new InsightTestDataIntString() { String = j }; // run the query var items = _connection.Query<InsightTestDataString>("InsightTestDataStringTestProc", new { p = array.ToList() }); Assert.IsNotNull(items); Assert.AreEqual(i, items.Count); for (int j = 0; j < i; j++) Assert.AreEqual(j.ToString(), items[j].String); } }