We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebc6f37 commit d9efdacCopy full SHA for d9efdac
tests/CommandLine.Tests/Unit/Core/InstanceBuilderTests.cs
@@ -1133,6 +1133,21 @@ public void Parse_TimeSpan()
1133
// Teardown
1134
}
1135
1136
+ [Fact]
1137
+ public void OptionClass_IsImmutable_HasNoCtor()
1138
+ {
1139
+ Action act = () => InvokeBuild<ValueWithNoSetterOptions>(new string[] { "Test" }, false, false);
1140
+
1141
+ act.Should().Throw<InvalidOperationException>();
1142
+ }
1143
1144
+ private class ValueWithNoSetterOptions
1145
1146
+ [Value(0, MetaName = "Test", Default = 0)]
1147
+ public int TestValue { get; }
1148
1149
1150
1151
public static IEnumerable<object[]> RequiredValueStringData
1152
{
1153
get
0 commit comments