public static TaskScoreQuery Create(int taskId, string userId) { Fail.If(taskId <= 0); Fail.IfNullOrEmpty(userId); return(new TaskScoreQuery(taskId, userId)); }
public static TestResultsQuery Create(int testId, int solutionId) { Fail.If(testId <= 0); Fail.If(solutionId <= 0); return(new TestResultsQuery(testId, solutionId)); }
public void If_GivenFalse_NoExceptionThrown() { Action act = () => Fail.If(false); act.Should().NotThrow(); }
public void If_GivenTrue_ThrowDesignByContractException() { Action act = () => Fail.If(true); act.Should().Throw <DesignByContractException>(); }
public static ContestEndCommand Create(int contestId) { Fail.If(contestId <= 0); return(new ContestEndCommand(contestId)); }
public static ContestsUsersQuery Create(int contestId) { Fail.If(contestId <= 0); return(new ContestsUsersQuery(contestId)); }
public static ChangeScoreCommand Create(int solutionId, int score) { Fail.If(solutionId <= 0); return(new ChangeScoreCommand(solutionId, score)); }