pricingmgmtdaotest.java

来自「当时就海底世界没客服热线mkxmykm,xkxtml, xrtlujlnszlt」· Java 代码 · 共 67 行

JAVA
67
字号
package com.tarena.oss.test;

import java.util.Collection;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.tarena.oss.pricing.dao.PricingMgmtDAO;
import com.tarena.oss.pricing.pojo.Pricing;

public class PricingMgmtDAOTest extends TestCase {
	private PricingMgmtDAO dao;
	private ApplicationContext context;
	
	public PricingMgmtDAOTest(String arg0) {
		super(arg0);
	}

	protected void setUp() throws Exception {
		context = new ClassPathXmlApplicationContext("applicationContext.xml");
		dao = (PricingMgmtDAO) context.getBean("pricingDAO");
	}

	protected void tearDown() throws Exception {
		context = null;
		dao = null;
	}

	public void testQueryAll() {
		Collection<Pricing> ps = dao.queryAll();
		System.out.println(ps);
	}

	public void testQueryAllString() {
		String qryStr = " where p.name like '%资%' and p.baseFee between 1 and 2 ";
		Collection<Pricing> ps = dao.queryAll(qryStr);
		System.out.println(ps);
	}

	public void testInsertPricing() {
		fail("Not yet implemented");
	}

	public void testQueryPricingById() {
		fail("Not yet implemented");
	}

	public void testUpdatePricing() {
		fail("Not yet implemented");
	}

	public void testDeletePricing() {
		fail("Not yet implemented");
	}

	public static Test suite(){
		TestSuite suite = new TestSuite();
		suite.addTest(new PricingMgmtDAOTest("testQueryAll"));
		suite.addTest(new PricingMgmtDAOTest("testQueryAllString"));
		return suite;
	}
}

⌨️ 快捷键说明

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