use of cn.edu.zju.acm.onlinejudge.bean.Submission in project zoj by licheng.
the class SubmissionPersistenceImplTest method testGetSubmission2.
/**
* Tests getSubmission method
* @throws Exception to JUnit
*/
public void testGetSubmission2() throws Exception {
Submission submission = persistence.getSubmission(submission2.getId());
checkSubmission(submission2, submission);
}
use of cn.edu.zju.acm.onlinejudge.bean.Submission in project zoj by licheng.
the class SubmissionPersistenceImplTest method testUpdateSubmission3.
/**
* Tests updateSubmission method
* @throws Exception to JUnit
*/
public void testUpdateSubmission3() throws Exception {
long id = submission3.getId();
submission3.setUserProfileId(userProfile2.getId());
submission3.setProblemId(problem2.getId());
submission3.setLanguage(language2);
submission3.setJudgeReply(judgeReply3);
submission3.setContent("new contest" + id);
submission3.setTimeConsumption((int) id * 100);
submission3.setMemoryConsumption((int) id * 1000);
submission3.setSubmitDate(new Date(id * 100000));
submission3.setJudgeDate(new Date(id * 200000));
submission3.setJudgeComment("new comment" + id);
persistence.updateSubmission(submission3, 11);
Submission submission = persistence.getSubmission(submission3.getId());
checkSubmission(submission3, submission);
}
use of cn.edu.zju.acm.onlinejudge.bean.Submission in project zoj by licheng.
the class SubmissionPersistenceImplTest method testGetSubmission4.
/**
* Tests getSubmission method
* @throws Exception to JUnit
*/
public void testGetSubmission4() throws Exception {
Submission submission = (Submission) persistence.getSubmission(1234567890l);
assertNull("no such submission", submission);
}
use of cn.edu.zju.acm.onlinejudge.bean.Submission in project zoj by licheng.
the class SubmissionPersistenceImplTest method testUpdateSubmission1.
/**
* Tests updateSubmission method
* @throws Exception to JUnit
*/
public void testUpdateSubmission1() throws Exception {
long id = submission1.getId();
submission1.setUserProfileId(userProfile2.getId());
submission1.setProblemId(problem2.getId());
submission1.setLanguage(language2);
submission1.setJudgeReply(judgeReply3);
submission1.setContent("new contest" + id);
submission1.setTimeConsumption((int) id * 100);
submission1.setMemoryConsumption((int) id * 1000);
submission1.setSubmitDate(new Date(id * 100000));
submission1.setJudgeDate(new Date(id * 200000));
submission1.setJudgeComment("new comment" + id);
persistence.updateSubmission(submission1, 11);
Submission submission = persistence.getSubmission(submission1.getId());
checkSubmission(submission1, submission);
}
use of cn.edu.zju.acm.onlinejudge.bean.Submission in project zoj by licheng.
the class SubmissionPersistenceImplTest method testUpdateSubmission2.
/**
* Tests updateSubmission method
* @throws Exception to JUnit
*/
public void testUpdateSubmission2() throws Exception {
long id = submission2.getId();
submission2.setUserProfileId(userProfile2.getId());
submission2.setProblemId(problem2.getId());
submission2.setLanguage(language2);
submission2.setJudgeReply(judgeReply3);
submission2.setContent("new contest" + id);
submission2.setTimeConsumption((int) id * 100);
submission2.setMemoryConsumption((int) id * 1000);
submission2.setSubmitDate(null);
submission2.setJudgeDate(null);
submission2.setJudgeComment("new comment" + id);
persistence.updateSubmission(submission2, 11);
Submission submission = persistence.getSubmission(submission2.getId());
checkSubmission(submission2, submission);
}
Aggregations