Пример #1
0
 private void AssertMethodResult(MenuPropertyBuilderForm result)
 {
     result.ShouldSatisfyAllConditions(
         () => GetLabel(MenuHelper.Label1).ShouldBe(MenuHelper.Label1Text),
         () => GetLabel(MenuHelper.Label2).ShouldBe(MenuHelper.Label2Text),
         () => GetButton(MenuHelper.ButtonOk).ShouldBe(MenuHelper.ButtonOkText),
         () => GetButton(MenuHelper.ButtonCancel).ShouldBe(MenuHelper.ButtonCancelText)
         );
 }
Пример #2
0
        public void Setup()
        {
            _shimObject = ShimsContext.Create();

            _menuBuilderObject        = new MenuPropertyBuilderForm();
            _menuBuilderPrivateObject = new PrivateObject(_menuBuilderObject);

            _propertyGridMenu = (WinForms.PropertyGrid)_menuBuilderPrivateObject.GetField("_pgMenu");
            _menuItemProperty = new MenuItemProperty();

            _treeViewMenu     = (WinForms.TreeView)_menuBuilderPrivateObject.GetField("_tvMenu");
            _btnMoveUp        = (ButtonXP)_menuBuilderPrivateObject.GetField("_bMoveUp");
            _btnMoveDown      = (ButtonXP)_menuBuilderPrivateObject.GetField("_bMoveDown");
            _btnChildSibling  = (ButtonXP)_menuBuilderPrivateObject.GetField("_bChildSibling");
            _btnSiblingParent = (ButtonXP)_menuBuilderPrivateObject.GetField("_bSlibingParent");
            _btnAddChild      = (ButtonXP)_menuBuilderPrivateObject.GetField("_bAddChild");
            _btnRemoveNode    = (ButtonXP)_menuBuilderPrivateObject.GetField("_bRemoveNode");
        }
Пример #3
0
 private void CreateClassObject()
 {
     _menuBuilderObject        = new MenuPropertyBuilderForm();
     _menuBuilderPrivateObject = new PrivateObject(_menuBuilderObject);
 }