public void GroupCertifications_Distinct1() { DistinctGroupsCertification d = new DistinctGroupsCertification("j,k", "l,m"); var commandLineParser = InitGroupCertifications(); commandLineParser.Certifications.Clear(); commandLineParser.Certifications.Add(d); string[] args = new[] { "-j", "file" }; commandLineParser.ParseCommandLine(args); args = new[] { "-k", "file" }; commandLineParser.ParseCommandLine(args); args = new[] { "-l", "file" }; commandLineParser.ParseCommandLine(args); args = new[] { "-m", "file" }; commandLineParser.ParseCommandLine(args); args = new[] { "-l", "-m" }; commandLineParser.ParseCommandLine(args); args = new[] { "-j", "-k" }; commandLineParser.ParseCommandLine(args); }
public void GroupCertifications_Distinct4() { DistinctGroupsCertification d = new DistinctGroupsCertification("j,k", "l,m"); var commandLineParser = InitGroupCertifications(); commandLineParser.Certifications.Clear(); commandLineParser.Certifications.Add(d); string[] args = new[] { "-m", "-j" }; var ex = Assert.Throws <ArgumentConflictException>(() => commandLineParser.ParseCommandLine(args)); Assert.StartsWith("None of these", ex.Message); }