private ContainerBuilder InitializeContainerBuilder(YamsConfig yamsConfig) { IUpdateSessionManager updateSessionManager = new StubIUpdateSessionManager() .TryStartUpdateSession(applicationId => Task.FromResult(true)) .EndUpdateSession(applicationId => Task.FromResult(true)); IDeploymentRepository deploymentRepository = new LocalDeploymentRepository(_deploymentDirPath, new JsonDeploymentConfigSerializer(new JsonSerializer(new DiagnosticsTraceWriter()))); return(YamsDiModule.RegisterTypes(yamsConfig, deploymentRepository, updateSessionManager)); }
private void InitializeYamsService(YamsConfig yamsConfig) { IUpdateSessionManager updateSessionManager = new StubIUpdateSessionManager() .TryStartUpdateSession(applicationId => Task.FromResult(true)) .EndUpdateSession(applicationId => Task.FromResult(true)); _yamsDiModule = new YamsDiModule(yamsConfig, new LocalDeploymentRepository( _deploymentDirPath, new JsonDeploymentConfigSerializer( new JsonSerializer(new DiagnosticsTraceWriter()))), updateSessionManager); _yamsService = _yamsDiModule.YamsService; }
private void InitializeYamsService(YamsConfig yamsConfig) { IUpdateSessionManager updateSessionManager = new StubIUpdateSessionManager() .TryStartUpdateSession(applicationId => Task.FromResult(true)) .EndUpdateSession(applicationId => Task.FromResult(true)); _yamsDiModule = new YamsDiModule(yamsConfig, new LocalDeploymentRepository( _deploymentDirPath, new JsonDeploymentConfigSerializer( new JsonSerializer(new DiagnosticsTraceWriter()))), updateSessionManager); _yamsService = _yamsDiModule.YamsService; }
public EndToEndTest() { _dataRootPath = Path.Combine(Directory.GetCurrentDirectory(), "Data", "EndToEndTest"); _testDirPath = Path.Combine(Directory.GetCurrentDirectory(), "EndToEndTest"); _deploymentDirPath = Path.Combine(_testDirPath, "Deployments"); _applicationsInstallPath = Path.Combine(_testDirPath, "applications"); FileUtils.CopyDir(_dataRootPath, _deploymentDirPath, overwrite: true).Wait(); CopyTestProcessExeToTestApps(); var yamsConfig = new YamsConfigBuilder("deploymentId1", "1", "instanceId", _applicationsInstallPath).SetShowApplicationProcessWindow(false).Build(); IUpdateSessionManager updateSessionManager = new StubIUpdateSessionManager() .TryStartUpdateSession(applicationId => Task.FromResult(true)) .EndUpdateSession(applicationId => Task.FromResult(true)); _yamsDiModule = new YamsDiModule(yamsConfig, new LocalDeploymentRepository(_deploymentDirPath), updateSessionManager); _yamsService = _yamsDiModule.YamsService; }
private void InitializeYamsService(IContainer container) { _yamsDiModule = new YamsDiModule(container); _yamsService = _yamsDiModule.YamsService; }