public void ContextMenuStrip_Always_CallsBuilder()
        {
            // Setup
            var mocks       = new MockRepository();
            var menuBuilder = mocks.StrictMock <IContextMenuBuilder>();

            menuBuilder.Expect(mb => mb.AddPropertiesItem()).Return(menuBuilder);
            menuBuilder.Expect(mb => mb.Build()).Return(null);

            IGui gui = StubFactory.CreateGuiStub(mocks);

            using (var treeViewControl = new TreeViewControl())
            {
                gui.Stub(g => g.Get(null, treeViewControl)).Return(menuBuilder);

                mocks.ReplayAll();

                using (var p = new RiskeerPlugin())
                {
                    p.Gui = gui;
                    TreeNodeInfo i = p.GetTreeNodeInfos().First(tni => tni.TagType == typeof(DikeProfile));

                    // Call
                    i.ContextMenuStrip(null, null, treeViewControl);
                }
            }

            // Assert
            mocks.VerifyAll();
        }
Ejemplo n.º 2
0
 private static TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(CalculationsStateRootContext)));
 }
Ejemplo n.º 3
0
 private TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(FailureMechanismSectionsContext)));
 }
 public void SetUp()
 {
     plugin = new RiskeerPlugin();
     info   = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(DikeProfile));
 }
Ejemplo n.º 5
0
 public void SetUp()
 {
     mocks  = new MockRepository();
     plugin = new RiskeerPlugin();
     info   = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(GrassCoverSlipOffInwardsFailureMechanismContext));
 }
Ejemplo n.º 6
0
 private static TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(HydraulicBoundaryDatabaseContext)));
 }
Ejemplo n.º 7
0
 public void SetUp()
 {
     plugin = new RiskeerPlugin();
     info   = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(WaterPressureAsphaltCoverFailureMechanismSectionResultContext));
 }
Ejemplo n.º 8
0
 public void SetUp()
 {
     mocks  = new MockRepository();
     plugin = new RiskeerPlugin();
     info   = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(SpecificFailureMechanismContext));
 }
Ejemplo n.º 9
0
 private static TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(WaterLevelCalculationsForNormTargetProbabilitiesGroupContext)));
 }
Ejemplo n.º 10
0
 private static TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(WaveHeightCalculationsForUserDefinedTargetProbabilitiesGroupContext)));
 }
Ejemplo n.º 11
0
 private TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(CategoryTreeFolder)));
 }
Ejemplo n.º 12
0
 private static TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(BackgroundData)));
 }
Ejemplo n.º 13
0
 public void SetUp()
 {
     mocksRepository = new MockRepository();
     plugin          = new RiskeerPlugin();
     info            = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(StructuresOutputContext));
 }
Ejemplo n.º 14
0
 private static TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(AssemblyResultPerSectionContext)));
 }
 private TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(ReferenceLineContext)));
 }
Ejemplo n.º 16
0
 private static TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(AssessmentSectionAssemblyGroupsContext)));
 }
Ejemplo n.º 17
0
 private TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(AssessmentSectionStateRootContext)));
 }
Ejemplo n.º 18
0
 public void SetUp()
 {
     plugin = new RiskeerPlugin();
     info   = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(GrassCoverSlipOffOutwardsFailureMechanismSectionResultContext));
 }
 public void SetUp()
 {
     plugin = new RiskeerPlugin();
     info   = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(PipingStructureFailureMechanismSectionResultContext));
 }
Ejemplo n.º 20
0
 private static TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(GenericFailureMechanismsContext)));
 }
 public void SetUp()
 {
     plugin = new RiskeerPlugin();
     info   = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(ForeshoreProfilesContext));
 }