You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mm...@apache.org on 2006/01/30 14:10:02 UTC

svn commit: r373508 - /myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/

Author: mmarinschek
Date: Mon Jan 30 05:09:56 2006
New Revision: 373508

URL: http://svn.apache.org/viewcvs?rev=373508&view=rev
Log:
reformated stateUtil tests

Modified:
    myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/MessageUtilsTest.java
    myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsAES_CBCTestCase.java
    myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsAbstractCase.java
    myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsBlowfish_ECBTestCase.java
    myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsDefaultTestCase.java
    myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsTripleDES_ECBTestCase.java

Modified: myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/MessageUtilsTest.java
URL: http://svn.apache.org/viewcvs/myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/MessageUtilsTest.java?rev=373508&r1=373507&r2=373508&view=diff
==============================================================================
--- myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/MessageUtilsTest.java (original)
+++ myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/MessageUtilsTest.java Mon Jan 30 05:09:56 2006
@@ -42,8 +42,6 @@
 
     private FacesContext context;
 
-    private MockResponseWriter writer;
-
     private static final String DEFAULT_BUNDLE = "javax.faces.Messages";
 
     /**
@@ -52,12 +50,12 @@
     public void testGetMessageSeverityStringObject()
     {
         FacesMessage msg = MessageUtils.getMessage(FacesMessage.SEVERITY_ERROR,
-            "javax.faces.component.UIInput.CONVERSION", null);
+                "javax.faces.component.UIInput.CONVERSION", null);
         assertEquals("Conversion Error", msg.getSummary());
 
         msg = MessageUtils.getMessage(FacesMessage.SEVERITY_ERROR,
-                                      "javax.faces.component.UIInput.CONVERSION",
-                                      "blubb");
+                "javax.faces.component.UIInput.CONVERSION",
+                "blubb");
         assertEquals("Konvertierungsfehler", msg.getSummary());
     }
 
@@ -67,11 +65,11 @@
     public void testGetMessageSeverityStringObjectArray()
     {
         FacesMessage msg = MessageUtils.getMessage(FacesMessage.SEVERITY_ERROR,
-            "javax.faces.component.UIInput.CONVERSION", null);
+                "javax.faces.component.UIInput.CONVERSION", null);
         assertEquals("Conversion Error", msg.getSummary());
 
         msg = MessageUtils.getMessage(FacesMessage.SEVERITY_ERROR,
-                                      "javax.faces.component.UIInput.CONVERSION", null);
+                "javax.faces.component.UIInput.CONVERSION", null);
         assertEquals("Konvertierungsfehler", msg.getSummary());
     }
 
@@ -81,12 +79,12 @@
     public void testGetMessageSeverityStringObjectArrayFacesContext()
     {
         FacesMessage msg = MessageUtils.getMessage(FacesMessage.SEVERITY_ERROR,
-            "javax.faces.component.UIInput.CONVERSION", null, getFacesContext());
+                "javax.faces.component.UIInput.CONVERSION", null, getFacesContext());
         assertEquals("Conversion Error", msg.getSummary());
 
         msg = MessageUtils.getMessage(FacesMessage.SEVERITY_ERROR,
-                                      "javax.faces.component.UIInput.CONVERSION", null,
-                                      getFacesContext());
+                "javax.faces.component.UIInput.CONVERSION", null,
+                getFacesContext());
         assertEquals("Konvertierungsfehler", msg.getSummary());
     }
 
@@ -96,11 +94,11 @@
     public void testGetMessageLocaleStringObjectArray()
     {
         FacesMessage msg = MessageUtils.getMessage(Locale.ENGLISH,
-            "javax.faces.component.UIInput.CONVERSION", null);
+                "javax.faces.component.UIInput.CONVERSION", null);
         assertEquals("Conversion Error", msg.getSummary());
 
         msg = MessageUtils.getMessage(Locale.GERMAN,
-                                      "javax.faces.component.UIInput.CONVERSION", null);
+                "javax.faces.component.UIInput.CONVERSION", null);
         assertEquals("Konvertierungsfehler", msg.getSummary());
 
     }
@@ -111,11 +109,11 @@
     public void testGetMessageFacesContextString()
     {
         FacesMessage msg = MessageUtils.getMessage(this.getFacesContext(),
-            "javax.faces.component.UIInput.CONVERSION");
+                "javax.faces.component.UIInput.CONVERSION");
         assertEquals("Conversion Error", msg.getSummary());
 
         msg = MessageUtils.getMessage(this.getFacesContext(),
-                                      "javax.faces.component.UIInput.CONVERSION");
+                "javax.faces.component.UIInput.CONVERSION");
         assertEquals("Konvertierungsfehler", msg.getSummary());
     }
 
@@ -125,11 +123,11 @@
     public void testGetMessageFacesContextStringObjectArray()
     {
         FacesMessage msg = MessageUtils.getMessage(this.getFacesContext(),
-            "javax.faces.component.UIInput.CONVERSION", null);
+                "javax.faces.component.UIInput.CONVERSION", null);
         assertEquals("Conversion Error", msg.getSummary());
 
         msg = MessageUtils.getMessage(this.getFacesContext(),
-                                      "javax.faces.component.UIInput.CONVERSION", null);
+                "javax.faces.component.UIInput.CONVERSION", null);
         assertEquals("Konvertierungsfehler", msg.getSummary());
     }
 
@@ -139,9 +137,9 @@
     public void testGetMessageWithBundle()
     {
         ResourceBundle bundle = ResourceBundle.getBundle(DEFAULT_BUNDLE,
-            Locale.ENGLISH);
+                Locale.ENGLISH);
         FacesMessage msg = MessageUtils.getMessage(bundle,
-            "javax.faces.component.UIInput.CONVERSION", null);
+                "javax.faces.component.UIInput.CONVERSION", null);
 
         assertEquals("Conversion Error", msg.getSummary());
     }
@@ -152,7 +150,7 @@
     public void testGetMessageWithBundleName()
     {
         FacesMessage msg = MessageUtils.getMessage(DEFAULT_BUNDLE,
-            "javax.faces.component.UIInput.CONVERSION", null);
+                "javax.faces.component.UIInput.CONVERSION", null);
 
         assertEquals("Conversion Error", msg.getSummary());
     }
@@ -163,7 +161,7 @@
     public void testGetMessageWithBundleNameLocale()
     {
         FacesMessage msg = MessageUtils.getMessage(DEFAULT_BUNDLE,
-            Locale.GERMAN, "javax.faces.component.UIInput.CONVERSION", null);
+                Locale.GERMAN, "javax.faces.component.UIInput.CONVERSION", null);
 
         assertEquals("Konvertierungsfehler", msg.getSummary());
     }
@@ -174,17 +172,18 @@
     protected FacesContext getFacesContext()
     {
         Assert.assertNotNull(
-            "Please extend setUp() to create a valid FacesContext "
-            + "instead of overwrite it!", this.context);
+                "Please extend setUp() to create a valid FacesContext "
+                        + "instead of overwrite it!", this.context);
         return this.context;
     }
 
     protected void setUp() throws Exception
     {
-        this.writer = new MockResponseWriter();
-        this.context = createMockFacesContext(this.writer);
+        MockResponseWriter writer = new MockResponseWriter();
+        this.context = createMockFacesContext(writer);
         FacesContextHelper.setCurrentInstance(context);
     }
+
     protected void tearDown() throws Exception
     {
         FacesContextHelper.setCurrentInstance(null);
@@ -202,14 +201,14 @@
     {
 
         FactoryFinder.setFactory(FactoryFinder.RENDER_KIT_FACTORY,
-                                 "org.apache.myfaces.renderkit.RenderKitFactoryImpl");
+                "org.apache.myfaces.renderkit.RenderKitFactoryImpl");
 
         MockControl ctxControl = MockClassControl
-                                 .createControl(FacesContext.class);
+                .createControl(FacesContext.class);
         FacesContext mockFacesCtx = (FacesContext) ctxControl.getMock();
 
         MockControl extCtxControl = MockClassControl
-                                    .createControl(ExternalContext.class);
+                .createControl(ExternalContext.class);
         ExternalContext mockExtCtx = (ExternalContext) extCtxControl.getMock();
 
         mockFacesCtx.getExternalContext();
@@ -231,7 +230,7 @@
         ctxControl.setDefaultReturnValue(rWriter);
 
         MockControl viewRootControl = MockClassControl
-                                      .createControl(UIViewRoot.class);
+                .createControl(UIViewRoot.class);
         UIViewRoot uiViewRoot = (UIViewRoot) viewRootControl.getMock();
 
         uiViewRoot.getLocale();

Modified: myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsAES_CBCTestCase.java
URL: http://svn.apache.org/viewcvs/myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsAES_CBCTestCase.java?rev=373508&r1=373507&r2=373508&view=diff
==============================================================================
--- myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsAES_CBCTestCase.java (original)
+++ myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsAES_CBCTestCase.java Mon Jan 30 05:09:56 2006
@@ -18,24 +18,26 @@
 /**
  * <p>This TestCase uses the Advanced Encryption Standard with
  * Cipher Block Chaining mode and PKCS5 padding.</p>
- * 
- * <p>
- * If you are getting a SecurityException complaining about keysize, 
- * you most likely need to get the unlimited strength jurisdiction 
+ * <p/>
+ * <p/>
+ * If you are getting a SecurityException complaining about keysize,
+ * you most likely need to get the unlimited strength jurisdiction
  * policy files from a place like http://java.sun.com/j2se/1.4.2/download.html .
  * </p>
- * 
+ *
  * @author Dennis C. Byrne
  */
 
