RM-2420 (Add edit classification to ClassifyService Java API)

+review RM

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@108910 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2015-07-23 21:14:25 +00:00
parent 671fbfcaa1
commit c6f5d7d718
4 changed files with 53 additions and 20 deletions

View File

@@ -64,6 +64,7 @@ import com.google.common.collect.Sets;
* Unit tests for {@link ContentClassificationServiceImpl}.
*
* @author tpage
* @since 3.0
*/
public class ContentClassificationServiceImplUnitTest implements ClassifiedContentModel
{
@@ -138,20 +139,6 @@ public class ContentClassificationServiceImplUnitTest implements ClassifiedConte
Sets.newHashSet("reasonId1", "reasonId2"), notAPieceOfContent);
}
/** Classify a piece of content that has already been classified. */
@Test(expected = UnsupportedOperationException.class)
public void classifyContent_alreadyClassified()
{
// Create a classified piece of content.
NodeRef classifiedContent = new NodeRef("classified://content/");
when(mockDictionaryService.isSubClass(mockNodeService.getType(classifiedContent), ContentModel.TYPE_CONTENT)).thenReturn(true);
when(mockNodeService.hasAspect(classifiedContent, ClassifiedContentModel.ASPECT_CLASSIFIED)).thenReturn(true);
// Call the method under test.
contentClassificationServiceImpl.classifyContent("levelId1", "classifiedBy", "classificationAgency",
Sets.newHashSet("reasonId1", "reasonId2"), classifiedContent);
}
/** Classify a piece of content that has already been shared */
@Test(expected = IllegalStateException.class)
public void classifySharedContent()