Exemplo n.º 1
0
        public void DiffLocalItem()
        {
            ISelectionContext selC = SelectionContextMock.EmptyContext();

            using (ServiceProviderHelper.AddService(typeof(ISelectionContext), selC))
            {
                Assert.That(CommandTester.TestExecution(AnkhCommand.DiffLocalItem), Is.False);
            }
        }
Exemplo n.º 2
0
        public void ViewInWindowsCommand()
        {
            ISelectionContext selC = SelectionContextMock.EmptyContext();

            using (ServiceProviderHelper.AddService(typeof(ISelectionContext), selC))
            {
                Assert.That(CommandTester.TestExecution(AnkhCommand.ViewInWindows), Is.False);
            }
        }
Exemplo n.º 3
0
        public void UpdateItemCommand()
        {
            ISelectionContext selC = SelectionContextMock.EmptyContext();

            using (ServiceProviderHelper.AddService(typeof(ISelectionContext), selC))
            {
                Assert.That(CommandTester.TestExecution(AnkhCommand.UpdateItemSpecific), Is.False);
            }
        }
Exemplo n.º 4
0
        public void AddItem()
        {
            ISelectionContext selC = SelectionContextMock.EmptyContext();

            using (ServiceProviderHelper.AddService(typeof(ISelectionContext), selC))
            {
                Assert.IsFalse(CommandTester.TestExecution(AnkhCommand.AddItem), "Add disabled with empty selection");
            }
        }
Exemplo n.º 5
0
        public void RemoveWorkingCopyRoot()
        {
            ISelectionContext selC = SelectionContextMock.EmptyContext();

            using (ServiceProviderHelper.AddService(typeof(ISelectionContext), selC))
            {
                Assert.That(CommandTester.TestExecution(AnkhCommand.RemoveWorkingCopyExplorerRoot), Is.False);
            }
        }
Exemplo n.º 6
0
        public void MakeDirectoryCommand()
        {
            ISelectionContext selC = SelectionContextMock.EmptyContext();

            using (ServiceProviderHelper.AddService(typeof(ISelectionContext), selC))
            {
                Assert.That(CommandTester.TestExecution(AnkhCommand.NewFolder), Is.False);
            }
        }
Exemplo n.º 7
0
        public void CopyReposExplorerUrl()
        {
            ISelectionContext selC = SelectionContextMock.EmptyContext();

            using (ServiceProviderHelper.AddService(typeof(ISelectionContext), selC))
            {
                Assert.That(CommandTester.TestExecution(AnkhCommand.CopyReposExplorerUrl), Is.False);
            }
        }
Exemplo n.º 8
0
        public void AddWorkingCopyExplorerRootCommandWithPath()
        {
            ISelectionContext selC = SelectionContextMock.EmptyContext();

            using (ServiceProviderHelper.AddService(typeof(ISelectionContext), selC))
            {
                Assert.IsTrue(CommandTester.TestExecution(AnkhCommand.WorkingCopyBrowse, Path.GetTempPath()));
            }
        }
Exemplo n.º 9
0
        public void RevertItemCommand()
        {
            ISelectionContext selC = SelectionContextMock.EmptyContext();

            using (ServiceProviderHelper.AddService(typeof(ISelectionContext), selC))
            {
                Assert.That(CommandTester.TestExecution(AnkhCommand.RevertItem), Is.False,
                            "Cannot revert empty selection");
            }
        }
Exemplo n.º 10
0
        public void Refresh()
        {
            ISelectionContext selC = SelectionContextMock.EmptyContext();

            using (ServiceProviderHelper.AddService(typeof(ISelectionContext), selC))
            {
                Assert.That(CommandTester.TestExecution(AnkhCommand.Refresh), Is.True,
                            "Refresh works with empty selection");
            }
        }
Exemplo n.º 11
0
        public void CommitItemCommand()
        {
            ISelectionContext selC = SelectionContextMock.EmptyContext();

            using (ServiceProviderHelper.AddService(typeof(ISelectionContext), selC))
            {
                Assert.That(CommandTester.TestExecution(AnkhCommand.CommitItem), Is.False,
                            "Commit doesn't run without selection");
            }
        }
Exemplo n.º 12
0
        public void CheckoutCommand()
        {
            ISelectionContext selC = SelectionContextMock.EmptyContext();

            using (ServiceProviderHelper.AddService(typeof(ISelectionContext), selC))
            {
                Assert.That(CommandTester.TestExecution(AnkhCommand.Checkout), Is.False,
                            "Checkout doesn't execute with empty selection");
            }
        }
Exemplo n.º 13
0
        public void BlameCommand()
        {
            ISelectionContext selC = SelectionContextMock.EmptyContext();

            using (ServiceProviderHelper.AddService(typeof(ISelectionContext), selC))
            {
                Assert.That(CommandTester.TestExecution(AnkhCommand.ItemAnnotate), Is.False,
                            "Blame with empty selection doesn't execute");
            }
        }
Exemplo n.º 14
0
        public void ShowWorkingCopyExplorer()
        {
            //IAnkhPackage package = mocks.CreateMock<IAnkhPackage>();
            //using (mocks.Record())
            //{
            //    package.ShowToolWindow(AnkhToolWindow.WorkingCopyExplorer);
            //    LastCall.Repeat.Once();
            //}

            //using (mocks.Playback())
            //{
            CommandTester.TestExecution(AnkhCommand.ShowWorkingCopyExplorer);
            //}
        }
Exemplo n.º 15
0
        public void ShowCommitDialog()
        {
            var state = new Mock <IAnkhCommandStates>();

            state.SetupGet(x => x.SccProviderActive).Returns(true);

            var uiShell = new Mock <SVsUIShell>().As <IVsUIShell>();

            using (ServiceProviderHelper.AddService(typeof(SVsUIShell), uiShell.Object))
                using (ServiceProviderHelper.AddService(typeof(IAnkhCommandStates), state.Object))
                {
                    Assert.That(CommandTester.TestExecution(AnkhCommand.ShowPendingChanges), Is.True);
                }
        }
Exemplo n.º 16
0
 public void AddRepositoryRoot()
 {
     Assert.IsTrue(CommandTester.TestExecution(AnkhCommand.RepositoryBrowse), "Add repository root always enabled");
 }
Exemplo n.º 17
0
 public void AddWorkingCopyExplorerRootCommand()
 {
     CommandTester.TestExecution(AnkhCommand.WorkingCopyBrowse);
 }