Search in sources :

Example 1 with ModuleDetailsImpl

use of org.alfresco.repo.module.ModuleDetailsImpl in project alfresco-remote-api by Alfresco.

the class ModulePackageTest method testConstructor.

@Test
public void testConstructor() throws IOException {
    ModuleDetails details = new ModuleDetailsImpl(props);
    ModulePackage modulePackage = ModulePackage.fromModuleDetails(details);
    assertNotNull(modulePackage);
    assertEquals(props.getProperty(ModuleDetails.PROP_ID), modulePackage.getId());
    assertEquals(props.getProperty(ModuleDetails.PROP_VERSION), modulePackage.getVersion());
    assertEquals(props.getProperty(ModuleDetails.PROP_REPO_VERSION_MIN), modulePackage.getVersionMin());
    assertEquals(props.getProperty(ModuleDetails.PROP_REPO_VERSION_MAX), modulePackage.getVersionMax());
    assertEquals(props.getProperty(ModuleDetails.PROP_INSTALL_STATE), modulePackage.getInstallState().toString());
}
Also used : ModuleDetailsImpl(org.alfresco.repo.module.ModuleDetailsImpl) ModulePackage(org.alfresco.rest.api.model.ModulePackage) ModuleDetails(org.alfresco.service.cmr.module.ModuleDetails) Test(org.junit.Test) ModuleDetailsImplTest(org.alfresco.repo.module.ModuleDetailsImplTest)

Aggregations

ModuleDetailsImpl (org.alfresco.repo.module.ModuleDetailsImpl)1 ModuleDetailsImplTest (org.alfresco.repo.module.ModuleDetailsImplTest)1 ModulePackage (org.alfresco.rest.api.model.ModulePackage)1 ModuleDetails (org.alfresco.service.cmr.module.ModuleDetails)1 Test (org.junit.Test)1