⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 topicservicetest.java

📁 新技术论坛系统 v1.0 前后台管理的初始用户名 : admin 密码 123456
💻 JAVA
字号:
package com.ntsky.bbs.service;

import java.util.Date;

import com.ntsky.bbs.domain.Post;
import com.ntsky.bbs.domain.Topic;

public class TopicServiceTest extends NTskyServiceTestCase{

	private TopicService topicService;
	private Topic topic = new Topic();;
	
    protected void setUp() throws Exception {
    	topicService = (TopicService)super.getBean("topicService");
    }
	
	public void testCreateTopic(){
    	topic.setMood(1);
    	topic.setForumId(1);
    	topic.setTitle("ntksy's bbs published!");
    	topic.setDateCreated(new Date());

    	//topicService.createTopic(topic);
	}
	
	public void testEditTopic(){
		topicService.editTopic(topicService.getTopic(1),new Post());
	}
	
	public void testGetTopic(){
		//assertEquals(topicService.getTopic(1).getAuthor(),"ntsky");
	}
	
	public void testDeleteTopic(){
		topicService.deleteTopic(1);
	}
	
	public void setDown(){
		topic = null;
		topicService = null;
	}
	
	public static void main(String[] args) {
		junit.textui.TestRunner.run(TopicServiceTest.class);
	}		
	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -