public void SelectedBranchShouldBeCurrentBranchAfterRefresh() { //arrange var vm = new BranchesViewViewModel { Provider = _provider.Object }; _provider.SetupGet(git => git.CurrentBranch).Returns(_branches[1]); //act vm.RefreshView(); //assert Assert.AreEqual(_provider.Object.CurrentBranch.Name, vm.CurrentBranch); }
public void RefreshingViewShouldNotCheckoutBranch() { //arrange var vm = new BranchesViewViewModel { Provider = _provider.Object, }; //act vm.RefreshView(); //assert _provider.Verify(git => git.Checkout(It.IsAny<string>()), Times.Once); //checkout when we first set provider }