Author: veithen
Date: Fri Dec 26 15:46:05 2008
New Revision: 729570

URL: http://svn.apache.org/viewvc?rev=729570&view=rev
Log:
WSCOMMONS-419: Moved some of the tests in axiom-tests to the right place in 
axiom-api and axiom-dom.

Added:
    
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/BoundaryPushbackInputStreamTest.java
      - copied unchanged from r729543, 
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/BoundaryPushbackInputStreamTest.java
    
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/utils/BAATest.java
      - copied, changed from r729543, 
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/BAATest.java
    
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/util/
    
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/util/Base64Test.java
      - copied, changed from r729543, 
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/Base64Test.java
    
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/jaxp/
      - copied from r729543, 
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/jaxp/
Removed:
    
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/BAATest.java
    
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/Base64Test.java
    
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/BoundaryPushbackInputStreamTest.java
    
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/jaxp/
Modified:
    
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/impl/BufferUtilsTest.java

Copied: 
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/utils/BAATest.java
 (from r729543, 
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/BAATest.java)
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/utils/BAATest.java?p2=webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/utils/BAATest.java&p1=webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/BAATest.java&r1=729543&r2=729570&rev=729570&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/BAATest.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/utils/BAATest.java
 Fri Dec 26 15:46:05 2008
@@ -16,11 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.axiom.attachments;
+package org.apache.axiom.attachments.utils;
 
 import org.apache.axiom.attachments.impl.BufferUtils;
-import org.apache.axiom.attachments.utils.BAAInputStream;
-import org.apache.axiom.attachments.utils.BAAOutputStream;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;

Copied: 
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/util/Base64Test.java
 (from r729543, 
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/Base64Test.java)
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/util/Base64Test.java?p2=webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/util/Base64Test.java&p1=webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/Base64Test.java&r1=729543&r2=729570&rev=729570&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/Base64Test.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/util/Base64Test.java
 Fri Dec 26 15:46:05 2008
@@ -17,10 +17,9 @@
  * under the License.
  */
 
-package org.apache.axiom.attachments;
+package org.apache.axiom.om.util;
 
 import junit.framework.TestCase;
-import org.apache.axiom.om.util.Base64;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;

Modified: 
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/impl/BufferUtilsTest.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/impl/BufferUtilsTest.java?rev=729570&r1=729569&r2=729570&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/impl/BufferUtilsTest.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/impl/BufferUtilsTest.java
 Fri Dec 26 15:46:05 2008
@@ -22,22 +22,19 @@
 import javax.activation.FileDataSource;
 import javax.mail.util.ByteArrayDataSource;
 
+import org.apache.axiom.om.AbstractTestCase;
+
 import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
-import java.io.FilterInputStream;
-import java.io.FilterOutputStream;
-import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
-import junit.framework.TestCase;
-
 /**
  * Simple test for the BufferUtils copying code
  */
-public class BufferUtilsTest extends TestCase {
+public class BufferUtilsTest extends AbstractTestCase {
 
     byte[] bytes;
     static final int MAX = 1024 * 1024;
@@ -82,16 +79,7 @@
     }
     
     public void testDataSourceBackedDataHandlerExceedLimit(){
-        String imgFileLocation="test-resources/mtom/img/test2.jpg";
-        try{
-            String baseDir = new 
File(System.getProperty("basedir",".")).getCanonicalPath();
-            imgFileLocation = new File(baseDir +File.separator+ 
imgFileLocation).getAbsolutePath();
-        }catch(IOException e){
-            e.printStackTrace();
-            fail();
-        }
-        
-        File imgFile = new File(imgFileLocation);
+        File imgFile = getTestResourceFile("mtom/img/test2.jpg");
         FileDataSource fds = new FileDataSource(imgFile);
         DataHandler dh = new DataHandler(fds);
         int unsupported= BufferUtils.doesDataHandlerExceedLimit(dh, 0);


Reply via email to