@Test public void do_not_auto_assign_existing_issues() { inputIssue.setIsNew(false); inputIssue.setAuthorLogin("charlie"); when(scmAccountCache.getNullable("charlie")).thenReturn("char.lie"); process(); assertThat(Iterators.getOnlyElement(outputIssues.traverse()).assignee()).isNull(); }
@Test public void auto_assign_new_issues() { inputIssue.setIsNew(true); inputIssue.setAuthorLogin("charlie"); when(scmAccountCache.getNullable("charlie")).thenReturn("char.lie"); process(); assertThat(Iterators.getOnlyElement(outputIssues.traverse()).assignee()).isEqualTo("char.lie"); }