Skip to content
This repository has been archived by the owner on Sep 30, 2023. It is now read-only.

Commit

Permalink
test: добавил тесткейсы на UsagesBuildCommandOptionsParser
Browse files Browse the repository at this point in the history
  • Loading branch information
ArXa1L committed Mar 18, 2023
1 parent d106816 commit c014c70
Showing 1 changed file with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,32 @@ public static IEnumerable<TestCaseData> TestCases
{
get
{
//todo(dstarasov): нужны тесткейсы
yield break;
var args1 = new[] {"usages", "build"};
var expected1 = new UsagesBuildCommandOptions(false, null);
yield return new TestCaseData(args1, expected1) {TestName = "<no-args>"};

const string branch = "branch";

var args2 = new[] {"usages", "build", "-b", branch};
var expected2 = new UsagesBuildCommandOptions(false, branch);
yield return new TestCaseData(args2, expected2) {TestName = "-b <branch>"};

var args3 = new[] {"usages", "build", "-p"};
var expected3 = new UsagesBuildCommandOptions(true, null);
yield return new TestCaseData(args3, expected3) {TestName = "-p"};

var args4 = new[] {"usages", "build", "-b", branch, "-p"};
var expected4 = new UsagesBuildCommandOptions(true, branch);
yield return new TestCaseData(args4, expected4) {TestName = "-b <branch> -p"};
}
}

public static IEnumerable<TestCaseData> FaultTestCases
{
get
{
//todo(dstarasov): нужны тесткейсы
yield break;
var args1 = (object)new[] {"usages", "build", "--extra_argument1", "--extra_arguments2"};
yield return new TestCaseData(args1) {TestName = "extra_arguments"};
}
}

Expand Down

0 comments on commit c014c70

Please sign in to comment.