Example #1
0
        public void Test___Method_Convert()
        {
            var testee = new DictionaryConverter()
            {
                Dictionary = new Dictionary <object, object>()
                {
                    { 1, "One" },
                    { 2, "Two" },
                    { 3, "Three" }
                },
                Default = "Many"
            };

            Assert.AreEqual("One", testee.ConvertToObject(1));
            Assert.AreEqual("Two", testee.ConvertToObject(2));
            Assert.AreEqual("Three", testee.ConvertToObject(3));
            Assert.AreEqual("Many", testee.ConvertToObject(4));
        }