Search in sources :

Example 1 with ExtendedSubmission

use of cn.edu.zju.acm.onlinejudge.bean.ExtendedSubmission in project zoj by licheng.

the class SubmissionPersistenceImplTest method newSubmission.

/**
	 * Creates a new submission.
	 * @param id the id
	 * @param forumId the forum id
	 * @param limit the limit
	 * @param languages  a list of languages
	 * @return a new Problem instance
	 */
private ExtendedSubmission newSubmission(long id, long problemId, long userId, Language language, JudgeReply reply) {
    ExtendedSubmission submission = new ExtendedSubmission();
    submission.setId(id);
    submission.setUserProfileId(userId);
    submission.setProblemId(problemId);
    submission.setLanguage(language);
    submission.setJudgeReply(reply);
    submission.setContent("contest" + id);
    submission.setTimeConsumption((int) id * 10);
    submission.setMemoryConsumption((int) id * 100);
    submission.setSubmitDate(new Date(id * 10000));
    submission.setJudgeDate(new Date(id * 20000));
    submission.setJudgeComment("comment" + id);
    return submission;
}
Also used : Date(java.util.Date) ExtendedSubmission(cn.edu.zju.acm.onlinejudge.bean.ExtendedSubmission)

Aggregations

ExtendedSubmission (cn.edu.zju.acm.onlinejudge.bean.ExtendedSubmission)1 Date (java.util.Date)1