public void PropertyGroupDescriptionForProjectNamesIsAddedWhenGroupByProjectIsTrue()
        {
            // Arrange

            var builder     = new UserPreferencesBuilder();
            var preferences = builder.CreateUserPreferences();

            preferences.GroupByProject = true;

            var collection = new DocumentMetadata[0];
            var view       = new ListCollectionView(collection);

            var reaction = new GroupByProjectReaction();

            // Act

            reaction.UpdateCollection(view, preferences);

            // Assert

            Assert.That(view.GroupDescriptions.Count, Is.EqualTo(1));

            var          description  = (PropertyGroupDescription)view.GroupDescriptions[0];
            const string propertyName = nameof(DocumentMetadata.ProjectNames);

            Assert.That(description.PropertyName, Is.EqualTo(propertyName));
        }
        public void GroupDescriptionsAreEmptyWhenGroupByProjectIsFalse()
        {
            // Arrange

            var builder     = new UserPreferencesBuilder();
            var preferences = builder.CreateUserPreferences();

            preferences.GroupByProject = false;

            var collection = new DocumentMetadata[0];
            var view       = new ListCollectionView(collection);

            var reaction = new GroupByProjectReaction();

            // Act

            reaction.UpdateCollection(view, preferences);

            // Assert

            Assert.That(view.GroupDescriptions, Is.Empty);
        }