Ejemplo n.º 1
0
        public BuildDeployArtifactFileStep(DBCommandsFactory dbCommandsFactory,
                                           AutoVersionsDBSettings settings)
        {
            dbCommandsFactory.ThrowIfNull(nameof(dbCommandsFactory));

            _dbCommandsFactory = dbCommandsFactory;
            _settings          = settings;
        }
Ejemplo n.º 2
0
        public static void Init(IKernel kernel)
        {
            AutoVersionsDBSettings setting = new AutoVersionsDBSettings(@"[CommonApplicationData]\AutoVersionsDB.IntegrationTests");

            kernel.Bind <AutoVersionsDBSettings>().ToConstant(setting);


            MockConsoleError = new Mock <IStandardStreamWriter>();
            MockConsoleOut   = new Mock <IStandardStreamWriter>();

            MockConsole = new Mock <IConsoleExtended>();
            MockConsole.Setup(m => m.Error).Returns(MockConsoleError.Object);
            MockConsole.Setup(m => m.Out).Returns(MockConsoleOut.Object);
            kernel.Bind <IConsoleExtended>().ToConstant(MockConsole.Object);


            ConsoleProcessMessages internalConsoleProcessMessages = kernel.Get <ConsoleProcessMessages>();

            MockConsoleProcessMessages = new Mock <ConsoleProcessMessagesForTests>(MockBehavior.Strict, internalConsoleProcessMessages);
            kernel.Rebind <IConsoleProcessMessages>().ToConstant(MockConsoleProcessMessages.Object);


            NotificationsViewModel internalNotificationsViewModel = kernel.Get <NotificationsViewModel>();

            MockNotificationsViewModel = new Mock <NotificationsViewModelForTests>(MockBehavior.Strict, internalNotificationsViewModel);
            kernel.Rebind <INotificationsViewModel>().ToConstant(MockNotificationsViewModel.Object);

            DBVersionsViewSateManager internalDBVersionsViewSateManager = kernel.Get <DBVersionsViewSateManager>();

            MockDBVersionsViewSateManagerFotTests = new Mock <DBVersionsViewSateManagerForTests>(MockBehavior.Strict, internalDBVersionsViewSateManager);
            kernel.Rebind <IDBVersionsViewSateManager>().ToConstant(MockDBVersionsViewSateManagerFotTests.Object);

            EditProjectViewSateManager internalEditProjectViewSateManager = kernel.Get <EditProjectViewSateManager>();

            MockEditProjectViewSateManagerFotTests = new Mock <EditProjectViewSateManagerForTests>(MockBehavior.Strict, internalEditProjectViewSateManager);
            kernel.Rebind <IEditProjectViewSateManager>().ToConstant(MockEditProjectViewSateManagerFotTests.Object);



            MockOsProcessUtils = new Mock <OsProcessUtils>();
            kernel.Bind <OsProcessUtils>().ToConstant(MockOsProcessUtils.Object);

            MockOsProcessUtils
            .Setup(m => m.StartOsProcess(It.IsAny <string>()))
            .Callback <string>((filename) =>
            {
                //Do nothing
            });

            UIGeneralEvents.OnException += UIGeneralEvents_OnException;
        }
Ejemplo n.º 3
0
 public ProjectConfigsStorage(AutoVersionsDBSettings settings)
 {
     _settings = settings;
 }