harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r426031 - in /incubator/harmony/enhanced/classlib/trunk/modules/security/src/test: api/java.injected/java/security/serialization/PermissionsTest.java resources/java/security/serialization/PermissionsTest.1.dat
Date Thu, 27 Jul 2006 11:30:17 GMT
Author: smishura
Date: Thu Jul 27 04:30:16 2006
New Revision: 426031

URL: http://svn.apache.org/viewvc?rev=426031&view=rev
Log:
Refactoring test:
1) Remove FakePermission - it is redundant and makes the test sensitive for renaming
2) Remove UnresolvedPermission - serialized/deserialized object is not equal to initial on
RI
3)  Regenerate one golden file

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionsTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/resources/java/security/serialization/PermissionsTest.1.dat

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionsTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionsTest.java?rev=426031&r1=426030&r2=426031&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionsTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/PermissionsTest.java
Thu Jul 27 04:30:16 2006
@@ -21,10 +21,9 @@
 
 package java.security.serialization;
 
-import java.security.*;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashSet;
+import java.security.AllPermission;
+import java.security.Permissions;
+import java.security.SecurityPermission;
 
 import org.apache.harmony.testframework.serialization.SerializationTest;
 
@@ -41,32 +40,10 @@
      */
     protected Object[] getData() {
         Permissions ps = new Permissions();
-        Permission[] arr = new Permission[] {
-            new AllPermission(),
-            new SecurityPermission("abc"),
-            new FakePermission("jkabhj"),
-            new UnresolvedPermission("131234", null, null, null),
-            new UnresolvedPermission("KUJKHVKJgyuygjhb", "xcv456", "26r ytf",
-                new java.security.cert.Certificate[0]), };
-
-        for (int i = 0; i < arr.length; i++) {
-            ps.add(arr[i]);
-        }
-        return new Object[] {
-            new Permissions(), ps };
-    }
-}
 
-/**
- * Custom Permission implementation, intended for testing.
- */
-class FakePermission extends BasicPermission {
+        ps.add(new AllPermission());
+        ps.add(new SecurityPermission("abc"));
 
-    public FakePermission(String name) {
-        super(name);
+        return new Object[] { new Permissions(), ps };
     }
-
-    public PermissionCollection newPermissionCollection() {
-        return null;
-    }
-}
\ No newline at end of file
+}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/resources/java/security/serialization/PermissionsTest.1.dat
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/resources/java/security/serialization/PermissionsTest.1.dat?rev=426031&r1=426030&r2=426031&view=diff
==============================================================================
Binary files - no diff available.



Mime
View raw message