@Test public void shouldHaveAllCoreApisInApiGeneratorUtils() { Map<String, ApiImplementor> generatorApis = ApiGeneratorUtils.getAllImplementors().stream() .collect(Collectors.toMap(ApiImplementor::getPrefix, Function.identity())); for (Entry<String, ApiImplementor> entry : coreApis.entrySet()) { ApiImplementor api = generatorApis.remove(entry.getKey()); assertThat( String.format("The API %s was not added to ApiGeneratorUtils.", entry.getKey()), api, is(notNullValue())); assertThat( String.format("The API %s has no options in generator.", entry.getKey()), api.hasApiOptions(), is(entry.getValue().hasApiOptions())); } assertThat( "API(s) found in generator not present in ZAP.", generatorApis.keySet(), is(empty())); }
public static List<ApiImplementor> getAllImplementors() { List<ApiImplementor> imps = new ArrayList<>(); ApiImplementor api; imps.add(new AlertAPI(null)); api = new AntiCsrfAPI(null); api.addApiOptions(new AntiCsrfParam()); imps.add(api); imps.add(new PassiveScanAPI(null)); imps.add(new SearchAPI(null)); api = new AutoUpdateAPI(null); api.addApiOptions(new OptionsParamCheckForUpdates()); imps.add(api); api = new SpiderAPI(null); api.addApiOptions(new SpiderParam()); imps.add(api); api = new CoreAPI(new ConnectionParam()); imps.add(api); imps.add(new ParamsAPI(null)); api = new ActiveScanAPI(null); api.addApiOptions(new ScannerParam()); imps.add(api); imps.add(new ContextAPI()); imps.add(new HttpSessionsAPI(null)); imps.add(new BreakAPI(null)); imps.add(new AuthenticationAPI(null)); imps.add(new AuthorizationAPI()); imps.add(new ProxiesAPI(null)); imps.add(new RuleConfigAPI(null)); imps.add(new SessionManagementAPI(null)); imps.add(new UsersAPI(null)); imps.add(new ForcedUserAPI(null)); imps.add(new ScriptAPI(null)); api = new StatsAPI(null); api.addApiOptions(new StatsParam()); imps.add(api); return imps; }
ApiGeneratorUtils { public static List<ApiImplementor> getAllImplementors() { List<ApiImplementor> imps = new ArrayList<>(); ApiImplementor api; imps.add(new AlertAPI(null)); api = new AntiCsrfAPI(null); api.addApiOptions(new AntiCsrfParam()); imps.add(api); imps.add(new PassiveScanAPI(null)); imps.add(new SearchAPI(null)); api = new AutoUpdateAPI(null); api.addApiOptions(new OptionsParamCheckForUpdates()); imps.add(api); api = new SpiderAPI(null); api.addApiOptions(new SpiderParam()); imps.add(api); api = new CoreAPI(new ConnectionParam()); imps.add(api); imps.add(new ParamsAPI(null)); api = new ActiveScanAPI(null); api.addApiOptions(new ScannerParam()); imps.add(api); imps.add(new ContextAPI()); imps.add(new HttpSessionsAPI(null)); imps.add(new BreakAPI(null)); imps.add(new AuthenticationAPI(null)); imps.add(new AuthorizationAPI()); imps.add(new ProxiesAPI(null)); imps.add(new RuleConfigAPI(null)); imps.add(new SessionManagementAPI(null)); imps.add(new UsersAPI(null)); imps.add(new ForcedUserAPI(null)); imps.add(new ScriptAPI(null)); api = new StatsAPI(null); api.addApiOptions(new StatsParam()); imps.add(api); return imps; } }
ApiGeneratorUtils { public static List<ApiImplementor> getAllImplementors() { List<ApiImplementor> imps = new ArrayList<>(); ApiImplementor api; imps.add(new AlertAPI(null)); api = new AntiCsrfAPI(null); api.addApiOptions(new AntiCsrfParam()); imps.add(api); imps.add(new PassiveScanAPI(null)); imps.add(new SearchAPI(null)); api = new AutoUpdateAPI(null); api.addApiOptions(new OptionsParamCheckForUpdates()); imps.add(api); api = new SpiderAPI(null); api.addApiOptions(new SpiderParam()); imps.add(api); api = new CoreAPI(new ConnectionParam()); imps.add(api); imps.add(new ParamsAPI(null)); api = new ActiveScanAPI(null); api.addApiOptions(new ScannerParam()); imps.add(api); imps.add(new ContextAPI()); imps.add(new HttpSessionsAPI(null)); imps.add(new BreakAPI(null)); imps.add(new AuthenticationAPI(null)); imps.add(new AuthorizationAPI()); imps.add(new ProxiesAPI(null)); imps.add(new RuleConfigAPI(null)); imps.add(new SessionManagementAPI(null)); imps.add(new UsersAPI(null)); imps.add(new ForcedUserAPI(null)); imps.add(new ScriptAPI(null)); api = new StatsAPI(null); api.addApiOptions(new StatsParam()); imps.add(api); return imps; }  }
ApiGeneratorUtils { public static List<ApiImplementor> getAllImplementors() { List<ApiImplementor> imps = new ArrayList<>(); ApiImplementor api; imps.add(new AlertAPI(null)); api = new AntiCsrfAPI(null); api.addApiOptions(new AntiCsrfParam()); imps.add(api); imps.add(new PassiveScanAPI(null)); imps.add(new SearchAPI(null)); api = new AutoUpdateAPI(null); api.addApiOptions(new OptionsParamCheckForUpdates()); imps.add(api); api = new SpiderAPI(null); api.addApiOptions(new SpiderParam()); imps.add(api); api = new CoreAPI(new ConnectionParam()); imps.add(api); imps.add(new ParamsAPI(null)); api = new ActiveScanAPI(null); api.addApiOptions(new ScannerParam()); imps.add(api); imps.add(new ContextAPI()); imps.add(new HttpSessionsAPI(null)); imps.add(new BreakAPI(null)); imps.add(new AuthenticationAPI(null)); imps.add(new AuthorizationAPI()); imps.add(new ProxiesAPI(null)); imps.add(new RuleConfigAPI(null)); imps.add(new SessionManagementAPI(null)); imps.add(new UsersAPI(null)); imps.add(new ForcedUserAPI(null)); imps.add(new ScriptAPI(null)); api = new StatsAPI(null); api.addApiOptions(new StatsParam()); imps.add(api); return imps; }  static List<ApiImplementor> getAllImplementors(); }
ApiGeneratorUtils { public static List<ApiImplementor> getAllImplementors() { List<ApiImplementor> imps = new ArrayList<>(); ApiImplementor api; imps.add(new AlertAPI(null)); api = new AntiCsrfAPI(null); api.addApiOptions(new AntiCsrfParam()); imps.add(api); imps.add(new PassiveScanAPI(null)); imps.add(new SearchAPI(null)); api = new AutoUpdateAPI(null); api.addApiOptions(new OptionsParamCheckForUpdates()); imps.add(api); api = new SpiderAPI(null); api.addApiOptions(new SpiderParam()); imps.add(api); api = new CoreAPI(new ConnectionParam()); imps.add(api); imps.add(new ParamsAPI(null)); api = new ActiveScanAPI(null); api.addApiOptions(new ScannerParam()); imps.add(api); imps.add(new ContextAPI()); imps.add(new HttpSessionsAPI(null)); imps.add(new BreakAPI(null)); imps.add(new AuthenticationAPI(null)); imps.add(new AuthorizationAPI()); imps.add(new ProxiesAPI(null)); imps.add(new RuleConfigAPI(null)); imps.add(new SessionManagementAPI(null)); imps.add(new UsersAPI(null)); imps.add(new ForcedUserAPI(null)); imps.add(new ScriptAPI(null)); api = new StatsAPI(null); api.addApiOptions(new StatsParam()); imps.add(api); return imps; }  static List<ApiImplementor> getAllImplementors();  }