use of cn.edu.zju.acm.onlinejudge.bean.Thread in project zoj by licheng.
the class ForumPersistenceImplTest method testUpdateThread1.
/**
* Tests updateThread method
* @throws Exception to JUnit
*/
public void testUpdateThread1() throws Exception {
thread1.setId(thread2.getId());
persistence.updateThread(thread1, 1);
Thread thread = persistence.getThread(thread1.getId());
checkThread(thread1, thread);
}
use of cn.edu.zju.acm.onlinejudge.bean.Thread in project zoj by licheng.
the class ForumPersistenceImplTest method newThread.
/**
* Creates a new thread.
* @param id the id
* @param forumId the forum id
* @param userId the user id
* @return a new thread instance
*/
private Thread newThread(long id, long forumId, long userId) {
Thread thread = new Thread();
thread.setId(id);
thread.setForumId(forumId);
thread.setUserProfileId(userId);
thread.setTitle("thread title" + id);
return thread;
}
use of cn.edu.zju.acm.onlinejudge.bean.Thread in project zoj by licheng.
the class AuthorizationPersistenceImplTest method testUpdateThread1.
/**
* Tests updateThread method
* @throws Exception to JUnit
*/
public void testUpdateThread1() throws Exception {
thread1.setId(thread2.getId());
persistence.updateThread(thread1, 1);
Thread thread = persistence.getThread(thread1.getId());
checkThread(thread1, thread);
}
use of cn.edu.zju.acm.onlinejudge.bean.Thread in project zoj by licheng.
the class AuthorizationPersistenceImplTest method testCreateThread1.
/**
* Tests createThread method
* @throws Exception to JUnit
*/
public void testCreateThread1() throws Exception {
Thread thread = newThread(-1, forum1.getId(), profile.getId());
persistence.createThread(thread, 1);
Thread newThread = persistence.getThread(thread.getId());
checkThread(thread, newThread);
}
Aggregations