@Test public void testIosXr() { String xr = "!! IOS XR Configuration 5.2.4\n"; String xrRancid = "!RANCID-CONTENT-TYPE: cisco-xr\n"; String xrRancidGeneric = "!RANCID-CONTENT-TYPE: cisco\n" + xr; for (String fileText : ImmutableList.of(xr, xrRancid, xrRancidGeneric)) { assertThat(identifyConfigurationFormat(fileText), equalTo(CISCO_IOS_XR)); } }
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; }