Example #1
0
 public void TestSettingOfPrefix()
 {
     var model = new TagModel(new Hashtable());
     var tag = new Bundle();
     tag.BaseName = new MockAttribute(new Constant("FormatTags/test"));
     tag.Prefix = new MockAttribute(new Constant("pre_"));
     Assert.That(tag.Evaluate(model), Is.EqualTo(String.Empty));
     var bundle = (ResourceBundle) model.SearchInTagScope(FormatConstants.BUNDLE);
     Assert.That(bundle.Prefix, Is.EqualTo("pre_"));
 }
Example #2
0
 public void CheckLoadingOfBundle()
 {
     var model = new TagModel(new Hashtable());
     var tag = new Bundle();
     tag.BaseName = new MockAttribute(new Constant("FormatTags/test"));
     Assert.That(tag.Evaluate(model), Is.EqualTo(String.Empty));
     Assert.That(model.SearchInTagScope(FormatConstants.BUNDLE), Is.Not.Null);
     Assert.That(model.SearchInTagScope(FormatConstants.BUNDLE) is ResourceBundle, Is.True);
     var bundle = (ResourceBundle) model.SearchInTagScope(FormatConstants.BUNDLE);
     Assert.That(bundle.BaseName, Is.EqualTo("FormatTags/test"));
 }