harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r426394 - in /incubator/harmony/enhanced/classlib/trunk/modules/security/src/test: api/java.injected/java/security/serialization/ resources/java/security/serialization/ support/common/java/org/apache/harmony/security/tests/support/
Date Fri, 28 Jul 2006 06:03:03 GMT
Author: smishura
Date: Thu Jul 27 23:03:03 2006
New Revision: 426394

URL: http://svn.apache.org/viewvc?rev=426394&view=rev
Log:
Refactoring BasicPermissionCollection serialization test - moving sub class to support

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MyBasicPermission.java
  (with props)
Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/BasicPermissionCollectionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/resources/java/security/serialization/BasicPermissionCollectionTest.0.dat
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/resources/java/security/serialization/BasicPermissionCollectionTest.1.dat
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/resources/java/security/serialization/BasicPermissionCollectionTest.2.dat

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/BasicPermissionCollectionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/BasicPermissionCollectionTest.java?rev=426394&r1=426393&r2=426394&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/BasicPermissionCollectionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java.injected/java/security/serialization/BasicPermissionCollectionTest.java
Thu Jul 27 23:03:03 2006
@@ -22,27 +22,30 @@
 package java.security.serialization;
 
 import java.security.PermissionCollection;
-import java.util.*;
 
+import org.apache.harmony.security.tests.support.MyBasicPermission;
 import org.apache.harmony.testframework.serialization.SerializationTest;
 
-
-
 /**
  * Serialization tests for <code>BasicPermissionCollection</code>
- * 
  */
 
 public class BasicPermissionCollectionTest extends SerializationTest {
 
-    protected Object[] getData() 
-    {
-        PermissionCollection c1 = new RealBasicPermission("234").newPermissionCollection();
-        PermissionCollection c2 = new RealBasicPermission("1.4.kjhgj.*").newPermissionCollection();
-     	c2.add(new RealBasicPermission("1.4.kjhgj.sdlvjb3o4i578"));
-     	c2.add(new RealBasicPermission("1.4"));
-        PermissionCollection c3 = new RealBasicPermission("*").newPermissionCollection();
-        c3.add(new RealBasicPermission("1.4.kjhgj.*"));
-        return new Object[] {c1,c2,c3};
+    protected Object[] getData() {
+
+        PermissionCollection c1 = new MyBasicPermission("234")
+                .newPermissionCollection();
+
+        PermissionCollection c2 = new MyBasicPermission("1.4.kjhgj.*")
+                .newPermissionCollection();
+        c2.add(new MyBasicPermission("1.4.kjhgj.sdlvjb3o4i578"));
+        c2.add(new MyBasicPermission("1.4"));
+
+        PermissionCollection c3 = new MyBasicPermission("*")
+                .newPermissionCollection();
+        c3.add(new MyBasicPermission("1.4.kjhgj.*"));
+
+        return new Object[] { c1, c2, c3 };
     }
 }

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

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

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

Added: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MyBasicPermission.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MyBasicPermission.java?rev=426394&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MyBasicPermission.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MyBasicPermission.java
Thu Jul 27 23:03:03 2006
@@ -0,0 +1,26 @@
+/*
+ *  Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.harmony.security.tests.support;
+
+import java.security.BasicPermission;
+
+public class MyBasicPermission extends BasicPermission {
+
+    public MyBasicPermission(String name) {
+        super(name);
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MyBasicPermission.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message