package test;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.zxl.aop.IOrderService;
import com.zxl.aop.OrderServiceImpl;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations="classpath:applicationContext.xml")
public class Aop1Test {
	@Autowired
//	@Qualifier("orderServiceProxy") //aop1.xml
	private IOrderService orderService;
	@Test
	public void test1(){
		orderService.updateOrder();
//		ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
//		OrderServiceImpl orderService = (OrderServiceImpl) applicationContext.getBean("orderService");
//		orderService.addOrder();
	}
}