public void GetViewInfos_ReturnsSupportedViewInfos()
        {
            // Setup
            const string symbol     = "<symbol>";
            var          fontFamily = new FontFamily();

            var mockRepository = new MockRepository();
            var gui            = mockRepository.Stub <IGui>();

            gui.Stub(g => g.ActiveStateInfo).Return(new StateInfo(string.Empty, symbol, fontFamily, p => p));
            mockRepository.ReplayAll();

            using (var plugin = new StabilityStoneCoverPlugin
            {
                Gui = gui
            })
            {
                // Call
                ViewInfo[] viewInfos = plugin.GetViewInfos().ToArray();

                // Assert
                Assert.AreEqual(4, viewInfos.Length);

                PluginTestHelper.AssertViewInfoDefined(
                    viewInfos,
                    typeof(HydraulicLoadsStateFailureMechanismContext),
                    typeof(HydraulicLoadsStateFailureMechanismView));

                PluginTestHelper.AssertViewInfoDefined(
                    viewInfos,
                    typeof(RegistrationStateFailureMechanismContext),
                    typeof(RegistrationStateFailureMechanismView));

                PluginTestHelper.AssertViewInfoDefined(
                    viewInfos,
                    typeof(StabilityStoneCoverFailureMechanismSectionResultContext),
                    typeof(IObservableEnumerable <NonAdoptableWithProfileProbabilityFailureMechanismSectionResult>),
                    typeof(NonAdoptableWithProfileProbabilityFailureMechanismResultView <StabilityStoneCoverFailureMechanism>));

                PluginTestHelper.AssertViewInfoDefined(
                    viewInfos,
                    typeof(StabilityStoneCoverWaveConditionsInputContext),
                    typeof(StabilityStoneCoverWaveConditionsCalculation),
                    typeof(WaveConditionsInputView));

                viewInfos.ForEachElementDo(vi =>
                {
                    Assert.AreEqual(symbol, vi.GetSymbol());
                    Assert.AreSame(fontFamily, vi.GetFontFamily());
                });
            }

            mockRepository.VerifyAll();
        }
 public void SetUp()
 {
     mocks  = new MockRepository();
     plugin = new StabilityStoneCoverPlugin();
     info   = plugin.GetViewInfos().First(tni => tni.ViewType == typeof(StabilityStoneCoverFailureMechanismView));
 }
 public void SetUp()
 {
     mocks  = new MockRepository();
     plugin = new StabilityStoneCoverPlugin();
     info   = plugin.GetViewInfos().First(tni => tni.ViewType == typeof(NonAdoptableWithProfileProbabilityFailureMechanismResultView <StabilityStoneCoverFailureMechanism>));
 }
 public void SetUp()
 {
     plugin = new StabilityStoneCoverPlugin();
     info   = plugin.GetViewInfos().First(tni => tni.ViewType == typeof(WaveConditionsInputView));
 }