DoDisplayMacro() private method

private DoDisplayMacro ( object commandObject, XCore.UIItemDisplayProperties display, IVwSelection sel ) : bool
commandObject object
display XCore.UIItemDisplayProperties
sel IVwSelection
return bool
Ejemplo n.º 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.
        }
Ejemplo n.º 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.
     }
 }
Ejemplo n.º 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"));
        }
Ejemplo n.º 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"));
     }
 }