@Test public void testAllServicesHaveDifferentId() throws Exception { HashSet<Integer> servicesId = new HashSet<>(); for (StreamingService streamingService : NewPipe.getServices()) { String errorMsg = "There are services with the same id = " + streamingService.getServiceId() + " (current service > " + streamingService.getServiceInfo().getName() + ")"; assertTrue(errorMsg, servicesId.add(streamingService.getServiceId())); } }
public static List<StreamingService> getServices() { return ServiceList.all(); }
NewPipe { public static List<StreamingService> getServices() { return ServiceList.all(); } }
NewPipe { public static List<StreamingService> getServices() { return ServiceList.all(); } private  NewPipe(); }
NewPipe { public static List<StreamingService> getServices() { return ServiceList.all(); } private  NewPipe(); static void init(Downloader d); static void init(Downloader d, Localization l); static void init(Downloader d, Localization l, ContentCountry c); static Downloader getDownloader(); static List<StreamingService> getServices(); static StreamingService getService(int serviceId); static StreamingService getService(String serviceName); static StreamingService getServiceByUrl(String url); static int getIdOfService(String serviceName); static String getNameOfService(int id); static void setupLocalization(Localization preferredLocalization); static void setupLocalization(Localization preferredLocalization, @Nullable ContentCountry preferredContentCountry); @Nonnull static Localization getPreferredLocalization(); static void setPreferredLocalization(Localization preferredLocalization); @Nonnull static ContentCountry getPreferredContentCountry(); static void setPreferredContentCountry(ContentCountry preferredContentCountry); }
NewPipe { public static List<StreamingService> getServices() { return ServiceList.all(); } private  NewPipe(); static void init(Downloader d); static void init(Downloader d, Localization l); static void init(Downloader d, Localization l, ContentCountry c); static Downloader getDownloader(); static List<StreamingService> getServices(); static StreamingService getService(int serviceId); static StreamingService getService(String serviceName); static StreamingService getServiceByUrl(String url); static int getIdOfService(String serviceName); static String getNameOfService(int id); static void setupLocalization(Localization preferredLocalization); static void setupLocalization(Localization preferredLocalization, @Nullable ContentCountry preferredContentCountry); @Nonnull static Localization getPreferredLocalization(); static void setPreferredLocalization(Localization preferredLocalization); @Nonnull static ContentCountry getPreferredContentCountry(); static void setPreferredContentCountry(ContentCountry preferredContentCountry);  }