Exemplo n.º 1
0
            public virtual void Setup()
            {
                _tfsListener = MockRepository.GenerateStub <ITfsListener>();

                // configure deployer
                var deployer = MockRepository.GenerateStub <IDeployer>();

                deployer.Stub(o => o.ExecuteDeploymentProcess(null))
                .IgnoreArguments()
                .WhenCalled(mi => _deployerExecuteCount++)
                .Repeat.Any();

                // configure deployer factory stub to return our deployer stub
                IDeployerFactory deployerFactory = MockRepository.GenerateStub <IDeployerFactory>();

                deployerFactory.Stub(o => o.Create())
                .Return(deployer)
                .Repeat.Any()
                ;

                _tfsListener.BuildStatusChangeEventReceived += null;
                _eventRaiser = _tfsListener.GetEventRaiser <ITfsListener>(mo => mo.BuildStatusChangeEventReceived += null);

                // we're using a real DuplicateEventDetector
                _duplicateEventDetector = new DuplicateEventDetector();

                _statusChanged = new BuildStatusChangeEvent {
                    StatusChange = new Change()
                };

                _deployerExecuteCount = 0;

                _buildStatusTrigger = new TfsBuildStatusTrigger(_tfsListener, deployerFactory, _duplicateEventDetector);
                _buildStatusTrigger.Start();
            }
Exemplo n.º 2
0
 public TfsBuildStatusPoll(IBuildServer buildServer, IDeployerFactory deployerFactory)
 {
     _buildServer      = buildServer;
     _deployerFactory  = deployerFactory;
     _webAccessLinks   = _buildServer.TeamProjectCollection.GetService <TswaClientHyperlinkService>();
     _structureService = _buildServer.TeamProjectCollection.GetService <ICommonStructureService>();
     _timer            = new Timer(state => PollBuildQualityChanges());
 }
        public ConstructionYard(IDeployerFactory factory, string rootDir)
        {
            _factory = factory;
            _rootDir = rootDir;
            _garbage = _factory.CreateGarbage();
            _logger = _factory.CreateLogger();
            _persist = _factory.CreatePersistence();

            var smallIo = _factory.CreateSmallTextIo(_persist);
            var jsonPersist = new JsonPersistence(smallIo);
            var slugCreator = new SlugCreator();
            _configService = new RealConfigurationService(_rootDir, jsonPersist, slugCreator);
        }
        public ConstructionYard(IDeployerFactory factory, string rootDir)
        {
            _factory = factory;
            _rootDir = rootDir;
            _garbage = _factory.CreateGarbage();
            _logger  = _factory.CreateLogger();
            _persist = _factory.CreatePersistence();

            var smallIo     = _factory.CreateSmallTextIo(_persist);
            var jsonPersist = new JsonPersistence(smallIo);
            var slugCreator = new SlugCreator();

            _configService = new RealConfigurationService(_rootDir, jsonPersist, slugCreator);
        }
 public XStaticOnPublishAutoDeployComponent(SitesRepository sitesRepository,
                                            IUmbracoContextFactory umbracoContextFactory,
                                            IStaticSiteStorer storer,
                                            IDeployerFactory deployerFactory,
                                            IImageCropNameGenerator imageCropNameGenerator,
                                            IExportTypeSettings exportTypeSettings)
 {
     _sitesRepository       = sitesRepository;
     _umbracoContextFactory = umbracoContextFactory;
     _storer                 = storer;
     _deployerFactory        = deployerFactory;
     _imageCropNameGenerator = imageCropNameGenerator;
     _exportTypeSettings     = exportTypeSettings;
 }
 public DeployProcess(IStaticSiteStorer storer, IDeployerFactory deployerFactory, SitesRepository sitesRepo)
 {
     _storer          = storer;
     _deployerFactory = deployerFactory;
     _sitesRepo       = sitesRepo;
 }
Exemplo n.º 7
0
 public DeployController(IStaticSiteStorer storer, IDeployerFactory deployerFactory)
 {
     _storer          = storer;
     _deployerFactory = deployerFactory;
     _sitesRepo       = new SitesRepository();
 }
Exemplo n.º 8
0
 public ModeRunner(IDeployerFactory factory, string rootDir)
 {
     _factory = factory;
     _rootDir = rootDir;
 }
Exemplo n.º 9
0
 public ModeRunner(IDeployerFactory factory, string rootDir)
 {
     _factory = factory;
     _rootDir = rootDir;
 }
Exemplo n.º 10
0
 public DeploymentManager(IRepositoryManager repositoryManager,
                          IDeployerFactory deployerFactory)
 {
     _repositoryManager = repositoryManager;
     _deployerFactory   = deployerFactory;
 }
Exemplo n.º 11
0
 public DeploymentManager(IRepositoryManager repositoryManager,
                          IDeployerFactory deployerFactory)
 {
     _repositoryManager = repositoryManager;
     _deployerFactory = deployerFactory;
 }
Exemplo n.º 12
0
 public TfsBuildStatusTrigger(ITfsListener listener, IDeployerFactory deployerFactory, IDuplicateEventDetector duplicateEventDetector)
 {
     _listener               = listener;
     _deployerFactory        = deployerFactory;
     _duplicateEventDetector = duplicateEventDetector;
 }