Example #1
0
        public void TestGetValuesWithNull()
        {
            using (IDataReader reader = new InMemoryDataReader(false, this.Data4))
            {
                Assert.IsTrue(reader.Read(), "Read");

                object[] buffer = new object[3];
                Assert.AreEqual(2, reader.GetValues(buffer), "Number of values");
                var strings = buffer.Cast <string>().ToArray();
                Assert.AreEqual(new string[] { "R1C1", null, "R1C3" }, strings, "Data equal");
            }
        }