Пример #1
0
        public virtual void testSubMap()
        {
            JDFAttributeMap m1 = new JDFAttributeMap("a1", "v1");

            m1.put("a2", "v2");
            Assert.IsTrue(m1.subMap((JDFAttributeMap)null));
            JDFAttributeMap m2    = new JDFAttributeMap("a1", "v1");
            JDFAttributeMap mStar = new JDFAttributeMap("a1", (string)null);

            Assert.IsTrue(m1.subMap(m2));
            Assert.IsTrue(m1.subMap(mStar));
            m2.put("a2", "v2");
            mStar = new JDFAttributeMap("a1", "*");
            Assert.IsTrue(m1.subMap(m2));
            Assert.IsTrue(m1.subMap(mStar));
            m2.put("a2", "v3");
            Assert.IsFalse(m1.subMap(m2));
            m2.put("a2", "v2");
            Assert.IsTrue(m1.subMap(m2));
            m2.put("a3", "v3");
            Assert.IsFalse(m1.subMap(m2));
            Assert.IsTrue(m1.subMap((JDFAttributeMap)null));
        }