Skip to content

Commit

Permalink
Add test coverage for excluding DataColumns in all tables
Browse files Browse the repository at this point in the history
  • Loading branch information
aldelaro5 authored and jnyrup committed Apr 22, 2023
1 parent eae4b1c commit 9421834
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Tests/FluentAssertions.Equivalency.Specs/DataColumnSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,24 @@ public void When_DataColumn_has_changes_but_is_excluded_it_should_succeed()
.ExcludingColumn(dataColumn2));
}

[Fact]
public void Can_exclude_a_column_from_all_tables()
{
// Arrange
var subjectDataSet = CreateDummyDataSet<TypedDataSetSubclass>();
var expectationDataSet = new TypedDataSetSubclass(subjectDataSet);

var subject = subjectDataSet.TypedDataTable1.DecimalColumn;
var expectation = expectationDataSet.TypedDataTable1.DecimalColumn;

expectation.Unique = true;
expectation.Caption = "Test";

// Act & Assert
subject.Should().BeEquivalentTo(expectation, options => options
.ExcludingColumnInAllTables(expectation.ColumnName));
}

[Fact]
public void When_DataColumn_has_changes_but_is_excluded_as_params_it_should_succeed()
{
Expand Down

0 comments on commit 9421834

Please sign in to comment.