📄 testcaiyao.java
字号:
package com.waimai.tests;
import java.util.List;
import com.waimai.dao.Dao;
import com.waimai.dao.TWmCaitypeDAO;
import com.waimai.dao.TWmCaiyaoDAO;
import com.waimai.domain.TWmCaitype;
import com.waimai.domain.TWmCaiyao;
import junit.framework.TestCase;
/**
* ����:
* @author Stone yang ��������:2007-5-10
* @version pattern Study
* ����֧��: <a href="http://blog.csdn.net/yq76034150">http://blog.csdn.net/yq76034150</a>
*/
public class TestCaiYao extends BaseTest {
/**
* ����
* @author Stone yang
* @see junit.framework.TestCase#setUp()
*/
protected void setUp() throws Exception {
super.setUp();
}
/**
* ����
* @author Stone yang
* @see junit.framework.TestCase#tearDown()
*/
protected void tearDown() throws Exception {
super.tearDown();
}
public void testAdd() {
Dao caiTypeDAO = new TWmCaitypeDAO().getFromApplicationContext(super.ctx);
TWmCaiyao transientInstance = new TWmCaiyao();
transientInstance.setTWmCaitype((TWmCaitype)caiTypeDAO.findById(new Integer(1)));
transientInstance.setFname("北京烤鸭");
transientInstance.setFfanGuanId(new Integer(1));
Dao caiyaoDAO = new TWmCaiyaoDAO().getFromApplicationContext(super.ctx);
caiyaoDAO.save(transientInstance);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -