@Test public void testUnknown() { String unknownConfig = "unknown config line\n"; String unknownRancid = "!RANCID-CONTENT-TYPE: madeup\nThis is an ASA device"; for (String config : ImmutableList.of(unknownConfig, unknownRancid)) { assertThat(identifyConfigurationFormat(config), equalTo(UNKNOWN)); } }
public static ConfigurationFormat identifyConfigurationFormat(String fileText) { return new VendorConfigurationFormatDetector(fileText).identifyConfigurationFormat(); }
VendorConfigurationFormatDetector { public static ConfigurationFormat identifyConfigurationFormat(String fileText) { return new VendorConfigurationFormatDetector(fileText).identifyConfigurationFormat(); } }
VendorConfigurationFormatDetector { public static ConfigurationFormat identifyConfigurationFormat(String fileText) { return new VendorConfigurationFormatDetector(fileText).identifyConfigurationFormat(); } private  VendorConfigurationFormatDetector(String fileText); }
VendorConfigurationFormatDetector { public static ConfigurationFormat identifyConfigurationFormat(String fileText) { return new VendorConfigurationFormatDetector(fileText).identifyConfigurationFormat(); } private  VendorConfigurationFormatDetector(String fileText); static ConfigurationFormat identifyConfigurationFormat(String fileText); }
VendorConfigurationFormatDetector { public static ConfigurationFormat identifyConfigurationFormat(String fileText) { return new VendorConfigurationFormatDetector(fileText).identifyConfigurationFormat(); } private  VendorConfigurationFormatDetector(String fileText); static ConfigurationFormat identifyConfigurationFormat(String fileText); static final String BATFISH_FLATTENED_JUNIPER_HEADER; static final String BATFISH_FLATTENED_PALO_ALTO_HEADER; static final String BATFISH_FLATTENED_VYOS_HEADER; }