Skip to content

Commit b8f1226

Browse files
committed
test: updated tests
1 parent 60c186d commit b8f1226

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

application/CohortManager/src/Functions/Shared/Utilities/MappingUtilities.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,14 @@ public static class MappingUtilities
1616
/// <summary>
1717
/// Parses flags that can be Y, N, 0 or 1, such as the exception flag
1818
/// </summary>
19-
public static short ParseStringFlag(string? flag)
19+
public static short ParseStringFlag(string flag)
2020
{
2121
return flag?.ToUpper() switch
2222
{
2323
"0" => 0,
2424
"1" => 1,
2525
"Y" => 1,
2626
"N" => 0,
27-
null => throw new ArgumentException("Invalid input"),
2827
_ => throw new ArgumentException("Invalid input"),
2928
};
3029
}

tests/UnitTests/SharedTests/MappingUtilitiesTests/MappingUtilitiesTests.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
using NHS.CohortManager.Shared.Utilities;
2-
31
namespace MappingUtilitiesTests;
42

3+
using NHS.CohortManager.Shared.Utilities;
4+
55
[TestClass]
66
public class MappingUtilitiesTests
77
{
@@ -49,7 +49,6 @@ public void ParseStringFlag_ValidInput_ReturnDate(string flag, short expectedRes
4949

5050
[TestMethod]
5151
[DataRow("W")]
52-
[DataRow(null)]
5352
public void ParseStringFlag_InvalidInput_ReturnArguementError(string flag)
5453
{
5554
//No Arrange or Act

0 commit comments

Comments
 (0)