Search in sources :

Example 1 with FailureDetails

use of com.thoughtworks.go.domain.testinfo.FailureDetails in project gocd by gocd.

the class FailureServiceTest method shouldFetchFailureDetailsForGivenTestCase.

@Test
public void shouldFetchFailureDetailsForGivenTestCase() {
    when(securityService.hasViewPermissionForPipeline(username, "pipeline")).thenReturn(true);
    when(shineDao.failureDetailsForTest(jobIdentifier, "suite_name", "test_name", result)).thenReturn(new FailureDetails("hi", "there"));
    assertThat(failureService.failureDetailsFor(jobIdentifier, "suite_name", "test_name", username, result), is(new FailureDetails("hi", "there")));
    verify(shineDao).failureDetailsForTest(jobIdentifier, "suite_name", "test_name", result);
}
Also used : FailureDetails(com.thoughtworks.go.domain.testinfo.FailureDetails) Test(org.junit.Test)

Aggregations

FailureDetails (com.thoughtworks.go.domain.testinfo.FailureDetails)1 Test (org.junit.Test)1