Search in sources :

Example 1 with RemoteRepositoryUrlInvestigatorImpl

use of jetbrains.buildServer.buildTriggers.vcs.git.agent.RemoteRepositoryUrlInvestigatorImpl in project teamcity-git by JetBrains.

the class AgentConfigPluginTest method setUp.

@BeforeMethod
public void setUp() {
    new TeamCityProperties() {

        {
            setModel(new BasePropertiesModel() {
            });
        }
    };
    myMockery = new Mockery();
    myAgentConfig = myMockery.mock(BuildAgentConfiguration.class);
    myBuild = myMockery.mock(AgentRunningBuild.class);
    myBuildSharedConfigParameters = new HashMap<String, String>();
    myMockery.checking(new Expectations() {

        {
            allowing(myBuild).getSharedConfigParameters();
            will(returnValue(myBuildSharedConfigParameters));
            allowing(myBuild).getBuildLogger();
            allowing(myAgentConfig).getCacheDirectory("git");
            will(returnValue(new File("")));
        }
    });
    myMirrorManager = new MirrorManagerImpl(new AgentMirrorConfig(myAgentConfig), new HashCalculatorImpl(), new RemoteRepositoryUrlInvestigatorImpl());
}
Also used : Expectations(org.jmock.Expectations) AgentRunningBuild(jetbrains.buildServer.agent.AgentRunningBuild) AgentMirrorConfig(jetbrains.buildServer.buildTriggers.vcs.git.agent.AgentMirrorConfig) RemoteRepositoryUrlInvestigatorImpl(jetbrains.buildServer.buildTriggers.vcs.git.agent.RemoteRepositoryUrlInvestigatorImpl) Mockery(org.jmock.Mockery) TeamCityProperties(jetbrains.buildServer.serverSide.TeamCityProperties) BasePropertiesModel(jetbrains.buildServer.serverSide.BasePropertiesModel) BuildAgentConfiguration(jetbrains.buildServer.agent.BuildAgentConfiguration) File(java.io.File) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

File (java.io.File)1 AgentRunningBuild (jetbrains.buildServer.agent.AgentRunningBuild)1 BuildAgentConfiguration (jetbrains.buildServer.agent.BuildAgentConfiguration)1 AgentMirrorConfig (jetbrains.buildServer.buildTriggers.vcs.git.agent.AgentMirrorConfig)1 RemoteRepositoryUrlInvestigatorImpl (jetbrains.buildServer.buildTriggers.vcs.git.agent.RemoteRepositoryUrlInvestigatorImpl)1 BasePropertiesModel (jetbrains.buildServer.serverSide.BasePropertiesModel)1 TeamCityProperties (jetbrains.buildServer.serverSide.TeamCityProperties)1 Expectations (org.jmock.Expectations)1 Mockery (org.jmock.Mockery)1 BeforeMethod (org.testng.annotations.BeforeMethod)1