コード例 #1
0
  @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);
  }
コード例 #2
0
  @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);
  }