package be.jeffcheasey88.peeratcode.parser.java; import static org.junit.jupiter.api.Assertions.assertEquals; import be.jeffcheasey88.peeratcode.parser.Parser; import be.jeffcheasey88.peeratcode.parser.TokenValidator; import be.jeffcheasey88.peeratcode.parser.state.StateTree; public class ValueTests { public static StateTree get(){ StateTree value_container = new StateTree<>(); return value_container; } private static Parser parser = new Parser(){ { setTokenizer(ModifierTests.TOKENIZER); setStateTree(get()); } }; JavaElement testCase(String value) throws Exception{ TokenValidator.TOKENS = 0; TokenValidator.MAX_VALIDATE = 0; JavaElement result = new JavaElement(); parser.parse(value, result); assertEquals(TokenValidator.TOKENS, TokenValidator.MAX_VALIDATE); return result; } }