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

📄 biddaotest.java

📁 Ajax和j2ee开发的一个拍卖系统。主要用了DWR
💻 JAVA
字号:
package org.yeeku.test;

import java.util.List;

import junit.framework.TestCase;
import junit.textui.TestRunner;

import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;

import org.yeeku.dao.*;

/**
 * @author  yeeku.H.lee kongyeeku@163.com
 * @version  1.0
 * <br>Copyright (C), 2005-2008, yeeku.H.Lee
 * <br>This program is protected by copyright laws.
 * <br>Program Name:
 * <br>Date: 
 */
public class BidDaoTest extends AbstractTransactionalDataSourceSpringContextTests
{

	BidDao bidDao;

	public String[] getConfigLocations()
	{
		String[] configLocations = {"daoContext.xml","applicationContext.xml"};
		return configLocations;
	}
	
	public void onSetUpInTransaction()
	{
	    bidDao = (BidDao)applicationContext.getBean("bidDao");
	}
	public void onTearDownInTransaction()
	{
		bidDao = null;
    }

    public void testFindByUser()
	{
        List l = bidDao.findByUser(new Integer(1));
        assertEquals(l.size(),jdbcTemplate.queryForInt("select count(*) from bid where bid.user_id = 1"));
    }

    public static void main(String[] args)
	{
		TestRunner.run(BidDaoTest.class);
    }
}

⌨️ 快捷键说明

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