예제 #1
0
  @Test
  public void shouldExecuteOnRootProjectWithAllParams() throws Exception {
    Project project = mock(Project.class);
    when(project.isRoot()).thenReturn(true).thenReturn(false);

    assertThat(sensor.shouldExecuteOnProject(project)).isEqualTo(true);
  }
예제 #2
0
  @Test
  public void shouldNotExecuteOnRootProjectifOneParamMissing() throws Exception {
    Project project = mock(Project.class);
    when(project.isRoot()).thenReturn(true).thenReturn(false);

    settings.removeProperty(JiraConstants.SERVER_URL_PROPERTY);
    sensor = new JiraSensor(settings);

    assertThat(sensor.shouldExecuteOnProject(project)).isEqualTo(false);
  }
예제 #3
0
 @Test
 public void shouldNotExecuteOnNonRootProject() throws Exception {
   assertThat(sensor.shouldExecuteOnProject(mock(Project.class))).isEqualTo(false);
 }