directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 10045 - incubator/directory/rms/trunk/je/src/test/org/apache/rms/je
Date Fri, 16 Apr 2004 06:30:31 GMT
Author: akarasulu
Date: Thu Apr 15 23:30:30 2004
New Revision: 10045

Added:
   incubator/directory/rms/trunk/je/src/test/org/apache/rms/je/JeSequenceFactoryTest.java
  (contents, props changed)
Log:
more tests

Added: incubator/directory/rms/trunk/je/src/test/org/apache/rms/je/JeSequenceFactoryTest.java
==============================================================================
--- (empty file)
+++ incubator/directory/rms/trunk/je/src/test/org/apache/rms/je/JeSequenceFactoryTest.java
Thu Apr 15 23:30:30 2004
@@ -0,0 +1,58 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   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.rms.je ;
+
+
+import junit.framework.TestCase;
+import org.apache.rms.je.JeSequenceFactory;
+
+
+/**
+ * Tests the JeSequenceFactory class.
+ * 
+ * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class JeSequenceFactoryTest extends AbstractJeTest
+{
+    JeSequenceFactory jeSequenceFactory ;
+
+
+    protected void setUp() throws Exception
+    {
+        super.setUp() ;
+        jeSequenceFactory = new JeSequenceFactory(
+                new JeSequenceDao( super.db ) ) ;
+    }
+
+    protected void tearDown() throws Exception
+    {
+        super.tearDown() ;
+    }
+
+
+    public void testCreate() throws Exception
+    {
+        Sequence seq = jeSequenceFactory.create( "testSeq0" ) ;
+        assertEquals( 0, seq.getCurrentValue() ) ;
+
+        for ( int ii = 1; ii < 100; ii++ )
+        {
+            assertEquals( ii, seq.getNextValue() ) ;
+        }
+    }
+}
\ No newline at end of file

Mime
View raw message