Search in sources :

Example 6 with ModulePackage

use of org.alfresco.rest.api.model.ModulePackage in project alfresco-remote-api by Alfresco.

the class ModulePackagesApiTest method testSingleModulePackage.

@Test
public void testSingleModulePackage() throws Exception {
    setRequestContext(nonAdminUserName);
    HttpResponse response = getSingle(MODULEPACKAGES, "NonSENSE_NOTFOUND", HttpStatus.SC_NOT_FOUND);
    assertNotNull(response);
    response = getSingle(MODULEPACKAGES, "alfresco-simple-module", HttpStatus.SC_OK);
    assertNotNull(response);
    ModulePackage simpleModule = parseRestApiEntry(response.getJsonResponse(), ModulePackage.class);
    assertNotNull(simpleModule);
    assertTrue("Simple module must be the correct version", "1.0.0-SNAPSHOT".equals(simpleModule.getVersion().toString()));
}
Also used : ModulePackage(org.alfresco.rest.api.model.ModulePackage) HttpResponse(org.alfresco.rest.api.tests.client.HttpResponse) Test(org.junit.Test)

Aggregations

ModulePackage (org.alfresco.rest.api.model.ModulePackage)6 Test (org.junit.Test)5 HttpResponse (org.alfresco.rest.api.tests.client.HttpResponse)3 ModuleDetailsImplTest (org.alfresco.repo.module.ModuleDetailsImplTest)2 ModuleDetails (org.alfresco.service.cmr.module.ModuleDetails)2 ArrayList (java.util.ArrayList)1 ModuleDetailsImpl (org.alfresco.repo.module.ModuleDetailsImpl)1 AbstractSingleNetworkSiteTest (org.alfresco.rest.AbstractSingleNetworkSiteTest)1 DiscoveryDetails (org.alfresco.rest.api.model.DiscoveryDetails)1 RepositoryInfo (org.alfresco.rest.api.model.RepositoryInfo)1 LicenseEntitlement (org.alfresco.rest.api.model.RepositoryInfo.LicenseEntitlement)1 LicenseInfo (org.alfresco.rest.api.model.RepositoryInfo.LicenseInfo)1 StatusInfo (org.alfresco.rest.api.model.RepositoryInfo.StatusInfo)1 VersionInfo (org.alfresco.rest.api.model.RepositoryInfo.VersionInfo)1 PublicApiClient (org.alfresco.rest.api.tests.client.PublicApiClient)1