public void TestInitialise()
        {
            _OriginalClassFactory = Factory.TakeSnapshot();

            _AutoConfigBaseStationDatabase = TestUtilities.CreateMockSingleton<IAutoConfigBaseStationDatabase>();
            _BaseStationDatabase = new Mock<IBaseStationDatabase>() { DefaultValue = DefaultValue.Mock }.SetupAllProperties();
            _AutoConfigBaseStationDatabase.Setup(r => r.Database).Returns(_BaseStationDatabase.Object);

            _Presenter = Factory.Singleton.Resolve<IReceiverLocationsPresenter>();
            _View = new Mock<IReceiverLocationsView>() { DefaultValue = DefaultValue.Mock} .SetupAllProperties();
        }
        /// <summary>
        /// Called after the view has been created but before the user sees anything.
        /// </summary>
        /// <param name="e"></param>
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            Localise.Form(this);
            PopulateLocations();

            _Presenter = Factory.Singleton.Resolve <IReceiverLocationsPresenter>();
            _Presenter.Initialise(this);

            _OnlineHelp = new OnlineHelpHelper(this, OnlineHelpAddress.WinFormsReceiverLocationsView);

            SelectedReceiverLocation = _SelectedReceiverLocation;
        }
Exemplo n.º 3
0
        public void TestInitialise()
        {
            _OriginalClassFactory = Factory.TakeSnapshot();

            _AutoConfigBaseStationDatabase = TestUtilities.CreateMockSingleton <IAutoConfigBaseStationDatabase>();
            _BaseStationDatabase           = new Mock <IBaseStationDatabase>()
            {
                DefaultValue = DefaultValue.Mock
            }.SetupAllProperties();
            _AutoConfigBaseStationDatabase.Setup(r => r.Database).Returns(_BaseStationDatabase.Object);

            _Presenter = Factory.Singleton.Resolve <IReceiverLocationsPresenter>();
            _View      = new Mock <IReceiverLocationsView>()
            {
                DefaultValue = DefaultValue.Mock
            }.SetupAllProperties();
        }
        /// <summary>
        /// Called after the view has been created but before the user sees anything.
        /// </summary>
        /// <param name="e"></param>
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            Localise.Form(this);
            PopulateLocations();

            _Presenter = Factory.Singleton.Resolve<IReceiverLocationsPresenter>();
            _Presenter.Initialise(this);

            _OnlineHelp = new OnlineHelpHelper(this, OnlineHelpAddress.WinFormsReceiverLocationsView);

            SelectedReceiverLocation = _SelectedReceiverLocation;
        }