use of com.thoughtworks.go.server.persistence.AgentDao in project gocd by gocd.
the class AgentServiceTest method setUp.
@Before
public void setUp() {
agentInstances = mock(AgentInstances.class);
AgentConfig config = new AgentConfig("uuid", "host", "192.168.1.1");
when(agentInstances.findAgentAndRefreshStatus("uuid")).thenReturn(AgentInstance.createFromConfig(config, new SystemEnvironment()));
agentDao = mock(AgentDao.class);
uuidGenerator = mock(UuidGenerator.class);
agentService = new AgentService(mock(AgentConfigService.class), new SystemEnvironment(), agentInstances, mock(EnvironmentConfigService.class), mock(GoConfigService.class), mock(SecurityService.class), agentDao, uuidGenerator, serverHealthService = mock(ServerHealthService.class));
agentIdentifier = config.getAgentIdentifier();
when(agentDao.cookieFor(agentIdentifier)).thenReturn("cookie");
}
Aggregations