public void TestValidation() { DomNodeType type = new DomNodeType("child"); ChildInfo test = new ChildInfo("test", type); CollectionAssert.IsEmpty(test.Rules); var rule = new SimpleChildRule(); test.AddRule(rule); Utilities.TestSequenceEqual(test.Rules, rule); Assert.True(test.Validate(null, null)); Assert.True(rule.Validated); }
public void TestValidation() { DomNodeType type = new DomNodeType("child"); ChildInfo test = new ChildInfo("test", type); CollectionAssert.IsEmpty(test.Rules); var rule = new SimpleChildRule(); test.AddRule(rule); Utilities.TestSequenceEqual(test.Rules, rule); Assert.True(test.Validate(null, null)); Assert.True(rule.Validated); }