GrapesClient { public String getServerURL(){ return serverURL; } GrapesClient(final String host, final String port); void setTimeout(final Integer timeout); String getServerURL(); boolean isServerAvailable(); void postBuildInfo(final String moduleName, final String moduleVersion, final Map<String, String> buildInfo, final String user, final String password); Map<String, String> getBuildInfo(final String moduleName, final String moduleVersion); void postModule(final Module module, final String user, final String password); void deleteModule(final String name, final String version, final String user, final String password); Module getModule(final String name, final String version); List<Module> getModules(final Map<String, String> filters); List<String> getModuleVersions(final String name); Boolean getModulePromotionStatus(final String name, final String version); void promoteModule(final String name, final String version, final String user, final String password); Boolean moduleCanBePromoted(final String name, final String version); T getModulePromotionReportRaw(final String name,
                                             final String version,
                                             final boolean excludeSnapshotValidation,
                                             final Class<T> entityClass); PromotionEvaluationReport getModulePromotionReport(final String name, final String version); void postArtifact(final Artifact artifact, final String user, final String password); void deleteArtifact(final String gavc, final String user, final String password); Artifact getArtifact(final String gavc); List<Artifact> getArtifacts(final Boolean hasLicense); void postDoNotUseArtifact(final String gavc, final Boolean doNotUse, final String user, final String password); Boolean isMarkedAsDoNotUse(final String gavc); List<String> getArtifactVersions(final String gavc); String getArtifactLastVersion(final String gavc); Module getArtifactModule(final String gavc); void addLicense(final String gavc, final String licenseId, final String user, final String password); void postLicense(final License license, final String user, final String password); void deleteLicense(final String licenseId, final String user, final String password); License getLicense(final String licenseId); void approveLicense(final String licenseId, final Boolean approve, final String user, final String password); List<Dependency> getModuleAncestors(final String moduleName, final String moduleVersion); List<Dependency> getModuleDependencies(final String moduleName, final String moduleVersion, final Boolean fullRecursive, final Boolean corporate, final Boolean thirdParty); Organization getModuleOrganization(final String moduleName, final String moduleVersion); List<String> getProductModuleNames(final String projectId); List<String> getAllProductNames(); Delivery getProductDelivery(final String productLogicalName, final String commercialName, final String commercialVersion); List<Delivery> getProductDeliveries(final String productLogicalName); void createProductDelivery(final String productLogicalName, final Delivery delivery, final String user, final String password); static final String FAILED_TO_GET_CORPORATE_FILTERS; static final String FAILED_TO_GET_MODULE; }
@Test public void checkServerUrl() { GrapesClient grapesClient = new GrapesClient("host", null); assertEquals("http: grapesClient = new GrapesClient("host", ""); assertEquals("http: grapesClient = new GrapesClient("host", "12345"); assertEquals("http: }