-public class StateUtilsAES_CBCTestCase extends StateUtilsAbstractCase {
+public class StateUtilsAES_CBCTestCase extends StateUtilsAbstractCase
+{
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+        StateUtils.setSecret(BASE64_KEY_SIZE_24);
+        StateUtils.setAlgorithm("AES");
+        StateUtils.setAlgorithmParams("CBC/PKCS5Padding");
+        StateUtils.setIv(BASE64_KEY_SIZE_16);
+    }
 
-	protected void setUp() throws Exception {
-		super.setUp();
-		StateUtils.setSecret(BASE64_KEY_SIZE_24);
-		StateUtils.setAlgorithm("AES");
-		StateUtils.setAlgorithmParams("CBC/PKCS5Padding");
-		StateUtils.setIv(BASE64_KEY_SIZE_16);
-	}
-	
 }

Modified: myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsAbstractCase.java
URL: http://svn.apache.org/viewcvs/myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsAbstractCase.java?rev=373508&r1=373507&r2=373508&view=diff
==============================================================================
--- myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsAbstractCase.java (original)
+++ myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsAbstractCase.java Mon Jan 30 05:09:56 2006
@@ -15,7 +15,7 @@
  */
 package org.apache.myfaces.util;
 
-/** 
+/**
  * This TestCase is not meant to be run, it's children are.  It is 
  * nevertheless concrete because it creates instances of itself
  * for testing.  Running this TestCase directly will blow up.
@@ -29,163 +29,191 @@
 import java.io.Serializable;
 import java.util.Arrays;
 
-public abstract class StateUtilsAbstractCase extends TestCase implements Serializable{
-	//private static final Log log = LogFactory.getLog(StateUtilsAbstractCase.class);
-	protected String sensitiveString;
-	private static final String TEST_DATA = "This is the test data.";
+public abstract class StateUtilsAbstractCase extends TestCase implements Serializable
+{
+    //private static final Log log = LogFactory.getLog(StateUtilsAbstractCase.class);
+    protected String sensitiveString;
+    private static final String TEST_DATA = "This is the test data.";
     // 76543210
     public static final String BASE64_KEY_SIZE_8 = "NzY1NDMyMTA=";
-	// 7654321076543210
-	public static final String BASE64_KEY_SIZE_16 = "NzY1NDMyMTA3NjU0MzIxMA==";
-	// 012345678901234567890123
-	public static final String BASE64_KEY_SIZE_24 = "MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIz";
-
-
-
-	protected void setUp() throws Exception {
-    FacesContextHelper.setCurrentInstance(null);
-    sensitiveString = "this is my secret";
-	}
-
-	protected void tearDown() throws Exception {
-		sensitiveString = null;
-	}
-
-	/**
-	 * Test for Restore View phase.
-	 */
-
-	public void testConstructionString(){
-		String constructed = StateUtils.construct(sensitiveString); 
-		Object object = StateUtils.reconstruct(constructed);
-		assertTrue(object instanceof String);
-		String string = (String)object;
-		assertEquals(string,sensitiveString);
-	}
-
-	/**
-	 * Test for Restore View phase.  This method actually runs an instance of
-	 * StateUtilsTestCase through the construct/reconstruct process. 
-	 */	
-	
-	public void testConstruction(){
-	  String constructed = StateUtils.construct(TEST_DATA);
-		Object object = StateUtils.reconstruct(constructed);
-		assertTrue(TEST_DATA.equals(object));
-	}
-	
-	public void testSerialization(){
-		byte[] bytes = StateUtils.getAsByteArray(TEST_DATA);
-		Object object = StateUtils.getAsObject(bytes);
-		assertTrue(TEST_DATA.equals(object));
-	}
-	
-	public void testCryptography(){
-		byte[] sensitiveBytes = sensitiveString.getBytes();
-		byte[] secure = StateUtils.encrypt(sensitiveBytes);
-		byte[] insecure = StateUtils.decrypt(secure);
-		secure = StateUtils.encrypt(insecure); // * 2
-		insecure = StateUtils.decrypt(secure);
-		assertTrue(Arrays.equals(insecure, sensitiveBytes));
-	}
-	
-	public void testCompression(){
-		int size = 2049;
-		byte[] orginalBytes = new byte[size];
-		byte[] lessBytes = StateUtils.compress(orginalBytes);
-		assertTrue(lessBytes.length < orginalBytes.length);
-		byte[] moreBytes = StateUtils.decompress(lessBytes);
-		assertTrue(moreBytes.length > lessBytes.length);
-		assertTrue(Arrays.equals(moreBytes, orginalBytes));
-	}
-
-	public void testEncoding(){
-		byte[] orginalBytes = sensitiveString.getBytes();
-		byte[] encoded = StateUtils.encode(orginalBytes);
-		byte[] decoded = StateUtils.decode(encoded);
-		assertTrue(Arrays.equals(decoded, orginalBytes));
-	}
-	
-	/**
-	 * Simulates testConstruction w/ corrupt data.
-	 */
-	
-	public void testConstructionNegative(){
-		String constructed = StateUtils.construct(TEST_DATA);
-		constructed = constructed.substring(1, constructed.length());
-		try{
-			Object object = StateUtils.reconstruct(constructed);
-			assertFalse(TEST_DATA.equals(object));
-		} catch (Exception e) {
-      // do nothing
-    }
-	}
-	
-	/**
-	 * Simulates testSerialization w/ corrput data.
-	 */
-	
-	public void testSerializationNegative(){
-		byte[] bytes = StateUtils.getAsByteArray(TEST_DATA);
-		bytes[1] = (byte)3;
-		try{
-			Object object = StateUtils.getAsObject(bytes);
-			assertFalse(TEST_DATA.equals(object));
-		} catch (Exception e) {
-      // do nothing
-    }
-
-  }
-	
-	/**
-	 * Simulates testCryptography w/ corrupt data.
-	 */
-	
-	public void testCryptographyNegative(){
-		byte[] sensitiveBytes = sensitiveString.getBytes();
-		byte[] secure = StateUtils.encrypt(sensitiveBytes);
-		secure[3] = (byte)1;
-		try{
-			byte[] insecure = StateUtils.decrypt(secure);
-			assertFalse(Arrays.equals(insecure, sensitiveBytes));
-		} catch (Exception e) {
-      // do nothing
-    }
-	}
-
-	/**
-	 * Simulates testCompression w/ corrupt data.
-	 */
-	
-	public void testCompressionNegative(){
-		int size = 2049;
-		byte[] orginalBytes = new byte[size];
-		byte[] lessBytes = StateUtils.compress(orginalBytes);
-		lessBytes[1] = (byte)3;
-		try{
-			byte[] moreBytes = StateUtils.decompress(lessBytes);
-			assertFalse(Arrays.equals(moreBytes, orginalBytes));
-		} catch (Exception e){
-      // do nothing
-    }
-	}	
-	
-	/**
-	 * Simulates testEncoding w/ corrupt data.
-	 */
-	
-	public void testEncodingNegative(){
-		byte[] orginalBytes = sensitiveString.getBytes();
-		byte[] encoded = StateUtils.encode(orginalBytes);
-		encoded[1] = (byte)9;
-		try{
-			byte[] decoded = StateUtils.decode(encoded);
-			assertFalse(Arrays.equals(decoded, orginalBytes));
-		} catch (Exception e){
-      // do nothing
+    // 7654321076543210
+    public static final String BASE64_KEY_SIZE_16 = "NzY1NDMyMTA3NjU0MzIxMA==";
+    // 012345678901234567890123
+    public static final String BASE64_KEY_SIZE_24 = "MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIz";
+
+
+    protected void setUp() throws Exception
+    {
+        FacesContextHelper.setCurrentInstance(null);
+        sensitiveString = "this is my secret";
+    }
+
+    protected void tearDown() throws Exception
+    {
+        sensitiveString = null;
+    }
+
+    /**
+     * Test for Restore View phase.
+     */
+
+    public void testConstructionString()
+    {
+        String constructed = StateUtils.construct(sensitiveString);
+        Object object = StateUtils.reconstruct(constructed);
+        assertTrue(object instanceof String);
+        String string = (String) object;
+        assertEquals(string, sensitiveString);
+    }
+
+    /**
+     * Test for Restore View phase.  This method actually runs an instance of
+     * StateUtilsTestCase through the construct/reconstruct process.
+     */
+
+    public void testConstruction()
+    {
+        String constructed = StateUtils.construct(TEST_DATA);
+        Object object = StateUtils.reconstruct(constructed);
+        assertTrue(TEST_DATA.equals(object));
+    }
+
+    public void testSerialization()
+    {
+        byte[] bytes = StateUtils.getAsByteArray(TEST_DATA);
+        Object object = StateUtils.getAsObject(bytes);
+        assertTrue(TEST_DATA.equals(object));
+    }
+
+    public void testCryptography()
+    {
+        byte[] sensitiveBytes = sensitiveString.getBytes();
+        byte[] secure = StateUtils.encrypt(sensitiveBytes);
+        byte[] insecure = StateUtils.decrypt(secure);
+        secure = StateUtils.encrypt(insecure); // * 2
+        insecure = StateUtils.decrypt(secure);
+        assertTrue(Arrays.equals(insecure, sensitiveBytes));
+    }
+
+    public void testCompression()
+    {
+        int size = 2049;
+        byte[] orginalBytes = new byte[size];
+        byte[] lessBytes = StateUtils.compress(orginalBytes);
+        assertTrue(lessBytes.length < orginalBytes.length);
+        byte[] moreBytes = StateUtils.decompress(lessBytes);
+        assertTrue(moreBytes.length > lessBytes.length);
+        assertTrue(Arrays.equals(moreBytes, orginalBytes));
     }
-	}
-	
+
+    public void testEncoding()
+    {
+        byte[] orginalBytes = sensitiveString.getBytes();
+        byte[] encoded = StateUtils.encode(orginalBytes);
+        byte[] decoded = StateUtils.decode(encoded);
+        assertTrue(Arrays.equals(decoded, orginalBytes));
+    }
+
+    /**
+     * Simulates testConstruction w/ corrupt data.
+     */
+
+    public void testConstructionNegative()
+    {
+        String constructed = StateUtils.construct(TEST_DATA);
+        constructed = constructed.substring(1, constructed.length());
+        try
+        {
+            Object object = StateUtils.reconstruct(constructed);
+            assertFalse(TEST_DATA.equals(object));
+        }
+        catch (Exception e)
+        {
+            // do nothing
+        }
+    }
+
+    /**
+     * Simulates testSerialization w/ corrput data.
+     */
+
+    public void testSerializationNegative()
+    {
+        byte[] bytes = StateUtils.getAsByteArray(TEST_DATA);
+        bytes[1] = (byte) 3;
+        try
+        {
+            Object object = StateUtils.getAsObject(bytes);
+            assertFalse(TEST_DATA.equals(object));
+        }
+        catch (Exception e)
+        {
+            // do nothing
+        }
+
+    }
+
+    /**
+     * Simulates testCryptography w/ corrupt data.
+     */
+
+    public void testCryptographyNegative()
+    {
+        byte[] sensitiveBytes = sensitiveString.getBytes();
+        byte[] secure = StateUtils.encrypt(sensitiveBytes);
+        secure[3] = (byte) 1;
+        try
+        {
+            byte[] insecure = StateUtils.decrypt(secure);
+            assertFalse(Arrays.equals(insecure, sensitiveBytes));
+        }
+        catch (Exception e)
+        {
+            // do nothing
+        }
+    }
+
+    /**
+     * Simulates testCompression w/ corrupt data.
+     */
+
+    public void testCompressionNegative()
+    {
+        int size = 2049;
+        byte[] orginalBytes = new byte[size];
+        byte[] lessBytes = StateUtils.compress(orginalBytes);
+        lessBytes[1] = (byte) 3;
+        try
+        {
+            byte[] moreBytes = StateUtils.decompress(lessBytes);
+            assertFalse(Arrays.equals(moreBytes, orginalBytes));
+        }
+        catch (Exception e)
+        {
+            // do nothing
+        }
+    }
+
+    /**
+     * Simulates testEncoding w/ corrupt data.
+     */
+
+    public void testEncodingNegative()
+    {
+        byte[] orginalBytes = sensitiveString.getBytes();
+        byte[] encoded = StateUtils.encode(orginalBytes);
+        encoded[1] = (byte) 9;
+        try
+        {
+            byte[] decoded = StateUtils.decode(encoded);
+            assertFalse(Arrays.equals(decoded, orginalBytes));
+        }
+        catch (Exception e)
+        {
+            // do nothing
+        }
+    }
+
 
 }
 

