예제 #1
0
        public void PublishSProcCommandStatus()
        {
            var cmd = new PublishSProcCommand(_appShell, _pss);

            cmd.GetCommandStatus(null, 0, true, null, CommandStatus.NotSupported).Should().Be(CommandStatusResult.Unhandled);
            cmd.GetCommandStatus(null, RPackageCommandId.icmdPublishSProc, true, null, CommandStatus.NotSupported)
            .Should().Be(new CommandStatusResult(true, null, CommandStatus.Enabled | CommandStatus.Supported));
            cmd.TryHandleCommand(null, 0, false, 0, IntPtr.Zero, IntPtr.Zero).Should().BeFalse();
        }
예제 #2
0
        public void PublishSProcCommandStatus()
        {
            var servicesProvider = Substitute.For <IDacPackageServicesProvider>();

            var cmd = new PublishSProcCommand(_appShell, _pss, servicesProvider, Substitute.For <ISettingsStorage>());

            cmd.GetCommandStatus(null, 0, true, null, CommandStatus.NotSupported).Should().Be(CommandStatusResult.Unhandled);
            cmd.GetCommandStatus(null, RPackageCommandId.icmdPublishSProc, true, null, CommandStatus.NotSupported)
            .Should().Be(new CommandStatusResult(true, null, CommandStatus.Enabled | CommandStatus.Supported));
            cmd.TryHandleCommand(null, 0, false, 0, IntPtr.Zero, IntPtr.Zero).Should().BeFalse();
        }