harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r504828 - in /harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security: Security2Test.java SecurityTest.java
Date Thu, 08 Feb 2007 08:57:00 GMT
Author: smishura
Date: Thu Feb  8 00:56:59 2007
New Revision: 504828

URL: http://svn.apache.org/viewvc?view=rev&rev=504828
Log:
Merge tests for Security.(g|s)etProperty()

Modified:
    harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/Security2Test.java
    harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/SecurityTest.java

Modified: harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/Security2Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/Security2Test.java?view=diff&rev=504828&r1=504827&r2=504828
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/Security2Test.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/Security2Test.java
Thu Feb  8 00:56:59 2007
@@ -33,32 +33,6 @@
 public class Security2Test extends junit.framework.TestCase {
 
 	/**
-	 * @tests java.security.Security#getProperty(java.lang.String)
-	 */
-	public void test_getPropertyLjava_lang_String() {
-		// Test for method java.lang.String
-		// java.security.Security.getProperty(java.lang.String)
-		Security.setProperty("keyTestAlternate", "testing a property set");
-		assertEquals("the property value returned for keyTestAlternate was incorrect",
-						"testing a property set", Security.getProperty("keyTestAlternate"));
-	}
-
-	/**
-	 * @tests java.security.Security#setProperty(java.lang.String,
-	 *        java.lang.String)
-	 */
-	public void test_setPropertyLjava_lang_StringLjava_lang_String() {
-		// Test for method void
-		// java.security.Security.setProperty(java.lang.String,
-		// java.lang.String)
-
-		Security.setProperty("keyTest", "permission to set property");
-		assertEquals("the property value returned for keyTest was not correct",
-						"permission to set property", Security.getProperty("keyTest"));
-
-	}
-
-	/**
 	 * @tests java.security.Security#addProvider(java.security.Provider)
 	 */
 	public void test_addProviderLjava_security_Provider() {

Modified: harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/SecurityTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/SecurityTest.java?view=diff&rev=504828&r1=504827&r2=504828
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/SecurityTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/SecurityTest.java
Thu Feb  8 00:56:59 2007
@@ -197,28 +197,38 @@
         }
     }
 
-    public final void testSetGetProperty() {
+    /**
+     * @tests java.security.Security#getProperty(String)
+     */
+    public void test_getPropertyLjava_lang_String() {
+
         try {
             Security.getProperty(null);
-            fail("Case 1. No expected NullPointerException.");
-        } catch (NullPointerException e) {        
+            fail("No expected NullPointerException.");
+        } catch (NullPointerException e) {
         }
-        
+    }
+
+    /**
+     * @tests java.security.Security#setProperty(String,String)
+     */
+    public void test_setPropertyLjava_lang_StringLjava_lang_String() {
+
         try {
             Security.setProperty(null, "");
-            fail("Case 2. No expected NullPointerException.");
-        } catch (NullPointerException e) {        
+            fail("No expected NullPointerException.");
+        } catch (NullPointerException e) {
         }
-        
+
         try {
             Security.setProperty("", null);
-            fail("Case 3. No expected NullPointerException.");
-        } catch (NullPointerException e) {        
+            fail("No expected NullPointerException.");
+        } catch (NullPointerException e) {
         }
-        
+
         Security.setProperty("", "");
-        assertEquals("Empty property test failed", "", Security.getProperty(""));
-        
+        assertEquals("Empty property", "", Security.getProperty(""));
+
         Security.setProperty("My Test Property", "My property value");
         assertEquals("My property value", Security
                 .getProperty("My Test Property"));



Mime
View raw message