|
|
|
@ -10,9 +10,11 @@ import org.powermock.api.easymock.PowerMock;
|
|
|
|
|
import org.powermock.core.classloader.annotations.PrepareForTest; |
|
|
|
|
import org.powermock.modules.junit4.PowerMockRunner; |
|
|
|
|
|
|
|
|
|
import java.awt.Image; |
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.image.BufferedImage; |
|
|
|
|
import java.io.UnsupportedEncodingException; |
|
|
|
|
import java.lang.reflect.Method; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @author Lucian.Chen |
|
|
|
@ -56,4 +58,13 @@ public class CommonKitTest {
|
|
|
|
|
String result = Base64.encode(im, ""); |
|
|
|
|
Assert.assertEquals(result, CommonKit.encode(im, "")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void ajaxRequest() throws Exception { |
|
|
|
|
Class<?> classBook = Class.forName("com.fanruan.api.decision.CommonKit"); |
|
|
|
|
Assert.assertNotNull(classBook); |
|
|
|
|
|
|
|
|
|
Method method1 = classBook.getDeclaredMethod("ajaxRequest", HttpServletRequest.class); |
|
|
|
|
Assert.assertNotNull(method1); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|