DoDisplayMacro() private method

private DoDisplayMacro ( object commandObject, XCore.UIItemDisplayProperties display, IVwSelection sel ) : bool
commandObject object
display XCore.UIItemDisplayProperties
sel IVwSelection
return bool
Example #1
0
        public void DoDisplayMacro_NoMacro_HidesCommand()
        {
            var props   = new UIItemDisplayProperties(null, "SomeMacro", true, null, false);
            var ml      = new MacroListener();
            var command = GetF4CommandObject();

            ml.DoDisplayMacro(command, props, null);
            Assert.That(props.Visible, Is.False);             // no implementation of F4, hide it altogether.
        }
Example #2
0
 public void DoDisplayMacro_NoMacro_HidesCommand()
 {
     var props = new UIItemDisplayProperties(null, "SomeMacro", true, null, false);
     var ml = new MacroListener();
     using (var command = GetF4CommandObject())
     {
         ml.DoDisplayMacro(command, props, null);
         Assert.That(props.Visible, Is.False); // no implementation of F4, hide it altogether.
     }
 }
Example #3
0
        public void DoDisplayMacro_NoSelection_ShowsDisabledCommand()
        {
            var props = new UIItemDisplayProperties(null, "SomeMacro", true, null, false);
            var ml    = new MacroListener();

            SetupF4Implementation(ml);
            var command = GetF4CommandObject();

            ml.DoDisplayMacro(command, props, null);
            Assert.That(props.Visible, Is.True);
            Assert.That(props.Enabled, Is.False);             // can't do it without a selection
            Assert.That(props.Text, Is.EqualTo("F4test"));
        }
Example #4
0
 public void DoDisplayMacro_NoSelection_ShowsDisabledCommand()
 {
     var props = new UIItemDisplayProperties(null, "SomeMacro", true, null, false);
     var ml = new MacroListener();
     SetupF4Implementation(ml);
     using (var command = GetF4CommandObject())
     {
         ml.DoDisplayMacro(command, props, null);
         Assert.That(props.Visible, Is.True);
         Assert.That(props.Enabled, Is.False); // can't do it without a selection
         Assert.That(props.Text, Is.EqualTo("F4test"));
     }
 }