public void BrowseDiff_MainMenus_NoSelection() { var selectionInfo = CreateContextMenuSelectionInfo(selectedGitItemCount: 0, allFilesExist: false, isAnyTracked: false); _controller.ShouldShowMenuSaveAs(selectionInfo).Should().BeFalse(); _controller.ShouldShowMenuCherryPick(selectionInfo).Should().BeFalse(); _controller.ShouldShowMenuStage(selectionInfo).Should().BeFalse(); _controller.ShouldShowMenuUnstage(selectionInfo).Should().BeFalse(); _controller.ShouldShowSubmoduleMenus(selectionInfo).Should().BeFalse(); _controller.ShouldShowMenuEditWorkingDirectoryFile(selectionInfo).Should().BeFalse(); _controller.ShouldShowMenuOpenRevision(selectionInfo).Should().BeFalse(); _controller.ShouldShowMenuDeleteFile(selectionInfo).Should().BeFalse(); _controller.ShouldShowMenuCopyFileName(selectionInfo).Should().BeFalse(); _controller.ShouldShowMenuShowInFileTree(selectionInfo).Should().BeFalse(); _controller.ShouldShowMenuFileHistory(selectionInfo).Should().BeFalse(); _controller.ShouldShowMenuBlame(selectionInfo).Should().BeFalse(); }
public void BrowseDiff_MainMenus_Default() { var rev = new GitRevision(ObjectId.Random()); var selectionInfo = new ContextMenuSelectionInfo(selectedRevision: rev); _controller.ShouldShowMenuSaveAs(selectionInfo).Should().BeTrue(); _controller.ShouldShowMenuCherryPick(selectionInfo).Should().BeTrue(); _controller.ShouldShowMenuStage(selectionInfo).Should().BeFalse(); _controller.ShouldShowMenuUnstage(selectionInfo).Should().BeFalse(); _controller.ShouldShowSubmoduleMenus(selectionInfo).Should().BeFalse(); _controller.ShouldShowMenuEditWorkingDirectoryFile(selectionInfo).Should().BeTrue(); _controller.ShouldShowMenuOpenRevision(selectionInfo).Should().BeTrue(); _controller.ShouldShowMenuDeleteFile(selectionInfo).Should().BeFalse(); _controller.ShouldShowMenuCopyFileName(selectionInfo).Should().BeTrue(); _controller.ShouldShowMenuShowInFileTree(selectionInfo).Should().BeTrue(); _controller.ShouldShowMenuFileHistory(selectionInfo).Should().BeTrue(); _controller.ShouldShowMenuBlame(selectionInfo).Should().BeTrue(); }