Skip to content

Commit

Permalink
test arguments with different length
Browse files Browse the repository at this point in the history
  • Loading branch information
testfirstcoder authored and BEagle1984 committed Mar 16, 2024
1 parent 2a9b801 commit 173c388
Showing 1 changed file with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,43 @@ public void Equals_NullDictionaryVsEmptyDictionary_TrueIsReturned()
result1.Should().BeTrue();
result2.Should().BeTrue();
}

[Fact]
public void Equals_FirstArgumentHasMoreElements_FalseIsReturned()
{
var dictionaryX = new Dictionary<string, string?>
{
{ "one", "uno" },
{ "two", "due" }
};
var dictionaryY = new Dictionary<string, string?>
{
{ "one", "uno" }
};

var result =
new ConfigurationDictionaryEqualityComparer<string, string?>().Equals(dictionaryX, dictionaryY);

result.Should().BeFalse();
}

[Fact]
public void Equals_SecondArgumentHasMoreElements_FalseIsReturned()
{
var dictionaryX = new Dictionary<string, string?>
{
{ "one", "uno" }
};
var dictionaryY = new Dictionary<string, string?>
{
{ "one", "uno" },
{ "two", "due" }
};

var result =
new ConfigurationDictionaryEqualityComparer<string, string?>().Equals(dictionaryX, dictionaryY);

result.Should().BeFalse();
}
}
}

0 comments on commit 173c388

Please sign in to comment.