Search in sources :

Example 1 with AbstractAgentPoolResolver

use of jetbrains.buildServer.server.graphql.resolver.agentPool.AbstractAgentPoolResolver in project teamcity-rest by JetBrains.

the class AbstractAgentPoolResolverTest method setUp.

@Override
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    myActionChecker = new AgentPoolAccessCheckerForTests();
    SecuredProjectManager projectManager = new SecuredProjectManager(myFixture.getSecurityContext());
    projectManager.setDelegate(myProjectManager);
    Mock cloudManagerMock = mock(CloudManager.class);
    myResolver = new AbstractAgentPoolResolver(projectManager, myActionChecker, // not actually used in tests
    (CloudManager) cloudManagerMock.proxy(), myFixture.getAgentTypeFinder(), myServer.getSecurityContext());
}
Also used : SecuredProjectManager(jetbrains.buildServer.serverSide.impl.auth.SecuredProjectManager) CloudManager(jetbrains.buildServer.clouds.server.CloudManager) AbstractAgentPoolResolver(jetbrains.buildServer.server.graphql.resolver.agentPool.AbstractAgentPoolResolver) Mock(org.jmock.Mock) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

CloudManager (jetbrains.buildServer.clouds.server.CloudManager)1 AbstractAgentPoolResolver (jetbrains.buildServer.server.graphql.resolver.agentPool.AbstractAgentPoolResolver)1 SecuredProjectManager (jetbrains.buildServer.serverSide.impl.auth.SecuredProjectManager)1 Mock (org.jmock.Mock)1 BeforeMethod (org.testng.annotations.BeforeMethod)1