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();
        }
Example #2
0
 private static TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(CalculationsStateRootContext)));
 }
Example #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));
 }
Example #5
0
 public void SetUp()
 {
     mocks  = new MockRepository();
     plugin = new RiskeerPlugin();
     info   = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(GrassCoverSlipOffInwardsFailureMechanismContext));
 }
Example #6
0
 private static TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(HydraulicBoundaryDatabaseContext)));
 }
Example #7
0
 public void SetUp()
 {
     plugin = new RiskeerPlugin();
     info   = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(WaterPressureAsphaltCoverFailureMechanismSectionResultContext));
 }
Example #8
0
 public void SetUp()
 {
     mocks  = new MockRepository();
     plugin = new RiskeerPlugin();
     info   = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(SpecificFailureMechanismContext));
 }
Example #9
0
 private static TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(WaterLevelCalculationsForNormTargetProbabilitiesGroupContext)));
 }
Example #10
0
 private static TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(WaveHeightCalculationsForUserDefinedTargetProbabilitiesGroupContext)));
 }
Example #11
0
 private TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(CategoryTreeFolder)));
 }
Example #12
0
 private static TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(BackgroundData)));
 }
Example #13
0
 public void SetUp()
 {
     mocksRepository = new MockRepository();
     plugin          = new RiskeerPlugin();
     info            = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(StructuresOutputContext));
 }
Example #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)));
 }
Example #16
0
 private static TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(AssessmentSectionAssemblyGroupsContext)));
 }
Example #17
0
 private TreeNodeInfo GetInfo(RiskeerPlugin plugin)
 {
     return(plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(AssessmentSectionStateRootContext)));
 }
Example #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));
 }
Example #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));
 }