use of org.batfish.grammar.flatjuniper.FlatJuniperParser.Flat_juniper_configurationContext in project batfish by batfish.
the class FlatJuniperGrammarTest method testParsingRecovery.
@Test
public void testParsingRecovery() {
String recoveryText = CommonUtil.readResource("org/batfish/grammar/juniper/testconfigs/recovery");
Settings settings = new Settings();
FlatJuniperCombinedParser cp = new FlatJuniperCombinedParser(recoveryText, settings);
Flat_juniper_configurationContext ctx = cp.parse();
FlatJuniperRecoveryExtractor extractor = new FlatJuniperRecoveryExtractor();
ParseTreeWalker walker = new ParseTreeWalker();
walker.walk(extractor, ctx);
assertThat(extractor.getNumSets(), equalTo(8));
assertThat(extractor.getNumErrorNodes(), equalTo(8));
}
Aggregations