mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merge Sabre4 to HEAD
110681: Extract modulepackages as a constant RA-370 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@111190 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -41,6 +41,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class ModulePackagesApiTest extends AbstractBaseApiTest
|
public class ModulePackagesApiTest extends AbstractBaseApiTest
|
||||||
{
|
{
|
||||||
|
public static final String MODULEPACKAGES = "modulepackages";
|
||||||
protected String nonAdminUserName;
|
protected String nonAdminUserName;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
@@ -52,7 +53,7 @@ public class ModulePackagesApiTest extends AbstractBaseApiTest
|
|||||||
@Test
|
@Test
|
||||||
public void testAllModulePackages() throws Exception
|
public void testAllModulePackages() throws Exception
|
||||||
{
|
{
|
||||||
HttpResponse response = getAll("modulepackages", nonAdminUserName, null, HttpStatus.SC_OK);
|
HttpResponse response = getAll(MODULEPACKAGES, nonAdminUserName, null, HttpStatus.SC_OK);
|
||||||
assertNotNull(response);
|
assertNotNull(response);
|
||||||
|
|
||||||
PublicApiClient.ExpectedPaging paging = parsePaging(response.getJsonResponse());
|
PublicApiClient.ExpectedPaging paging = parsePaging(response.getJsonResponse());
|
||||||
@@ -70,10 +71,10 @@ public class ModulePackagesApiTest extends AbstractBaseApiTest
|
|||||||
@Test
|
@Test
|
||||||
public void testSingleModulePackage() throws Exception
|
public void testSingleModulePackage() throws Exception
|
||||||
{
|
{
|
||||||
HttpResponse response = getSingle("modulepackages", nonAdminUserName, "NonSENSE_NOTFOUND", HttpStatus.SC_NOT_FOUND);
|
HttpResponse response = getSingle(MODULEPACKAGES, nonAdminUserName, "NonSENSE_NOTFOUND", HttpStatus.SC_NOT_FOUND);
|
||||||
assertNotNull(response);
|
assertNotNull(response);
|
||||||
|
|
||||||
response = getSingle("modulepackages", nonAdminUserName, "alfresco-simple-module", HttpStatus.SC_OK);
|
response = getSingle(MODULEPACKAGES, nonAdminUserName, "alfresco-simple-module", HttpStatus.SC_OK);
|
||||||
assertNotNull(response);
|
assertNotNull(response);
|
||||||
|
|
||||||
ModulePackage simpleModule = parseRestApiEntry(response.getJsonResponse(),ModulePackage.class);
|
ModulePackage simpleModule = parseRestApiEntry(response.getJsonResponse(),ModulePackage.class);
|
||||||
|
Reference in New Issue
Block a user