public void RuleFailsIfTotalIsMissingFromNodeStructure() { var mustHaveTotalRule = new MustHaveTotalRule(); var rootNode = new Node(); var ruleResult = mustHaveTotalRule.RunRule(ref rootNode); Assert.AreEqual(false, ruleResult.RulePassed); }
public void RuleFailsPassesIfTotalIsPresent() { var mustHaveTotalRule = new MustHaveTotalRule(); var rootNode = new Node() { Children = { new Node() { Name = TagNames.Total } } }; var ruleResult = mustHaveTotalRule.RunRule(ref rootNode); Assert.AreEqual(true, ruleResult.RulePassed); }