Esempio n. 1
0
        public void TestAddEntry()
        {
            String_StringMapEntry item1 = new String_StringMapEntry();

            item1.key   = "key3";
            item1.value = "value3";
            mapUtils.AddEntry(item1);

            String_StringMapEntry item2 = new String_StringMapEntry();

            item2.key   = "key4";
            item2.value = "value4";
            mapUtils.AddEntry(item2);

            String_StringMapEntry[] entries = mapUtils.AsArray();
            Assert.AreEqual(2, entries.Length);
            Assert.AreEqual(entries[0].key, item1.key);
            Assert.AreEqual(entries[0].value, item1.value);
            Assert.AreEqual(entries[1].key, item2.key);
            Assert.AreEqual(entries[1].value, item2.value);
        }
Esempio n. 2
0
        public void TestAddEntry()
        {
            var item1 = new MockString_StringMapEntry()
            {
                key   = "key3",
                value = "value3"
            };
            var item2 = new MockString_StringMapEntry()
            {
                key   = "key4",
                value = "value4"
            };

            mapUtils.AddEntry(item1);
            mapUtils.AddEntry(item2);

            MockString_StringMapEntry[] entries = mapUtils.AsArray <MockString_StringMapEntry>();
            Assert.AreEqual(2, entries.Length);
            Assert.AreEqual(entries[0].key, item1.key);
            Assert.AreEqual(entries[0].value, item1.value);
            Assert.AreEqual(entries[1].key, item2.key);
            Assert.AreEqual(entries[1].value, item2.value);
        }