package test.dao;import eh.base.dao.DoctorDAO;import eh.entity.base.Doctor;import junit.framework.TestCase;import org.springframework.context.support.ClassPathXmlApplicationContext;import org.springframework.util.StringUtils;import java.io.FileOutputStream;import java.io.InputStream;import java.io.OutputStream;import java.net.URL;import java.net.URLConnection;import java.util.ArrayList;import java.util.List;/** * Created by houxr on 2016/5/16. */public class DownloadJPGFromUrlTest extends TestCase { private static ClassPathXmlApplicationContext appContext; static { appContext = new ClassPathXmlApplicationContext("test/spring.xml"); } private static DoctorDAO dao = appContext.getBean("doctorDAO", DoctorDAO.class); /** * 根据手机号码获取 医生二维码图片 */ public void testGetTicketAndUrlByDoctorId() { String s="13957120890,13858060709,13958166572," + "13758143571,13805752614,13867469261," + "13957178822,13868101010,18758205727"; Listlist = new ArrayList (); Doctor doctor=null; String[] newstr = s.split(","); for(int i =0;i doctorList=new ArrayList (); for(int j=0;j