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")); }
protected override void OnItemLoaded(InlineFormatCollection Item) { foreach (InlineFormat format in Item.Items) { dictionary.Add(Item.NameSpace, format.Name, format); } }
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")); }