Modified: myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsBlowfish_ECBTestCase.java
URL: http://svn.apache.org/viewcvs/myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsBlowfish_ECBTestCase.java?rev=373508&r1=373507&r2=373508&view=diff
==============================================================================
--- myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsBlowfish_ECBTestCase.java (original)
+++ myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsBlowfish_ECBTestCase.java Mon Jan 30 05:09:56 2006
@@ -18,26 +18,27 @@
 /**
  * This TestCase uses Blowfish in Electronic CodeBook mode
  * with PKCS5 padding.
- * 
- * <p>
- * If you are getting a SecurityException complaining about keysize, 
- * you most likely need to get the unlimited strength jurisdiction 
+ * <p/>
+ * <p/>
+ * If you are getting a SecurityException complaining about keysize,
+ * you most likely need to get the unlimited strength jurisdiction
  * policy files from a place like http://java.sun.com/j2se/1.4.2/download.html .
  * </p>
- * 
- * @author Dennis C. Byrne
  *
+ * @author Dennis C. Byrne
  */
 
-public class StateUtilsBlowfish_ECBTestCase extends StateUtilsAbstractCase {
+public class StateUtilsBlowfish_ECBTestCase extends StateUtilsAbstractCase
+{
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+        StateUtils.setSecret(BASE64_KEY_SIZE_16);
+        StateUtils.setAlgorithm("Blowfish");
+        StateUtils.setAlgorithmParams("ECB/PKCS5Padding");
+        StateUtils.setIv((byte []) null);
+    }
 
-	protected void setUp() throws Exception {
-		super.setUp();
-    StateUtils.setSecret(BASE64_KEY_SIZE_16);
-		StateUtils.setAlgorithm("Blowfish");
-		StateUtils.setAlgorithmParams( "ECB/PKCS5Padding");
-		StateUtils.setIv((byte [])null);
-  }
 
-	
 }

