Skip to content
Snippets Groups Projects
Commit 4b7d9ed6 authored by Stanley Goldman's avatar Stanley Goldman
Browse files

Adding one extra test

parent 03f6d63f
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,7 @@ namespace UnitTests
stringValue = refs/heads/working-branch-2";
private const string MalformedConfig = @"[branch ""troublesome-branch""]
someValue = refs/heads/test-parse
[branch ""unsuspecting-branch""]
intValue = 1234
floatValue = 1234.5
......@@ -75,6 +76,13 @@ namespace UnitTests
gitConfig.GetString(section, "stringValue").Should().Be(expected);
}
[TestCase(MalformedConfig, @"branch ""troublesome-branch""", "refs/heads/test-parse", TestName = "Can Get Other Group Section Other String Value From Malformed")]
public void Can_Get_Other_String(string config, string section, string expected)
{
var gitConfig = LoadGitConfig(config);
gitConfig.GetString(section, "someValue").Should().Be(expected);
}
[TestCase(NormalConfig, "core", 1234, TestName = "Can TryGet Root Section Int Value")]
[TestCase(NormalConfig, @"branch ""working-branch-1""", 5678, TestName = "Can TryGet Group Section Int Value")]
[TestCase(NormalConfig, @"branch ""working-branch-2""", 3456, TestName = "Can TryGet Other Group Section Int Value")]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment