mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Replace exception messages in tests
This commit is contained in:
@@ -92,7 +92,7 @@ public class AddToHoldsTests extends BaseRMRestTest
|
|||||||
"permissions to perform this operation.";
|
"permissions to perform this operation.";
|
||||||
private static final String INVALID_TYPE_ERROR_MESSAGE = "Items added to a hold must be either a record, a " +
|
private static final String INVALID_TYPE_ERROR_MESSAGE = "Items added to a hold must be either a record, a " +
|
||||||
"record folder or active content.";
|
"record folder or active content.";
|
||||||
private static final String LOCKED_FILE_ERROR_MESSAGE = "Locked nodes can't be added to hold";
|
private static final String LOCKED_FILE_ERROR_MESSAGE = "Locked content can't be added to a hold.";
|
||||||
private SiteModel testSite;
|
private SiteModel testSite;
|
||||||
private String holdNodeRef;
|
private String holdNodeRef;
|
||||||
private FileModel documentHeld, contentToAddToHold, contentAddToHoldNoPermission;
|
private FileModel documentHeld, contentToAddToHold, contentAddToHoldNoPermission;
|
||||||
|
@@ -34,6 +34,7 @@ import org.alfresco.rest.framework.core.exceptions.PermissionDeniedException;
|
|||||||
import org.alfresco.service.cmr.model.FileNotFoundException;
|
import org.alfresco.service.cmr.model.FileNotFoundException;
|
||||||
import org.alfresco.service.cmr.repository.ContentData;
|
import org.alfresco.service.cmr.repository.ContentData;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
|
import org.springframework.extensions.surf.util.I18NUtil;
|
||||||
import org.springframework.extensions.webscripts.GUID;
|
import org.springframework.extensions.webscripts.GUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -77,7 +78,7 @@ public class UpdateHeldActiveContentTest extends BaseRMTestCase
|
|||||||
}
|
}
|
||||||
catch (PermissionDeniedException pde)
|
catch (PermissionDeniedException pde)
|
||||||
{
|
{
|
||||||
assertTrue(pde.getMessage().contains("Frozen nodes can not be deleted."));
|
assertTrue(pde.getMessage().contains(I18NUtil.getMessage("rm.hold.delete-frozen-node")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -135,7 +136,7 @@ public class UpdateHeldActiveContentTest extends BaseRMTestCase
|
|||||||
}
|
}
|
||||||
catch (PermissionDeniedException pde)
|
catch (PermissionDeniedException pde)
|
||||||
{
|
{
|
||||||
assertTrue(pde.getMessage().contains("Frozen nodes can not be moved."));
|
assertTrue(pde.getMessage().contains(I18NUtil.getMessage("rm.hold.move-frozen-node")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -169,7 +170,7 @@ public class UpdateHeldActiveContentTest extends BaseRMTestCase
|
|||||||
}
|
}
|
||||||
catch (PermissionDeniedException pde)
|
catch (PermissionDeniedException pde)
|
||||||
{
|
{
|
||||||
assertTrue(pde.getMessage().contains("Frozen nodes can not be updated."));
|
assertTrue(pde.getMessage().contains(I18NUtil.getMessage("rm.hold.update-frozen-node")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -204,7 +205,7 @@ public class UpdateHeldActiveContentTest extends BaseRMTestCase
|
|||||||
}
|
}
|
||||||
catch (PermissionDeniedException pde)
|
catch (PermissionDeniedException pde)
|
||||||
{
|
{
|
||||||
assertTrue(pde.getMessage().contains("Frozen nodes can not be updated."));
|
assertTrue(pde.getMessage().contains(I18NUtil.getMessage("rm.hold.update-frozen-node")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user