public void FileArgument() { string path; IFileService fileService = TestFileServices.CreateSubstituteForFile(out path, "a\nb\nc\n@ @ @"); TestArgumentParser parser = new TestArgumentParser(); parser.TestFileService = fileService; parser.Parse(new string[] { "Command", @"/foo:@" + path }); parser.GetOption<string>("foo").Should().Be("a;b;c", "specified in file as a, b, c"); }
public void FileTarget() { string path; IFileService fileService = TestFileServices.CreateSubstituteForFile(out path, "a\nb\nc\n@ @ @"); TestArgumentParser parser = new TestArgumentParser(); parser.TestFileService = fileService; parser.Parse(new string[] { "Command", @"@" + path }); parser.Targets.Should().ContainInOrder("a", "b", "c"); }