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());
}
Aggregations