Skip to content

Commit 953350b

Browse files
committed
let the validator decide if these values are valid (so we get correct exceptions and messages bubbled)
1 parent 3f4b86d commit 953350b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

FluentCommandLineParser.Tests/Internals/CommandLineOptionTests.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ public void Ensure_Can_Be_Constructed_With_Whitespace_Only_ShortName_And_Valid_L
126126
}
127127

128128
[Test]
129-
[ExpectedException(typeof(ArgumentOutOfRangeException))]
130-
public void Ensure_Cannot_Be_Constructed_With_Null_ShortName_And_Null_LongName()
129+
public void Ensure_Can_Be_Constructed_With_Null_ShortName_And_Null_LongName()
131130
{
132131
const string invalidShortName = null;
133132
const string invalidLongName = null;
@@ -138,8 +137,7 @@ public void Ensure_Cannot_Be_Constructed_With_Null_ShortName_And_Null_LongName()
138137
}
139138

140139
[Test]
141-
[ExpectedException(typeof(ArgumentOutOfRangeException))]
142-
public void Ensure_Cannot_Be_Constructed_With_Empty_ShortName_And_Null_LongName()
140+
public void Ensure_Can_Be_Constructed_With_Empty_ShortName_And_Null_LongName()
143141
{
144142
const string invalidShortName = "";
145143
const string invalidLongName = null;
@@ -150,8 +148,7 @@ public void Ensure_Cannot_Be_Constructed_With_Empty_ShortName_And_Null_LongName(
150148
}
151149

152150
[Test]
153-
[ExpectedException(typeof(ArgumentOutOfRangeException))]
154-
public void Ensure_Cannot_Be_Constructed_With_WhiteSpaceOnly_ShortName_And_Null_LongName()
151+
public void Ensure_Can_Be_Constructed_With_WhiteSpaceOnly_ShortName_And_Null_LongName()
155152
{
156153
const string invalidShortName = " ";
157154
const string invalidLongName = null;
@@ -217,8 +214,7 @@ public void Ensure_Can_Be_Constructed_With_Empty_ShortName_And_WhiteSpaceOnly_Lo
217214
}
218215

219216
[Test]
220-
[ExpectedException(typeof(ArgumentOutOfRangeException))]
221-
public void Ensure_Cannot_Be_Constructed_With_WhiteSpaceOnly_ShortName_And_WhiteSpaceOnly_LongName()
217+
public void Ensure_Canot_Be_Constructed_With_WhiteSpaceOnly_ShortName_And_WhiteSpaceOnly_LongName()
222218
{
223219
const string invalidShortName = " ";
224220
const string invalidLongName = " ";

0 commit comments

Comments
 (0)