Exemple #1
0
 public void TestWithGoodData()
 {
     var testNode = StaticHelpers.GetNode("<set name=\"test1\">content 1</set>");
     _tagHandler = new Set(_user, testNode);
     Assert.AreEqual("content 1", _tagHandler.ProcessChange());
     Assert.AreEqual(true, _user.Predicates.ContainsKey("test1"));
 }
Exemple #2
0
 public void TestAbilityToRemovePredicates()
 {
     var testNode = StaticHelpers.GetNode("<set name=\"test1\">content 1</set>");
     _tagHandler = new Set(_user, testNode);
     Assert.AreEqual("content 1", _tagHandler.ProcessChange());
     Assert.AreEqual(true, _user.Predicates.ContainsKey("test1"));
     var testNode2 = StaticHelpers.GetNode("<set name=\"test1\"/>");
     _tagHandler = new Set(_user, testNode2);
     Assert.AreEqual("", _tagHandler.ProcessChange());
     Assert.AreEqual(false, _user.Predicates.ContainsKey("test1"));
 }
Exemple #3
0
 public void TestWithTooManyAttributes()
 {
     var testNode = StaticHelpers.GetNode("<set name=\"test 4\" value=\"value\" >content 4</set>");
     _tagHandler = new Set(_user, testNode);
     Assert.AreEqual("", _tagHandler.ProcessChange());
 }
Exemple #4
0
 public void TestWithNoAttributes()
 {
     var testNode = StaticHelpers.GetNode("<set/>");
     _tagHandler = new Set(_user, testNode);
     Assert.AreEqual("", _tagHandler.ProcessChange());
 }
Exemple #5
0
 public void TestWithBadNode()
 {
     var testNode = StaticHelpers.GetNode("<sot name=\"test2\">content 2</sot>");
     _tagHandler = new Set(_user, testNode);
     Assert.AreEqual("", _tagHandler.ProcessChange());
 }
Exemple #6
0
 public void TestWithBadAttribute()
 {
     var testNode = StaticHelpers.GetNode("<set nome=\"test 3\">content 3</set>");
     _tagHandler = new Set(_user, testNode);
     Assert.AreEqual("", _tagHandler.ProcessChange());
 }