public void Merging_Is_Additive() { // Repeat the standard test in reverse. You can't turn off a filter that's already true var architectFilters = new OutputFilters(logger, RoleFilter.Architectural); var mechanicalFilters = new OutputFilters(logger, RoleFilter.Mechanical); // Act mechanicalFilters.Merge(architectFilters); // Assert mechanicalFilters.IfcProductFilter.Items[productKey].Should().BeTrue(); mechanicalFilters.IfcTypeObjectFilter.PreDefinedType.Should().ContainKey(predefinedTypeKey); }
public void Can_Merge_Filters() { var architectFilters = new OutputFilters(logger, RoleFilter.Architectural); var mechanicalFilters = new OutputFilters(logger, RoleFilter.Mechanical); // Sanity Checks architectFilters.IfcProductFilter.Items[productKey].Should().BeFalse(); mechanicalFilters.IfcProductFilter.Items[productKey].Should().BeTrue(); architectFilters.IfcTypeObjectFilter.PreDefinedType.Should().NotContainKey(predefinedTypeKey); mechanicalFilters.IfcTypeObjectFilter.PreDefinedType.Should().ContainKey(predefinedTypeKey); // Act architectFilters.Merge(mechanicalFilters); // Assert architectFilters.IfcProductFilter.Items[productKey].Should().BeTrue(); architectFilters.IfcTypeObjectFilter.PreDefinedType.Should().ContainKey(predefinedTypeKey); }