package com.hxh.spring.test;
|
|
import com.yeshi.buwan.job.AdJob;
|
import org.json.JSONObject;
|
import org.junit.Test;
|
import org.junit.runner.RunWith;
|
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
import org.springframework.test.context.web.WebAppConfiguration;
|
|
import javax.annotation.Resource;
|
|
@RunWith(SpringJUnit4ClassRunner.class)
|
@ContextConfiguration(locations = {"classpath:spring.xml"})
|
@WebAppConfiguration
|
public class ConfigTest {
|
|
@Resource
|
private AdJob adJob;
|
|
@Test
|
public void test1() {
|
JSONObject jsonObject = new JSONObject();
|
jsonObject.put("appId", "10409568");
|
jsonObject.put("detailSystemId", "44");
|
try {
|
adJob.openHWAd(jsonObject.toString());
|
} catch (Exception e) {
|
e.printStackTrace();
|
}
|
}
|
|
}
|