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

📄 categorytest.java

📁 青年论坛设计想关代码
💻 JAVA
字号:
package com.luo.test;

import com.ql.bbs.model.TopicCategory;
import com.ql.bbs.service.TopicCategoryService;
import com.ql.bbs.service.impl.TopicCategoryServiceImpl;

import junit.framework.TestCase;

public class CategoryTest extends TestCase {
	public void testSave1() {
		TopicCategory category = new TopicCategory();
		category.setName("J2EE");
		category.setDescrption("j2ee is very popular");
		category.setGrade(0);
		category.setPid(0);
		TopicCategoryService categoryService = new TopicCategoryServiceImpl();
		categoryService.addTopicCategory(category);
	}
	
	public void testSave2() {
		TopicCategory category = new TopicCategory();
		category.setName("java");
		category.setDescrption("java is very popular");
		category.setGrade(1);
		category.setPid(1);
		TopicCategoryService categoryService = new TopicCategoryServiceImpl();
		categoryService.addTopicCategory(category);
	}
	
	public void testdel() {
		TopicCategoryService categoryService = new TopicCategoryServiceImpl();
		categoryService.delTopicCategory(2);
	}
	
	public void testUpdate() {
		TopicCategory category = new TopicCategory();
		category.setId(1);
		category.setName("java");
		category.setDescrption("java is very popular");
		TopicCategoryService categoryService = new TopicCategoryServiceImpl();
		categoryService.updateTopicCategory(category);
	}
}	

⌨️ 快捷键说明

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