Search in sources :

Example 1 with BuildTypeResponsibilityEntry

use of jetbrains.buildServer.responsibility.BuildTypeResponsibilityEntry in project teamcity-rest by JetBrains.

the class InvestigationFinderTest method testBuildTypeInvestigation.

@Test
public void testBuildTypeInvestigation() throws Exception {
    createFailingBuild();
    myFixture.getResponsibilityFacadeEx().setBuildTypeResponsibility(myBuildType, createRespEntry(ResponsibilityEntry.State.TAKEN, myUser));
    final PagedSearchResult<InvestigationWrapper> result = myInvestigationFinder.getItems((String) null);
    assertEquals(1, result.myEntries.size());
    final InvestigationWrapper investigation1 = result.myEntries.get(0);
    assertEquals(true, investigation1.isBuildType());
    assertEquals(false, investigation1.isProblem());
    assertEquals(false, investigation1.isTest());
    assertEquals("anyProblem", ProblemTarget.getType(investigation1));
    final BuildTypeResponsibilityEntry buildTypeRE = investigation1.getBuildTypeRE();
    assertEquals(true, buildTypeRE != null);
    assertEquals(myUser, investigation1.getResponsibleUser());
    assertEquals(ResponsibilityEntry.State.TAKEN, investigation1.getState());
}
Also used : InvestigationWrapper(jetbrains.buildServer.server.rest.data.investigations.InvestigationWrapper) BuildTypeResponsibilityEntry(jetbrains.buildServer.responsibility.BuildTypeResponsibilityEntry) Test(org.testng.annotations.Test)

Aggregations

BuildTypeResponsibilityEntry (jetbrains.buildServer.responsibility.BuildTypeResponsibilityEntry)1 InvestigationWrapper (jetbrains.buildServer.server.rest.data.investigations.InvestigationWrapper)1 Test (org.testng.annotations.Test)1