directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r490363 - /directory/sandbox/elecharny/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/schema/PrepareStringTest.java
Date Tue, 26 Dec 2006 20:08:13 GMT
Author: elecharny
Date: Tue Dec 26 12:08:12 2006
New Revision: 490363

URL: http://svn.apache.org/viewvc?view=rev&rev=490363
Log:
Cretaed the first few tests 

Added:
    directory/sandbox/elecharny/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/schema/PrepareStringTest.java

Added: directory/sandbox/elecharny/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/schema/PrepareStringTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/elecharny/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/schema/PrepareStringTest.java?view=auto&rev=490363
==============================================================================
--- directory/sandbox/elecharny/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/schema/PrepareStringTest.java
(added)
+++ directory/sandbox/elecharny/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/schema/PrepareStringTest.java
Tue Dec 26 12:08:12 2006
@@ -0,0 +1,56 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you 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.directory.shared.ldap.schema;
+
+import junit.framework.TestCase;
+
+/**
+ * 
+ * Test the PrepareString class
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class PrepareStringTest extends TestCase
+{
+    public void testInsignifiantSpacesStringNull()
+    {
+        assertEquals( "  ", PrepareString.insignifiantSpacesString( (String)null ) );
+    }
+    
+    public void testInsignifiantSpacesStringEmpty()
+    {
+        assertEquals( "  ", PrepareString.insignifiantSpacesString( "" ) );
+    }
+    
+    public void testInsignifiantSpacesStringOneSpace()
+    {
+        assertEquals( "  ", PrepareString.insignifiantSpacesString( " " ) );
+    }
+    
+    public void testInsignifiantSpacesStringTwoSpaces()
+    {
+        assertEquals( "  ", PrepareString.insignifiantSpacesString( "  " ) );
+    }
+    
+    public void testInsignifiantSpacesStringNSpaces()
+    {
+        assertEquals( "  ", PrepareString.insignifiantSpacesString( "      " ) );
+    }
+}



Mime
View raw message