예제 #1
0
        public void TestCreate()
        {
            var t1 = new int[] { 1, 2, 3, 4, 5, 6 };
            var t2 = new string[] { "a", "b", "c" };

            var d = new DataMap();

            d.Add("int", t1);
            d.Add("string", t2);

            Assert.Equal(2, d.ColumnCount);
            Assert.Equal(6, d.RowCount);

            Assert.Equal(t1, d["int"].UnderlyingList);
            Assert.Equal(t2, d["string"].UnderlyingList);

            Assert.Equal(t1, d.GetAs <int>("int"));
            Assert.Equal(t2, d.GetAs <string>("string"));
        }