Skip to content

Commit

Permalink
fixed empty InlineData params failing SetAsValue test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
martinzima committed Sep 3, 2019
1 parent 74e7ae9 commit 86be7cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Tests/Revo.Core.Tests/ValueObjects/SetAsValueTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ public void Equals_IsTrueForSameElements()
}

[Theory]
[InlineData()]
[InlineData(null)]
[InlineData("eins", "zwei")]
[InlineData("eins", "zwei", "drei", "vier")]
public void Equals_IsFalseForDifferentElements(params string[] yElements)
{
IEnumerable<string> x = new[] {"eins", "zwei", "drei"}.ToImmutableHashSet().AsValueObject();
IEnumerable<string> y = yElements.ToImmutableHashSet().AsValueObject();
IEnumerable<string> y = (yElements ?? new string[0]).ToImmutableHashSet().AsValueObject();
x.Equals(y).Should().BeFalse();
}

Expand All @@ -36,13 +36,13 @@ public void GetHashCode_IsTrueForSameElements()
}

[Theory]
[InlineData()]
[InlineData(null)]
[InlineData("eins", "zwei")]
[InlineData("eins", "zwei", "drei", "vier")]
public void GetHashCode_IsFalseForDifferentElements(params string[] yElements)
{
IEnumerable<string> x = new[] {"eins", "zwei", "drei"}.ToImmutableHashSet().AsValueObject();
IEnumerable<string> y = yElements.ToImmutableHashSet().AsValueObject();
IEnumerable<string> y = (yElements ?? new string[0]).ToImmutableHashSet().AsValueObject();
x.GetHashCode().Should().NotBe(y.GetHashCode());
}
}
Expand Down

0 comments on commit 86be7cf

Please sign in to comment.