You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2015/05/04 10:43:30 UTC

svn commit: r1677552 - /webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/XMLStreamWriterFilterTestCase.java

Author: veithen
Date: Mon May  4 08:43:30 2015
New Revision: 1677552

URL: http://svn.apache.org/r1677552
Log:
Replace tabs with spaces.

Modified:
    webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/XMLStreamWriterFilterTestCase.java

Modified: webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/XMLStreamWriterFilterTestCase.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/XMLStreamWriterFilterTestCase.java?rev=1677552&r1=1677551&r2=1677552&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/XMLStreamWriterFilterTestCase.java (original)
+++ webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/XMLStreamWriterFilterTestCase.java Mon May  4 08:43:30 2015
@@ -37,74 +37,74 @@ import org.apache.axiom.soap.SOAPEnvelop
 import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
 
 public class XMLStreamWriterFilterTestCase extends AbstractTestCase {
-	
-	private char ILLEGAL_CHAR = 0x15;
-	private String ILLEGAL_ENTITY = "";
-	
-	private char NULL_CHAR = 0x00;
-	private String NULL_ENTITY = "�";
-	
-	private final OMMetaFactory omMetaFactory;
+    
+    private char ILLEGAL_CHAR = 0x15;
+    private String ILLEGAL_ENTITY = "";
+    
+    private char NULL_CHAR = 0x00;
+    private String NULL_ENTITY = "�";
+    
+    private final OMMetaFactory omMetaFactory;
     
     protected XMLStreamWriterFilterTestCase(OMMetaFactory omMetaFactory) {
         this.omMetaFactory = omMetaFactory;
     }
-	
-	public void test01() throws Exception {
-		char[] chars = new char[] {ILLEGAL_CHAR};
-		String insert = new String(chars);
-		testInsert(insert);
-	}
-	
-	public void test02() throws Exception {
-		char[] chars = new char[] {NULL_CHAR};
-		String insert = new String(chars);
-		testInsert(insert);
-	}
-	
-	public void test03() throws Exception {
-		
-		testInsert(ILLEGAL_ENTITY);
-	}
-	
-	public void test04() throws Exception {
-		
-		testInsert(NULL_ENTITY);
-	}
-	
-	
-	
-	private void testInsert(String insert) throws Exception {
-		
-		// Read XML
-		InputStream is = getTestResource(TestConstants.TEST);
-		
-		// Build SOAP OM
-		SOAPEnvelope env1 = createEnvelope(is);
-		
-		// Add illegal character
-		SOAPBody body = env1.getBody();
-		OMElement omElement = body.getFirstElement();
-		String text = omElement.getText();
-		text = text + "[" + insert + "]";
-		System.out.println("New Text = " + text);
-		omElement.setText(text);
-		
-		// Serialize
-		ByteArrayOutputStream baos = new ByteArrayOutputStream();
-		OMOutputFormat omFormat = new OMOutputFormat();
-		omFormat.setXmlStreamWriterFilter(new XMLStreamWriterRemoveIllegalChars());
-		env1.serialize(baos, omFormat);
-		
-		String xmlText = baos.toString();
-		System.out.println("Serialized Text = " + xmlText);
-		
-		ByteArrayInputStream bais = new ByteArrayInputStream(xmlText.getBytes("UTF-8"));
-		
-		SOAPEnvelope env2 = createEnvelope(bais);
-		env2.build();
-	}
-	
+    
+    public void test01() throws Exception {
+        char[] chars = new char[] {ILLEGAL_CHAR};
+        String insert = new String(chars);
+        testInsert(insert);
+    }
+    
+    public void test02() throws Exception {
+        char[] chars = new char[] {NULL_CHAR};
+        String insert = new String(chars);
+        testInsert(insert);
+    }
+    
+    public void test03() throws Exception {
+        
+        testInsert(ILLEGAL_ENTITY);
+    }
+    
+    public void test04() throws Exception {
+        
+        testInsert(NULL_ENTITY);
+    }
+    
+    
+    
+    private void testInsert(String insert) throws Exception {
+        
+        // Read XML
+        InputStream is = getTestResource(TestConstants.TEST);
+        
+        // Build SOAP OM
+        SOAPEnvelope env1 = createEnvelope(is);
+        
+        // Add illegal character
+        SOAPBody body = env1.getBody();
+        OMElement omElement = body.getFirstElement();
+        String text = omElement.getText();
+        text = text + "[" + insert + "]";
+        System.out.println("New Text = " + text);
+        omElement.setText(text);
+        
+        // Serialize
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        OMOutputFormat omFormat = new OMOutputFormat();
+        omFormat.setXmlStreamWriterFilter(new XMLStreamWriterRemoveIllegalChars());
+        env1.serialize(baos, omFormat);
+        
+        String xmlText = baos.toString();
+        System.out.println("Serialized Text = " + xmlText);
+        
+        ByteArrayInputStream bais = new ByteArrayInputStream(xmlText.getBytes("UTF-8"));
+        
+        SOAPEnvelope env2 = createEnvelope(bais);
+        env2.build();
+    }
+    
     /**
      * Create SOAPEnvelope from the test in the indicated file
      * @param input stream