public void GetExportInfos_ReturnsSupportedExportInfos() { // Setup var mocks = new MockRepository(); var mainWindow = mocks.Stub <IMainWindow>(); var gui = mocks.Stub <IGui>(); gui.Stub(g => g.MainWindow).Return(mainWindow); mocks.ReplayAll(); using (var plugin = new MacroStabilityInwardsPlugin { Gui = gui }) { // Call ExportInfo[] exportInfos = plugin.GetExportInfos().ToArray(); // Assert Assert.AreEqual(4, exportInfos.Length); Assert.AreEqual(2, exportInfos.Count(i => i.DataType == typeof(MacroStabilityInwardsCalculationGroupContext))); Assert.AreEqual(2, exportInfos.Count(i => i.DataType == typeof(MacroStabilityInwardsCalculationScenarioContext))); } mocks.VerifyAll(); }
public void SetUp() { mocks = new MockRepository(); var mainWindow = mocks.Stub <IMainWindow>(); var gui = mocks.Stub <IGui>(); gui.Stub(g => g.MainWindow).Return(mainWindow); mocks.Replay(gui); mocks.Replay(mainWindow); plugin = new MacroStabilityInwardsPlugin { Gui = gui }; info = plugin.GetExportInfos().First(ei => ei.DataType == typeof(MacroStabilityInwardsCalculationGroupContext) && ei.Name(null).Equals("D-GEO Suite Stability Project")); }
public void SetUp() { mocks = new MockRepository(); var mainWindow = mocks.Stub <IMainWindow>(); var gui = mocks.Stub <IGui>(); gui.Stub(g => g.MainWindow).Return(mainWindow); mocks.Replay(gui); mocks.Replay(mainWindow); plugin = new MacroStabilityInwardsPlugin { Gui = gui }; info = plugin.GetExportInfos().First(ei => ei.DataType == typeof(MacroStabilityInwardsCalculationScenarioContext) && ei.Name(null).Equals("Riskeer berekeningenconfiguratie")); }