use of cn.edu.zjnu.acm.judge.domain.Problem in project judge by zjnu-acm.
the class MockDataService method problem.
@Nonnull
public Problem problem(Function<Problem.Builder, Problem.Builder> function, boolean create) {
Objects.requireNonNull(function);
Problem problem = function.apply(Problem.builder().title("").description("").input("").output("").sampleInput("").sampleOutput("").hint("").source("").timeLimit(1000L).memoryLimit(65536 * 1024L).contests(new long[] { 0 })).build();
if (create) {
problemService.save(problem);
}
return problem;
}
Aggregations