public void ValidateIntegerRule_ShouldReturnFalse(string input) { ILexicalRules IntegerValidator = new IntegerRule(); bool result = IntegerValidator.validate(input); Assert.False(result); }
public bool IsGrammarCorrect() { AttrRef attrRef = new AttrRef(text, declarations); if (attrRef.IsGrammarCorrect()) { refType = attrRef.refType; return(true); } ProglineSynonym proglineSynonym = new ProglineSynonym(text, declarations); if (proglineSynonym.IsGrammarCorrect()) { refType = RefType.Integer; return(true); } BracesIdent bracesIdent = new BracesIdent(); if (bracesIdent.validate(text)) { refType = RefType.String; return(true); } IntegerRule integerRule = new IntegerRule(); if (integerRule.validate(text)) { refType = RefType.Integer; return(true); } return(false); }