mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
add unit tests
This commit is contained in:
@@ -236,4 +236,26 @@ public class PropertyModificationAllowedCheckUnitTest
|
||||
after.put(qName, null);
|
||||
assertTrue(propertyModificationAllowedCheck.check(before, after));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test update of a property from the model URI for which properties can be updated
|
||||
*/
|
||||
@Test
|
||||
public void testUpdatePropertyFromAllowedModelURI()
|
||||
{
|
||||
editableURIs.add("foo");
|
||||
propertyModificationAllowedCheck.setEditableURIs(editableURIs);
|
||||
assertTrue(propertyModificationAllowedCheck.check(before, after));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test update of a property that is not in the model URI for which properties can be updated
|
||||
*/
|
||||
@Test
|
||||
public void testUpdatePropertyFromNotAllowedModelURI()
|
||||
{
|
||||
editableURIs.add("bar");
|
||||
propertyModificationAllowedCheck.setEditableURIs(editableURIs);
|
||||
assertFalse(propertyModificationAllowedCheck.check(before, after));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user