@Test public void do_not_copy_rule_tags_on_existing_issues() { inputIssue.setIsNew(false); rule.setTags(ImmutableSet.of("bug", "performance")); rule.setSystemTags(ImmutableSet.of("blocker")); process(); assertThat(Iterators.getOnlyElement(outputIssues.traverse()).tags()).isEmpty(); }
@Test public void copy_rule_tags_on_new_issues() { inputIssue.setIsNew(true); rule.setTags(ImmutableSet.of("bug", "performance")); rule.setSystemTags(ImmutableSet.of("blocker")); process(); assertThat(Iterators.getOnlyElement(outputIssues.traverse()).tags()) .containsOnly("blocker", "bug", "performance"); }