package day08_1;
import java.awt.image.BufferedImage;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import org.junit.Test;
//运行就是Run as >> jUnit.Test
import cn.itcast.vcode.utils.VerifyCode;
public class DrawDemo2 {
@Test//junit表示测试类,鼠标点就可以
public void fun1() throws FileNotFoundException, IOException{
VerifyCode verifyCode = new VerifyCode();
BufferedImage bi = verifyCode.getImage();//随机的
System.out.println(verifyCode.getText());//打印图片上的文本内容
VerifyCode.output(bi,new FileOutputStream(“F:/b.jpg”));
}
}
//控制台随机生成英文和数字