public void Test()
        {
            SingleColumnCollection c = new SingleColumnCollection();

            Assert.AreEqual <string>("china", c[0]);
            Assert.AreEqual <int>(2, c["ch"].Length); // 命中china和chile两项
            Assert.AreEqual <string>("china", c["ch"][0]);
        }
Beispiel #2
0
        public void IndexerTest()
        {
            SingleColumnCollection collection = new SingleColumnCollection(new [] { "China", "Chile", "UK" });

            Assert.AreEqual("China", collection[0]);
            string[] candidates = collection["Ch"];
            Assert.AreEqual(2, candidates.Length);
            Assert.AreEqual("China", candidates[0]);
            Assert.AreEqual("Chile", candidates[1]);
        }