コード例 #1
0
  @Test
  public void testSetAttributeValuesAddOneRemoveOne() throws Exception {
    artifact.setAttributeValues(CoreAttributeTypes.StaticId, ADD_ONE_REMOVE_ONE);

    List<String> actual = artifact.getAttributesToStringList(CoreAttributeTypes.StaticId);

    assertTrue(Collections.isEqual(ADD_ONE_REMOVE_ONE, actual));
  }
コード例 #2
0
  @Test
  public void testSetAttributeValuesWithDuplicates() throws Exception {
    artifact.setAttributeValues(CoreAttributeTypes.StaticId, ADD_DUPLICATES);

    List<String> actual = artifact.getAttributesToStringList(CoreAttributeTypes.StaticId);

    assertTrue(Collections.isEqual(ADD_DUPLICATES_EXPECTED, actual));
  }
コード例 #3
0
  @Test
  public void testSetAttributeValuesRemoveAll() throws Exception {
    artifact.setAttributeValues(
        CoreAttributeTypes.StaticId, java.util.Collections.<String>emptyList());

    List<String> actual = artifact.getAttributesToStringList(CoreAttributeTypes.StaticId);

    assertTrue(actual.isEmpty());
  }
コード例 #4
0
 @Before
 public void setup() throws Exception {
   artifact =
       ArtifactTypeManager.addArtifact(
           CoreArtifactTypes.GeneralDocument,
           DemoBranches.SAW_Bld_1,
           method.getQualifiedTestName());
   artifact.setAttributeValues(CoreAttributeTypes.StaticId, START_VALUE);
 }