public SystemVariablesIntegrationTestFixture()
 {
     _repo      = new SystemVariablesRepository();
     _manager   = new SystemVariablesManager(_repo);
     _mockView  = new Mock <ISystemVariablesView>();
     _presenter = new SystemVariablesPresenter(_mockView.Object, _manager);
 }
Exemple #2
0
 /// <summary>
 /// Inject all interfaces, assign in constructor and initialise events.
 /// </summary>
 /// <param name="impositionFormManager"></param>
 /// <param name="systemVariablesManager"></param>
 /// <param name="systemVariablesFormPresenter"></param>
 /// <param name="printingDesignManager"></param>
 public ImpositionForm(IImpositionCalculatorManager impositionFormManager, ISystemVariablesManager systemVariablesManager,
                       SystemVariablesPresenter systemVariablesFormPresenter, IPrintingDesignManager printingDesignManager)
 {
     _systemVariablesManager       = systemVariablesManager;
     _signatureSizeManager         = impositionFormManager;
     _systemVariablesFormPresenter = systemVariablesFormPresenter;
     _printingDesignManager        = printingDesignManager;
     InitializeComponent();
 }
Exemple #3
0
        /* Ideas on what to test:
         * Correct outcome
         * Error being logged to view
         *
         * Individual methods
         * Methods working together so check to see if other events get raised
         * CalculatePossibleOptions - Test the manager and maybe mock the repository so that we can see
         * if the values are calculated correctly.
         * */

        public ImpositionCalculatorPresenterTestFixture()
        {
            _mockSystemVariablesView         = new Mock <ISystemVariablesView>();
            _mockPrintingDesignManager       = new Mock <IPrintingDesignManager>();
            _mockSystemVariablesManager      = new Mock <ISystemVariablesManager>();
            _systemVariablesPresenter        = new SystemVariablesPresenter(_mockSystemVariablesView.Object, _mockSystemVariablesManager.Object);
            _mockImpositionCalculatorRepo    = new Mock <IImpositionCalculatorRepository>();
            _mockImpositionCalculatorManager = new Mock <IImpositionCalculatorManager>();
            _mockView = new Mock <IImpositionFormView>();
            _impositionCalculatorPresenter = new ImpositionCalculatorPresenter(_mockView.Object,
                                                                               _mockImpositionCalculatorManager.Object, _mockSystemVariablesManager.Object, _systemVariablesPresenter,
                                                                               _mockPrintingDesignManager.Object);
        }
 public SystemVariablesPresenterTestFixture()
 {
     _mockView = new Mock <ISystemVariablesView>();
     _mockSystemVariablesManager = new Mock <ISystemVariablesManager>();
     _presenter = new SystemVariablesPresenter(_mockView.Object, _mockSystemVariablesManager.Object);
 }