Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qdraw committed Sep 11, 2024
1 parent c494551 commit 497cbc3
Showing 1 changed file with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,33 +51,27 @@ public void AreListsEqual_DifferentCountLists_ReturnsFalse()
}

[TestMethod]
[ExpectedException(typeof(ArgumentNullException))]
public void AreListsEqual_NullLists_ArgumentNullException()
{
// Arrange
List<int> list1 = null!;
List<int> list2 = null!;

// Act
var result = AreListsEqualHelper.AreListsEqual(list1, list2);

// Assert
Assert.IsTrue(result);
// Act & Assert
Assert.ThrowsException<ArgumentNullException>(() =>
AreListsEqualHelper.AreListsEqual(list1, list2));
}

[TestMethod]
[ExpectedException(typeof(ArgumentNullException))]
public void AreListsEqual_OneListNull_ArgumentNullException()
{
// Arrange
var list1 = new List<int> { 1, 2, 3 };
List<int>? list2 = null;

// Act
var result = AreListsEqualHelper.AreListsEqual(list1, list2!);

// Assert
Assert.IsFalse(result);
// Act & Assert
Assert.ThrowsException<ArgumentNullException>(() =>
AreListsEqualHelper.AreListsEqual(list1, list2!));
}

[TestMethod]
Expand Down

0 comments on commit 497cbc3

Please sign in to comment.