1 61 62 63 package org.apache.commons.fileupload; 64 65 66 import junit.framework.TestCase; 67 import java.io.*; 68 69 70 76 public class MultipartStreamTest extends TestCase 77 { 78 static private final String BOUNDARY_TEXT = "myboundary"; 79 80 public void testDefaultConstructor() throws Exception { 81 MultipartStream ms = new MultipartStream(); 82 } 84 85 public void testThreeParamConstructor() throws Exception { 86 final String strData = "foobar"; 87 InputStream input = new ByteArrayInputStream(strData.getBytes()); 88 byte[] boundary = BOUNDARY_TEXT.getBytes(); 89 int iBufSize = boundary.length; 90 MultipartStream ms = new MultipartStream( 91 input, 92 boundary, 93 iBufSize); 94 } 95 96 public void testTwoParamConstructor() throws Exception { 97 final String strData = "foobar"; 98 InputStream input = new ByteArrayInputStream(strData.getBytes()); 99 byte[] boundary = BOUNDARY_TEXT.getBytes(); 100 MultipartStream ms = new MultipartStream( 101 input, 102 boundary); 103 } 104 105 public void testToString() { 106 MultipartStream ms = new MultipartStream(); 107 assertNotNull(ms.toString()); 108 } 109 } 110 | Popular Tags |