public void AccountSelectionSpan_SplittingChanged_Changed()
        {
            var sut = new EditBookingAccountControl(false)
            {
                AllowSplitting = false
            };

            using var monitor = sut.Monitor();

            sut.AllowSplitting = true;

            monitor.Should().RaisePropertyChangeFor(x => x.AccountSelectionSpan);
        }
        public void SplitButtonVisibility_SplittingChanged_VisibilityChanged()
        {
            var sut = new EditBookingAccountControl(false)
            {
                AllowSplitting = false
            };

            using var monitor = sut.Monitor();

            sut.AllowSplitting = true;

            monitor.Should().RaisePropertyChangeFor(x => x.SplitButtonVisibility);
        }
        public void SplitCommand_Execute_NewSplitEntry()
        {
            var sut = new EditBookingAccountControl(false)
            {
                AllowSplitting = true,
                SplitEntries   = new ObservableCollection <SplitBookingViewModel>()
            };

            using var monitor = sut.Monitor();

            sut.SplitCommand.Execute(null);

            sut.SplitEntries.Should().HaveCount(1);
            monitor.Should().RaisePropertyChangeFor(x => x.SingleRowVisibility);
            sut.SingleRowVisibility.Should().NotBe(Visibility.Visible);
            monitor.Should().RaisePropertyChangeFor(x => x.SplitRowsVisibility);
            sut.SplitRowsVisibility.Should().Be(Visibility.Visible);
        }
        public void RemoveSplitEntryCommand_ExecuteWithOneExisting_SingleViewReactivated()
        {
            var sut = new EditBookingAccountControl(false)
            {
                AllowSplitting = true,
                SplitEntries   = new ObservableCollection <SplitBookingViewModel> {
                    new SplitBookingViewModel()
                }
            };

            using var monitor = sut.Monitor();

            sut.RemoveSplitEntryCommand.Execute(sut.SplitEntries.Single());

            sut.SplitEntries.Should().HaveCount(0);
            monitor.Should().RaisePropertyChangeFor(x => x.SingleRowVisibility);
            sut.SingleRowVisibility.Should().Be(Visibility.Visible);
            monitor.Should().RaisePropertyChangeFor(x => x.SplitRowsVisibility);
            sut.SplitRowsVisibility.Should().NotBe(Visibility.Visible);
        }