Beispiel #1
0
        public void RefreshingViewShouldNotCheckoutBranch()
        {
            var vm = new BranchesPanelViewModel
            {
                Provider = _provider.Object,
            };

            vm.RefreshView();

            _provider.Verify(git => git.Checkout(It.IsAny <string>()), Times.Once);  //checkout when we first set provider
        }
Beispiel #2
0
        public void SelectedBranchShouldBeCurrentBranchAfterRefresh()
        {
            var vm = new BranchesPanelViewModel
            {
                Provider = _provider.Object
            };

            _provider.SetupGet(git => git.CurrentBranch).Returns(_branches[1]);

            vm.RefreshView();

            Assert.AreEqual(_provider.Object.CurrentBranch.Name, vm.CurrentBranch);
        }