Skip to content

Commit

Permalink
add null for all envs in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jannickj committed Oct 5, 2020
1 parent de18c77 commit 992a756
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tests/CommandLine.Tests/Unit/Core/NameLookupTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public void Lookup_name_of_sequence_option_with_separator()
// Fixture setup
var expected = Maybe.Just(".");
var specs = new[] { new OptionSpecification(string.Empty, "string-seq",
false, string.Empty, Maybe.Nothing<int>(), Maybe.Nothing<int>(), '.', null, string.Empty, string.Empty, new List<string>(), typeof(IEnumerable<string>), TargetType.Sequence, string.Empty)};
false, string.Empty, Maybe.Nothing<int>(), Maybe.Nothing<int>(), '.', null, null, string.Empty, string.Empty, new List<string>(), typeof(IEnumerable<string>), TargetType.Sequence, string.Empty)};

// Exercize system
var result = NameLookup.HavingSeparator("string-seq", specs, StringComparer.Ordinal);
Expand All @@ -35,7 +35,7 @@ public void Get_name_from_option_specification()

// Fixture setup
var expected = new NameInfo(ShortName, LongName);
var spec = new OptionSpecification(ShortName, LongName, false, string.Empty, Maybe.Nothing<int>(), Maybe.Nothing<int>(), '.', null, string.Empty, string.Empty, new List<string>(), typeof(IEnumerable<string>), TargetType.Sequence, string.Empty);
var spec = new OptionSpecification(ShortName, LongName, false, string.Empty, Maybe.Nothing<int>(), Maybe.Nothing<int>(), '.', null, null, string.Empty, string.Empty, new List<string>(), typeof(IEnumerable<string>), TargetType.Sequence, string.Empty);

// Exercize system
var result = spec.FromOptionSpecification();
Expand Down
2 changes: 1 addition & 1 deletion tests/CommandLine.Tests/Unit/Core/OptionMapperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void Map_boolean_switch_creates_boolean_value()
var specProps = new[]
{
SpecificationProperty.Create(
new OptionSpecification("x", string.Empty, false, string.Empty, Maybe.Nothing<int>(), Maybe.Nothing<int>(), '\0', Maybe.Nothing<object>(), string.Empty, string.Empty, new List<string>(), typeof(bool), TargetType.Switch, string.Empty),
new OptionSpecification("x", string.Empty, false, string.Empty, Maybe.Nothing<int>(), Maybe.Nothing<int>(), '\0', Maybe.Nothing<object>(), Maybe.Nothing<string>(), string.Empty, string.Empty, new List<string>(), typeof(bool), TargetType.Switch, string.Empty),
typeof(Simple_Options).GetProperties().Single(p => p.Name.Equals("BoolValue", StringComparison.Ordinal)),
Maybe.Nothing<object>())
};
Expand Down
8 changes: 4 additions & 4 deletions tests/CommandLine.Tests/Unit/Core/TokenPartitionerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public void Partition_sequence_returns_sequence()
};
var specs = new[]
{
new OptionSpecification(string.Empty, "stringvalue", false, string.Empty, Maybe.Nothing<int>(), Maybe.Nothing<int>(), '\0', null, string.Empty, string.Empty, new List<string>(), typeof(string), TargetType.Scalar, string.Empty),
new OptionSpecification("i", string.Empty, false, string.Empty, Maybe.Just(3), Maybe.Just(4), '\0', null, string.Empty, string.Empty, new List<string>(), typeof(IEnumerable<int>), TargetType.Sequence, string.Empty)
new OptionSpecification(string.Empty, "stringvalue", false, string.Empty, Maybe.Nothing<int>(), Maybe.Nothing<int>(), '\0', null, null, string.Empty, string.Empty, new List<string>(), typeof(string), TargetType.Scalar, string.Empty),
new OptionSpecification("i", string.Empty, false, string.Empty, Maybe.Just(3), Maybe.Just(4), '\0', null, null, string.Empty, string.Empty, new List<string>(), typeof(IEnumerable<int>), TargetType.Sequence, string.Empty)
};

// Exercize system
Expand All @@ -48,8 +48,8 @@ public void Partition_sequence_returns_sequence_with_duplicates()
};
var specs = new[]
{
new OptionSpecification(string.Empty, "stringvalue", false, string.Empty, Maybe.Nothing<int>(), Maybe.Nothing<int>(), '\0', null, string.Empty, string.Empty, new List<string>(), typeof(string), TargetType.Scalar, string.Empty),
new OptionSpecification("i", string.Empty, false, string.Empty, Maybe.Just(3), Maybe.Just(4), '\0', null, string.Empty, string.Empty, new List<string>(), typeof(IEnumerable<int>), TargetType.Sequence, string.Empty)
new OptionSpecification(string.Empty, "stringvalue", false, string.Empty, Maybe.Nothing<int>(), Maybe.Nothing<int>(), '\0', null, null, string.Empty, string.Empty, new List<string>(), typeof(string), TargetType.Scalar, string.Empty),
new OptionSpecification("i", string.Empty, false, string.Empty, Maybe.Just(3), Maybe.Just(4), '\0', null, null, string.Empty, string.Empty, new List<string>(), typeof(IEnumerable<int>), TargetType.Sequence, string.Empty)
};

// Exercize system
Expand Down
4 changes: 2 additions & 2 deletions tests/CommandLine.Tests/Unit/Core/TokenizerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void Explode_scalar_with_separator_in_odd_args_input_returns_sequence()
var expectedTokens = new[] { Token.Name("i"), Token.Value("10"), Token.Name("string-seq"),
Token.Value("aaa"), Token.Value("bb"), Token.Value("cccc"), Token.Name("switch") };
var specs = new[] { new OptionSpecification(string.Empty, "string-seq",
false, string.Empty, Maybe.Nothing<int>(), Maybe.Nothing<int>(), ',', null, string.Empty, string.Empty, new List<string>(), typeof(IEnumerable<string>), TargetType.Sequence, string.Empty)};
false, string.Empty, Maybe.Nothing<int>(), Maybe.Nothing<int>(), ',', null, null, string.Empty, string.Empty, new List<string>(), typeof(IEnumerable<string>), TargetType.Sequence, string.Empty)};

// Exercize system
var result =
Expand All @@ -44,7 +44,7 @@ public void Explode_scalar_with_separator_in_even_args_input_returns_sequence()
var expectedTokens = new[] { Token.Name("x"), Token.Name("string-seq"),
Token.Value("aaa"), Token.Value("bb"), Token.Value("cccc"), Token.Name("switch") };
var specs = new[] { new OptionSpecification(string.Empty, "string-seq",
false, string.Empty, Maybe.Nothing<int>(), Maybe.Nothing<int>(), ',', null, string.Empty, string.Empty, new List<string>(), typeof(IEnumerable<string>), TargetType.Sequence, string.Empty)};
false, string.Empty, Maybe.Nothing<int>(), Maybe.Nothing<int>(), ',', null, null, string.Empty, string.Empty, new List<string>(), typeof(IEnumerable<string>), TargetType.Sequence, string.Empty)};

// Exercize system
var result =
Expand Down

0 comments on commit 992a756

Please sign in to comment.