Modified: myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsDefaultTestCase.java
URL: http://svn.apache.org/viewcvs/myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsDefaultTestCase.java?rev=373508&r1=373507&r2=373508&view=diff
==============================================================================
--- myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsDefaultTestCase.java (original)
+++ myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsDefaultTestCase.java Mon Jan 30 05:09:56 2006
@@ -16,19 +16,21 @@
 package org.apache.myfaces.util;
 
 /**
- * This TestCase uses the the default algorithm/mode/padding of 
+ * This TestCase uses the the default algorithm/mode/padding of
  * StateUtils.
- * 
+ *
  * @author Dennis C. Byrne
  */
 
-public class StateUtilsDefaultTestCase extends StateUtilsAbstractCase {
-	
-	protected void setUp() throws Exception {
-		super.setUp();
-    StateUtils.setSecret(BASE64_KEY_SIZE_8);
-		StateUtils.setAlgorithm("DES");
-		StateUtils.setAlgorithmParams( "ECB/PKCS5Padding");
-		StateUtils.setIv((byte [])null);
-  }
+public class StateUtilsDefaultTestCase extends StateUtilsAbstractCase
+{
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+        StateUtils.setSecret(BASE64_KEY_SIZE_8);
+        StateUtils.setAlgorithm("DES");
+        StateUtils.setAlgorithmParams("ECB/PKCS5Padding");
+        StateUtils.setIv((byte []) null);
+    }
 }

