Skip to content

Commit 3bd4fd5

Browse files
author
Gonzalo Diaz
committed
Coverage restored.
1 parent e46079d commit 3bd4fd5

File tree

1 file changed

+10
-0
lines changed
  • src/algorithm_exercises_csharp_test/hackerrank/interview_preparation_kit/dictionaries_and_hashmaps

1 file changed

+10
-0
lines changed

src/algorithm_exercises_csharp_test/hackerrank/interview_preparation_kit/dictionaries_and_hashmaps/RansomNote.Test.cs

+10
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,14 @@ public void testCheckMagazine()
5454
Assert.AreEqual(test.Expected, result);
5555
}
5656
}
57+
58+
[TestMethod]
59+
public void testException()
60+
{
61+
#pragma warning disable CA2201 // No provocar tipos de excepción reservados
62+
Assert.ThrowsExactly<RansomNote.InvalidValueException>(() => throw new RansomNote.InvalidValueException());
63+
64+
Assert.ThrowsExactly<RansomNote.InvalidValueException>(() => throw new RansomNote.InvalidValueException("test exception", new Exception("test exception")));
65+
#pragma warning restore CA2201 // No provocar tipos de excepción reservados
66+
}
5767
}

0 commit comments

Comments
 (0)