@Test public void test_end_user_context() throws Exception { Date now = new Date(); IssueChangeContext context = IssueChangeContext.createUser(now, "emmerik"); assertThat(context.scan()).isFalse(); assertThat(context.login()).isEqualTo("emmerik"); assertThat(context.date()).isEqualTo(now); }
@Test public void test_scan_context() throws Exception { Date now = new Date(); IssueChangeContext context = IssueChangeContext.createScan(now); assertThat(context.scan()).isTrue(); assertThat(context.login()).isNull(); assertThat(context.date()).isEqualTo(now); }