Ejemplo n.º 1
0
        public void Test()
        {
            Hashtable dic1 = _da.SelectAll1();

            Assert.AreEqual("John", ((Person)dic1[1]).FirstName);

            Hashtable dic2 = _da.SelectAll2();

            Assert.AreEqual("John", ((Person)dic2[new CompoundValue(_id, "Pupkin")]).FirstName);

            Hashtable dic3 = _da.SelectAll3();

            Assert.AreEqual("John", dic3[_id]);

            Hashtable dic4 = _da.SelectAll4();

            Assert.AreEqual("John", dic4[new CompoundValue(_id, "Pupkin")]);

            Hashtable dic5 = _da.SelectAll5();

            Assert.AreEqual("John", dic5[new CompoundValue(_id, "Pupkin")]);

            IDictionary dic6 = _da.SelectAllAsIDictionary();

            Assert.AreEqual("John", dic6[new CompoundValue(_id, "Pupkin")]);

            Dictionary <int, Person> dict1 = _da.SelectAllT1();

            Assert.AreEqual("John", dict1[1].FirstName);

            Dictionary <CompoundValue, Person> dict2 = _da.SelectAllT2();

            Assert.AreEqual("John", dict2[new CompoundValue(_id, "Pupkin")].FirstName);

            Dictionary <int, string> dict3 = _da.SelectAllT3();

            Assert.AreEqual("John", dict3[1]);

            Dictionary <CompoundValue, string> dict4 = _da.SelectAllT4();

            Assert.AreEqual("John", dict4[new CompoundValue(_id, "Pupkin")]);

            Dictionary <CompoundValue, string> dict5 = _da.SelectAllT5();

            Assert.AreEqual("John", dict5[new CompoundValue(_id, "Pupkin")]);

            IDictionary <CompoundValue, string> dict6 = _da.SelectAllAsIDictionaryT();

            Assert.AreEqual("John", dict6[new CompoundValue(_id, "Pupkin")]);
        }