mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-17 14:21:39 +00:00
Trigger CI
This commit is contained in:
@@ -41,6 +41,12 @@ import java.security.InvalidParameterException;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.mockito.InjectMocks;
|
||||||
|
import org.mockito.Mock;
|
||||||
|
import org.mockito.MockitoAnnotations;
|
||||||
|
|
||||||
import org.alfresco.module.org_alfresco_module_rm.test.util.BaseUnitTest;
|
import org.alfresco.module.org_alfresco_module_rm.test.util.BaseUnitTest;
|
||||||
import org.alfresco.rest.api.model.SiteUpdate;
|
import org.alfresco.rest.api.model.SiteUpdate;
|
||||||
import org.alfresco.rest.framework.core.exceptions.InvalidArgumentException;
|
import org.alfresco.rest.framework.core.exceptions.InvalidArgumentException;
|
||||||
@@ -50,11 +56,6 @@ import org.alfresco.rm.rest.api.RMSites;
|
|||||||
import org.alfresco.rm.rest.api.model.RMSite;
|
import org.alfresco.rm.rest.api.model.RMSite;
|
||||||
import org.alfresco.rm.rest.api.model.RMSiteCompliance;
|
import org.alfresco.rm.rest.api.model.RMSiteCompliance;
|
||||||
import org.alfresco.service.cmr.site.SiteVisibility;
|
import org.alfresco.service.cmr.site.SiteVisibility;
|
||||||
import org.junit.Before;
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.mockito.InjectMocks;
|
|
||||||
import org.mockito.Mock;
|
|
||||||
import org.mockito.MockitoAnnotations;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unit Test class for RMSiteEntityResource.
|
* Unit Test class for RMSiteEntityResource.
|
||||||
@@ -129,7 +130,7 @@ public class RMSiteEntityResourceUnitTest extends BaseUnitTest
|
|||||||
rmSiteEntityResource.delete(siteId, parameters);
|
rmSiteEntityResource.delete(siteId, parameters);
|
||||||
fail("Expected ecxeption as siteId was different than rm");
|
fail("Expected ecxeption as siteId was different than rm");
|
||||||
}
|
}
|
||||||
catch(InvalidParameterException ex)
|
catch (InvalidParameterException ex)
|
||||||
{
|
{
|
||||||
assertEquals("The Deletion is supported only for siteId = rm.", ex.getMessage());
|
assertEquals("The Deletion is supported only for siteId = rm.", ex.getMessage());
|
||||||
}
|
}
|
||||||
@@ -147,7 +148,7 @@ public class RMSiteEntityResourceUnitTest extends BaseUnitTest
|
|||||||
rmSiteEntityResource.delete(siteId, parameters);
|
rmSiteEntityResource.delete(siteId, parameters);
|
||||||
fail("Expected ecxeption as parameter permanent was present in the request.");
|
fail("Expected ecxeption as parameter permanent was present in the request.");
|
||||||
}
|
}
|
||||||
catch(InvalidArgumentException ex)
|
catch (InvalidArgumentException ex)
|
||||||
{
|
{
|
||||||
assertEquals("DELETE does not support parameter: permanent", ex.getMsgId());
|
assertEquals("DELETE does not support parameter: permanent", ex.getMsgId());
|
||||||
}
|
}
|
||||||
@@ -173,7 +174,7 @@ public class RMSiteEntityResourceUnitTest extends BaseUnitTest
|
|||||||
rmSiteEntityResource.readById(siteId, parameters);
|
rmSiteEntityResource.readById(siteId, parameters);
|
||||||
fail("Expected ecxeption as siteId was different than rm");
|
fail("Expected ecxeption as siteId was different than rm");
|
||||||
}
|
}
|
||||||
catch(InvalidParameterException ex)
|
catch (InvalidParameterException ex)
|
||||||
{
|
{
|
||||||
assertEquals("GET is supported only for siteId = rm.", ex.getMessage());
|
assertEquals("GET is supported only for siteId = rm.", ex.getMessage());
|
||||||
}
|
}
|
||||||
@@ -205,7 +206,7 @@ public class RMSiteEntityResourceUnitTest extends BaseUnitTest
|
|||||||
rmSiteEntityResource.update(siteId, site, parameters);
|
rmSiteEntityResource.update(siteId, site, parameters);
|
||||||
fail("Expected ecxeption as siteId was different than rm");
|
fail("Expected ecxeption as siteId was different than rm");
|
||||||
}
|
}
|
||||||
catch(InvalidParameterException ex)
|
catch (InvalidParameterException ex)
|
||||||
{
|
{
|
||||||
assertEquals("The Update is supported only for siteId = rm.", ex.getMessage());
|
assertEquals("The Update is supported only for siteId = rm.", ex.getMessage());
|
||||||
}
|
}
|
||||||
@@ -226,7 +227,7 @@ public class RMSiteEntityResourceUnitTest extends BaseUnitTest
|
|||||||
rmSiteEntityResource.update(siteId, site, parameters);
|
rmSiteEntityResource.update(siteId, site, parameters);
|
||||||
fail("Expected ecxeption as rm site id cannot be changed.");
|
fail("Expected ecxeption as rm site id cannot be changed.");
|
||||||
}
|
}
|
||||||
catch(InvalidArgumentException ex)
|
catch (InvalidArgumentException ex)
|
||||||
{
|
{
|
||||||
assertEquals("Site update does not support field: id", ex.getMsgId());
|
assertEquals("Site update does not support field: id", ex.getMsgId());
|
||||||
}
|
}
|
||||||
@@ -247,7 +248,7 @@ public class RMSiteEntityResourceUnitTest extends BaseUnitTest
|
|||||||
rmSiteEntityResource.update(siteId, site, parameters);
|
rmSiteEntityResource.update(siteId, site, parameters);
|
||||||
fail("Expected ecxeption as rm site guid cannot be changed.");
|
fail("Expected ecxeption as rm site guid cannot be changed.");
|
||||||
}
|
}
|
||||||
catch(InvalidArgumentException ex)
|
catch (InvalidArgumentException ex)
|
||||||
{
|
{
|
||||||
assertEquals("Site update does not support field: guid", ex.getMsgId());
|
assertEquals("Site update does not support field: guid", ex.getMsgId());
|
||||||
}
|
}
|
||||||
@@ -268,7 +269,7 @@ public class RMSiteEntityResourceUnitTest extends BaseUnitTest
|
|||||||
rmSiteEntityResource.update(siteId, site, parameters);
|
rmSiteEntityResource.update(siteId, site, parameters);
|
||||||
fail("Expected ecxeption as rm site role cannot be changed.");
|
fail("Expected ecxeption as rm site role cannot be changed.");
|
||||||
}
|
}
|
||||||
catch(InvalidArgumentException ex)
|
catch (InvalidArgumentException ex)
|
||||||
{
|
{
|
||||||
assertEquals("Site update does not support field: role", ex.getMsgId());
|
assertEquals("Site update does not support field: role", ex.getMsgId());
|
||||||
}
|
}
|
||||||
@@ -289,7 +290,7 @@ public class RMSiteEntityResourceUnitTest extends BaseUnitTest
|
|||||||
rmSiteEntityResource.update(siteId, site, parameters);
|
rmSiteEntityResource.update(siteId, site, parameters);
|
||||||
fail("Expected ecxeption as rm site compliance cannot be changed.");
|
fail("Expected ecxeption as rm site compliance cannot be changed.");
|
||||||
}
|
}
|
||||||
catch(InvalidArgumentException ex)
|
catch (InvalidArgumentException ex)
|
||||||
{
|
{
|
||||||
assertEquals("Site update does not support field: compliance", ex.getMsgId());
|
assertEquals("Site update does not support field: compliance", ex.getMsgId());
|
||||||
}
|
}
|
||||||
@@ -310,7 +311,7 @@ public class RMSiteEntityResourceUnitTest extends BaseUnitTest
|
|||||||
rmSiteEntityResource.update(siteId, site, parameters);
|
rmSiteEntityResource.update(siteId, site, parameters);
|
||||||
fail("Expected ecxeption as rm site visibility cannot be changed.");
|
fail("Expected ecxeption as rm site visibility cannot be changed.");
|
||||||
}
|
}
|
||||||
catch(InvalidArgumentException ex)
|
catch (InvalidArgumentException ex)
|
||||||
{
|
{
|
||||||
assertEquals("Site update does not support field: visibility", ex.getMsgId());
|
assertEquals("Site update does not support field: visibility", ex.getMsgId());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user