@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)); }
@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)); }
@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()); }
@Before public void setup() throws Exception { artifact = ArtifactTypeManager.addArtifact( CoreArtifactTypes.GeneralDocument, DemoBranches.SAW_Bld_1, method.getQualifiedTestName()); artifact.setAttributeValues(CoreAttributeTypes.StaticId, START_VALUE); }