// Path: src/com/easyhousing/dao/AgentDao.java
// public interface AgentDao {
// 	public void insertAgent(Agent u);
// 	public int deleteAgent(Agent u);
// 	public int updateAgent(Agent u);
// 	public Agent selectAgent(Agent u);
// 	public List<Agent> selectAll();
// }
// 
// Path: src/com/easyhousing/model/Agent.java
// public class Agent {
// 	
// 	private int agentId;
// 	private String picUrl;
// 	private String agentName;
// 	private String agentEmail;
// 	private String agentPhoneNumber;
// 	private String agentSex;
// 	
// 	public int getAgentId() {
// 		return agentId;
// 	}
// 	
// 	public void setAgentId(int agentId) {
// 		this.agentId = agentId;
// 	}
// 	
// 	public String getPicUrl() {
// 		return picUrl;
// 	}
// 	
// 	public void setPicUrl(String picUrl) {
// 		this.picUrl = picUrl;
// 	}
// 	
// 	public String getAgentName() {
// 		return agentName;
// 	}
// 	
// 	public void setAgentName(String agentName) {
// 		this.agentName = agentName;
// 	}
// 	
// 	public String getAgentEmail() {
// 		return agentEmail;
// 	}
// 	
// 	public void setAgentEmail(String agentEmail) {
// 		this.agentEmail = agentEmail;
// 	}
// 	
// 	public String getAgentPhoneNumber() {
// 		return agentPhoneNumber;
// 	}
// 	
// 	public void setAgentPhoneNumber(String agentPhoneNumber) {
// 		this.agentPhoneNumber = agentPhoneNumber;
// 	}
// 	
// 	public String getAgentSex() {
// 		return agentSex;
// 	}
// 	
// 	public void setAgentSex(String agentSex) {
// 		this.agentSex = agentSex;
// 	}
// 	
// }


import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.easyhousing.dao.AgentDao;
import com.easyhousing.model.Agent;
		ApplicationContext ac = new ClassPathXmlApplicationContext("bean.xml");//³õÊ¼»¯ÈÝÆ÷
		AgentDao agentDao = (AgentDao) ac.getBean("agentDao");
		Agent u = new Agent();
		u.setAgentName("sbgzy");
		u.setAgentEmail("1231231@qq.com");
		u.setAgentPhoneNumber("123124214");
		u.setAgentSex("ÄÐ");
		u.setPicUrl("1212421");
		agentDao.insertAgent(u);
		System.out.println("-------");
	}
	
	@Test
	public void Test2(){
		ApplicationContext ac = new ClassPathXmlApplicationContext("bean.xml");//³õÊ¼»¯ÈÝÆ÷
		AgentDao agentDao = (AgentDao) ac.getBean("agentDao");
		Agent u = new Agent();
		u.setAgentName("sbgzy");
		u.setAgentEmail("1231231@qq.com");
		u.setAgentPhoneNumber("123124214");
		u.setAgentSex("ÄÐ");
		u.setPicUrl("1212421");
		u.setAgentId(1);
		agentDao.deleteAgent(u);
		System.out.println("-------");
	}
	
	@Test
	public void Test3(){
		ApplicationContext ac = new ClassPathXmlApplicationContext("bean.xml");//³õÊ¼»¯ÈÝÆ÷
// Path: src/com/easyhousing/dao/AgentDao.java
// public interface AgentDao {
// 	public void insertAgent(Agent u);
// 	public int deleteAgent(Agent u);
// 	public int updateAgent(Agent u);
// 	public Agent selectAgent(Agent u);
// 	public List<Agent> selectAll();
// }
// 
// Path: src/com/easyhousing/model/Agent.java
// public class Agent {
// 	
// 	private int agentId;
// 	private String picUrl;
// 	private String agentName;
// 	private String agentEmail;
// 	private String agentPhoneNumber;
// 	private String agentSex;
// 	
// 	public int getAgentId() {
// 		return agentId;
// 	}
// 	
// 	public void setAgentId(int agentId) {
// 		this.agentId = agentId;
// 	}
// 	
// 	public String getPicUrl() {
// 		return picUrl;
// 	}
// 	
// 	public void setPicUrl(String picUrl) {
// 		this.picUrl = picUrl;
// 	}
// 	
// 	public String getAgentName() {
// 		return agentName;
// 	}
// 	
// 	public void setAgentName(String agentName) {
// 		this.agentName = agentName;
// 	}
// 	
// 	public String getAgentEmail() {
// 		return agentEmail;
// 	}
// 	
// 	public void setAgentEmail(String agentEmail) {
// 		this.agentEmail = agentEmail;
// 	}
// 	
// 	public String getAgentPhoneNumber() {
// 		return agentPhoneNumber;
// 	}
// 	
// 	public void setAgentPhoneNumber(String agentPhoneNumber) {
// 		this.agentPhoneNumber = agentPhoneNumber;
// 	}
// 	
// 	public String getAgentSex() {
// 		return agentSex;
// 	}
// 	
// 	public void setAgentSex(String agentSex) {
// 		this.agentSex = agentSex;
// 	}
// 	
// }


// Path: src/com/easyhousing/test/TestAgentDao.java
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.easyhousing.dao.AgentDao;
import com.easyhousing.model.Agent;

		ApplicationContext ac = new ClassPathXmlApplicationContext("bean.xml");//³õÊ¼»¯ÈÝÆ÷
		AgentDao agentDao = (AgentDao) ac.getBean("agentDao");
		Agent u = new Agent();
		u.setAgentName("sbgzy");
		u.setAgentEmail("1231231@qq.com");
		u.setAgentPhoneNumber("123124214");
		u.setAgentSex("ÄÐ");
		u.setPicUrl("1212421");
		agentDao.insertAgent(u);
		System.out.println("-------");
	}
	
	@Test
	public void Test2(){
		ApplicationContext ac = new ClassPathXmlApplicationContext("bean.xml");//³õÊ¼»¯ÈÝÆ÷
		AgentDao agentDao = (AgentDao) ac.getBean("agentDao");
		Agent u = new Agent();
		u.setAgentName("sbgzy");
		u.setAgentEmail("1231231@qq.com");
		u.setAgentPhoneNumber("123124214");
		u.setAgentSex("ÄÐ");
		u.setPicUrl("1212421");
		u.setAgentId(1);
		agentDao.deleteAgent(u);
		System.out.println("-------");
	}
	
	@Test
	public void Test3(){
		ApplicationContext ac = new ClassPathXmlApplicationContext("bean.xml");//³õÊ¼»¯ÈÝÆ÷
		AgentDao agentDao = (AgentDao) ac.getBean("agentDao");