コード例 #1
0
  @Test
  public void should_not_execute_if_disabled() {
    when(conf.isEnabled()).thenReturn(false);

    boolean shouldExecute = scmActivitySensor.shouldExecuteOnProject(project);

    assertThat(shouldExecute).isFalse();
  }
コード例 #2
0
  @Test
  public void should_execute() {
    when(conf.isEnabled()).thenReturn(true);

    boolean shouldExecute = scmActivitySensor.shouldExecuteOnProject(project);

    assertThat(shouldExecute).isTrue();
  }
コード例 #3
0
  @Test
  public void should_disable() {
    settings.setProperty(ScmActivityPlugin.ENABLED, false);

    assertThat(scmConfiguration.isEnabled()).isFalse();
  }
コード例 #4
0
 @Test
 public void should_be_enabled_by_default() {
   assertThat(scmConfiguration.isEnabled()).isTrue();
 }