示例#1
0
        public void ShouldOverrideItem()
        {
            NameSpaceDictionary <string> rb;

            rb = new NameSpaceDictionary <string>();
            rb.Add("nsA", "A", "a");
            rb.Add("nsB", "A", "b");
            Assert.AreEqual("b", rb.GetItem("A"));
        }
示例#2
0
 protected override void OnItemLoaded(InlineFormatCollection Item)
 {
     foreach (InlineFormat format in Item.Items)
     {
         dictionary.Add(Item.NameSpace, format.Name, format);
     }
 }
示例#3
0
        public void ShouldGetFullNamedItem()
        {
            NameSpaceDictionary <string> rb;

            rb = new NameSpaceDictionary <string>();
            rb.Add("nsA", "A", "a");
            Assert.AreEqual("a", rb.GetItem("nsA.A"));
            Assert.AreEqual("a", rb.GetItem("nsA", "nsA.A"));
            Assert.AreEqual("a", rb.GetItem("nsB", "nsA.A"));
        }