public void IndentationCharacterValidationShouldValidateEmptyLine() { IndentationCharacterValidationRule rule = new IndentationCharacterValidationRule(true, true); Line aLine = new Line(new TokenBase[] {}); Assert.IsTrue(rule.IsValidFor(aLine)); }
public void IndentationCharacterValidationShouldValidateLine() { IndentationCharacterValidationRule rule = new IndentationCharacterValidationRule(true, true); Line aLine = new Line(new[] { TokenCreator.Create <IdentifierToken>("test") }); Assert.IsTrue(rule.Validates(aLine)); }
public void IndentationCharacterValidationShouldCorrectlyValidateSpacesAndTabs() { IndentationCharacterValidationRule rule = new IndentationCharacterValidationRule(true, true); IList <TokenBase> input = new List <TokenBase>(); input.Add(TokenCreator.Create <TabToken>()); input.Add(TokenCreator.Create <SpaceToken>()); input.Add(TokenCreator.Create <IdentifierToken>("test")); Line aLine = new Line(input); Assert.IsTrue(rule.IsValidFor(aLine)); }