String owner = System.getProperty("forge.login");
ForgeAPI forge = new ForgeAPI(getCommonModule(), GsonModule.INSTANCE, createCredentialsModule(
props, owner, System.getProperty("forge.password")), forgeModule);
// Create the modules used in publishing tests
ModuleService moduleService = forge.createModuleService();
ReleaseService releaseService = forge.createReleaseService();
try {
releaseService.delete(owner, "test_module_a", Version.create(1, 0, 0));
moduleService.delete(owner, "test_module_a");
}
catch(Exception e) {
}
try {
releaseService.delete(owner, "test_module_b", Version.create(1, 0, 0));
moduleService.delete(owner, "test_module_b");
}
catch(Exception e) {
}
try {
releaseService.delete(owner, "test_module_c", Version.create(1, 0, 0));
moduleService.delete(owner, "test_module_c");
}
catch(Exception e) {
}
try {
releaseService.delete(owner, "test_module_d", Version.create(1, 0, 0));
moduleService.delete(owner, "test_module_d");
}
catch(Exception e) {
}
try {
moduleService.delete(System.getProperty("forge.login.second"), "test_module_wrong_owner");
}
catch(Exception e) {
}
}