You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ps...@apache.org on 2004/02/22 20:41:11 UTC

svn commit: rev 6825 - incubator/directory/naming/trunk/core/src/test/org/apache/naming/resources

Author: psteitz
Date: Sun Feb 22 11:41:11 2004
New Revision: 6825

Modified:
   incubator/directory/naming/trunk/core/src/test/org/apache/naming/resources/FileDirContextTest.java
Log:
Made minor changes to use NameParser provided by base class.

Modified: incubator/directory/naming/trunk/core/src/test/org/apache/naming/resources/FileDirContextTest.java
==============================================================================
--- incubator/directory/naming/trunk/core/src/test/org/apache/naming/resources/FileDirContextTest.java	(original)
+++ incubator/directory/naming/trunk/core/src/test/org/apache/naming/resources/FileDirContextTest.java	Sun Feb 22 11:41:11 2004
@@ -21,7 +21,6 @@
 
 import javax.naming.Context;
 import javax.naming.Name;
-import javax.naming.NameParser;
 
 import javax.naming.directory.DirContext;
 import javax.naming.directory.Attributes;
@@ -54,6 +53,8 @@
         return suite;
     }
     
+    //-------------------- AbstractContextTest overrides ------------------------------------------
+    
     protected Context makeInitialContext() {
     	try {
     	    FileDirContext fdc = new FileDirContext();
@@ -77,7 +78,7 @@
      * that the bound objects are Resources
      */
     protected void verifyListBindings(Map expected, Map returned) {
-       super.verifyListBindings(expected, returned);
+        super.verifyListBindings(expected, returned);
         Iterator iterator = returned.values().iterator();
         while (iterator.hasNext()) {
             assertTrue(iterator.next() instanceof Resource);
@@ -85,7 +86,21 @@
     }
     
     protected boolean isGetNameInNamespaceSupported() {
-    	return true;
+        return true;
+    }
+    
+    protected boolean isWritable() {
+        return true;
+    }
+    
+    //-------------------- AbstractDirContextTest overrides ---------------------------------------
+    
+    protected boolean isSchemaSupported() {
+        return false;
+    }
+    
+    protected boolean isAttributeModificationSupported() {
+        return false;
     }
     
     /**
@@ -112,10 +127,9 @@
     
     public void testGetNameInNamespace() throws Exception {
             super.testGetNameInNamespace();
-            NameParser np = initialContext.getNameParser("");
-            Name name = np.parse(firstContext.getNameInNamespace());
-            assertTrue(name.endsWith(np.parse(firstContextName())));
-            name = np.parse(secondContext.getNameInNamespace());
-            assertTrue(name.endsWith(np.parse(secondContextName())));
+            Name name = nameParser.parse(firstContext.getNameInNamespace());
+            assertTrue(name.endsWith(nameParser.parse(firstContextName())));
+            name = nameParser.parse(secondContext.getNameInNamespace());
+            assertTrue(name.endsWith(nameParser.parse(secondContextName())));
     }
 }