Esempio n. 1
0
        public void UpdateTest()
        {
            Dictionary <string, string> target = new Dictionary <string, string>()
            {
                { "test1", "test1" },
                { "test2", "test2" },
                { "test3", "test3" }
            };
            Dictionary <string, string> append = new Dictionary <string, string>()
            {
                { "test4", "test4" },
                { "test5", "test5" },
                { "test2", "test6" }
            };
            Dictionary <string, string> result = new Dictionary <string, string>()
            {
                { "test1", "test1" },
                { "test2", "test2" },
                { "test3", "test3" },
                { "test4", "test4" },
                { "test5", "test5" }
            };

            target.Update(append);
            AssertExtras.DictionaryIsEqual(result, target);
            target.Update(null);
            AssertExtras.DictionaryIsEqual(result, target);
        }
Esempio n. 2
0
        public void RadioInputConstructorTest()
        {
            string name  = "Test1";
            string value = "TestVal";
            ElementAttributesDictionary attributes = new ElementAttributesDictionary();
            IChoice    choice = new Choice("test");
            int        index  = 4;
            RadioInput target = new RadioInput(name, value, attributes, choice, index);

            Assert.AreEqual(name, target.Name);
            Assert.AreEqual(value, target.Value);
            Assert.AreEqual(index, target.Index);
            Assert.AreSame(choice, target.Choice);
            AssertExtras.DictionaryIsEqual(attributes, target.Attributes);
        }