/// <summary> /// Checks values of an issue. /// </summary> /// <param name="issueToCheck">Issue which should be checked.</param> /// <param name="expectedIssue">Description of the expected issue.</param> public static void Check( IIssue issueToCheck, IssueBuilder expectedIssue) { issueToCheck.NotNull(nameof(issueToCheck)); expectedIssue.NotNull(nameof(expectedIssue)); Check( issueToCheck, expectedIssue.Create()); }
/// <summary> /// Sets the rule and priority of the issue. /// </summary> /// <param name="issueBuilder">Issue builder on which the properties should be set.</param> /// <param name="ruleDescription">Rule metadata.</param> /// <returns>Issue Builder instance.</returns> public static IssueBuilder OfRule(this IssueBuilder issueBuilder, BaseGitRepositoryIssuesRuleDescription ruleDescription) { issueBuilder.NotNull(nameof(issueBuilder)); ruleDescription.NotNull(nameof(ruleDescription)); return (issueBuilder .OfRule( ruleDescription.RuleName, new Uri($"https://cakeissues.net/docs/issue-providers/gitrepository/rules/{ruleDescription.RuleName}")) .WithPriority(ruleDescription.Priority)); }