Modified: myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsTripleDES_ECBTestCase.java
URL: http://svn.apache.org/viewcvs/myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsTripleDES_ECBTestCase.java?rev=373508&r1=373507&r2=373508&view=diff
==============================================================================
--- myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsTripleDES_ECBTestCase.java (original)
+++ myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/StateUtilsTripleDES_ECBTestCase.java Mon Jan 30 05:09:56 2006
@@ -18,24 +18,26 @@
 /**
  * This TestCase uses the 3DES algorithm in Electronic CodeBook mode
  * with PKCS5 padding.
- * 
- * <p>
- * If you are getting a SecurityException complaining about keysize, 
- * you most likely need to get the unlimited strength jurisdiction 
+ * <p/>
+ * <p/>
+ * If you are getting a SecurityException complaining about keysize,
+ * you most likely need to get the unlimited strength jurisdiction
  * policy files from a place like http://java.sun.com/j2se/1.4.2/download.html .
  * </p>
- * 
+ *
  * @author Dennis C. Byrne
  */
 
-public class StateUtilsTripleDES_ECBTestCase extends StateUtilsAbstractCase {
+public class StateUtilsTripleDES_ECBTestCase extends StateUtilsAbstractCase
+{
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+        StateUtils.setSecret(BASE64_KEY_SIZE_24);
+        StateUtils.setAlgorithm("DESede");
+        StateUtils.setAlgorithmParams("ECB/PKCS5Padding");
+        StateUtils.setIv((byte []) null);
+    }
 
-	protected void setUp() throws Exception {
-		super.setUp();
-		StateUtils.setSecret(BASE64_KEY_SIZE_24);
-		StateUtils.setAlgorithm("DESede");
-		StateUtils.setAlgorithmParams( "ECB/PKCS5Padding");
-		StateUtils.setIv((byte [])null);
-  }
-	
 }