public void should_map_each_of_the_sub_menus_menu_items_to_tool_strip_menu_items()
        {
            var firstMenuItem = mockery.DynamicMock <IMenuItem>();

            menuItems.Add(firstMenuItem);
            using (mockery.Record()) {
                Expect
                .Call(mapper.MapFrom(firstMenuItem))
                .Return(new ToolStripMenuItem())
                .Repeat
                .AtLeastOnce();
            }

            using (mockery.Playback()) {
                CreateSUT().MapFrom(subMenu);
            }
        }
        public ToolStripMenuItem MapFrom(ISubMenu item)
        {
            var toolStripMenuItem = new ToolStripMenuItem(item.Name());

            foreach (var menuItem in item.AllMenuItems())
            {
                toolStripMenuItem.DropDownItems.Add(mapper.MapFrom(menuItem));
            }
            return(toolStripMenuItem);
        }