Java Code Examples for org.alfresco.model.ContentModel.PROP_ADDRESSEES

The following are Jave code examples for showing how to use PROP_ADDRESSEES of the org.alfresco.model.ContentModel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: alfresco-test-assertions   File: NodeAssertTest.java   View Source Code Vote up 5 votes
@Test
public void a_value_in_a_multi_valued_property_can_be_asserted() {
    final QName property = ContentModel.PROP_ADDRESSEES;
    final String expectedValue = "foo";
    final List<String> tags = Arrays.asList(expectedValue);
    nodeService.setProperty(nodeRef, property, (Serializable) tags);
    assertThat(nodeRef).hasMultiplePropertyMember(property, expectedValue);
}
 
Example 2
Project: alfresco-test-assertions   File: NodeAssertTest.java   View Source Code Vote up 5 votes
@Test(expected = AssertionError.class)
public void a_value_missing_a_multi_valued_property_is_an_assertion_error() {
    final QName property = ContentModel.PROP_ADDRESSEES;
    final String missingValue = "bar";
    final List<String> tags = Arrays.asList("foo");
    nodeService.setProperty(nodeRef, property, (Serializable) tags);
    assertThat(nodeRef).hasMultiplePropertyMember(property, missingValue);
}
 
Example 3
Project: alfresco-test-assertions   File: NodeAssertTest.java   View Source Code Vote up 5 votes
@Test
public void a_value_not_in_a_multi_valued_property_can_be_asserted() {
    final QName property = ContentModel.PROP_ADDRESSEES;
    final String missingValue = "bar";
    final List<String> tags = Arrays.asList("foo");
    nodeService.setProperty(nodeRef, property, (Serializable) tags);
    assertThat(nodeRef).doesNotHaveMultiplePropertyMember(property, missingValue);
}
 
Example 4
Project: alfresco-test-assertions   File: NodeAssertTest.java   View Source Code Vote up 5 votes
@Test(expected = AssertionError.class)
public void a_value_present_when_testing_for_not_in_a_multi_valued_property_is_an_assertion_error() {
    final QName property = ContentModel.PROP_ADDRESSEES;
    final String value = "bar";
    final List<String> tags = Arrays.asList(value);
    nodeService.setProperty(nodeRef, property, (Serializable) tags);
    assertThat(nodeRef).doesNotHaveMultiplePropertyMember(property, value);
}