public void Setup()
        {
            _originalShowFirstParent    = AppSettings.ShowFirstParent;
            AppSettings.ShowFirstParent = false;

            _gitModule          = Substitute.For <IGitModule>();
            _revisionGridFilter = Substitute.For <IRevisionGridFilter>();

            _filterToolBar = new();
            _filterToolBar.Bind(() => _gitModule, _revisionGridFilter);
            _filterToolBar.GetTestAccessor().SetUnitTestsMode();
        }
        public void ShowFirstParentChecked_should_behave_expected()
        {
            _filterToolBar.ShowFirstParentChecked.Should().Be(false);
            _filterToolBar.GetTestAccessor().tsmiShowFirstParent.Checked.Should().Be(false);

            _filterToolBar.ShowFirstParentChecked = true;
            _filterToolBar.GetTestAccessor().tsmiShowFirstParent.Checked.Should().Be(true);
        }
Example #3
0
        public void ApplyBranchFilter_should_invoke_RevisionGridFilter_with_no_branches(bool refresh)
        {
            _filterToolBar.GetTestAccessor().tscboBranchFilter.Items.Count.Should().Be(0);

            _filterToolBar.GetTestAccessor().ApplyCustomBranchFilter(refresh);

            _revisionGridFilter.Received().SetAndApplyBranchFilter(string.Empty, refresh);
            _filterToolBar.GetTestAccessor()._isApplyingFilter.Should().BeFalse();
        }