jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1332671 - in /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak: kernel/CoreValueFactoryTest.java util/CoreValueUtilTest.java
Date Tue, 01 May 2012 14:22:31 GMT
Author: jukka
Date: Tue May  1 14:22:31 2012
New Revision: 1332671

URL: http://svn.apache.org/viewvc?rev=1332671&view=rev
Log:
OAK-33: Values in oak-core

Move .util.CoreValueUtilTest to .kernel.CoreValueFactoryTest to reflect recent refactorings

Added:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/CoreValueFactoryTest.java
      - copied, changed from r1332593, jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/util/CoreValueUtilTest.java
Removed:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/util/CoreValueUtilTest.java

Copied: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/CoreValueFactoryTest.java
(from r1332593, jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/util/CoreValueUtilTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/CoreValueFactoryTest.java?p2=jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/CoreValueFactoryTest.java&p1=jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/util/CoreValueUtilTest.java&r1=1332593&r2=1332671&rev=1332671&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/util/CoreValueUtilTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/CoreValueFactoryTest.java
Tue May  1 14:22:31 2012
@@ -14,19 +14,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.util;
+package org.apache.jackrabbit.oak.kernel;
 
-import org.apache.jackrabbit.mk.api.MicroKernel;
+import org.apache.jackrabbit.mk.core.MicroKernelImpl;
 import org.apache.jackrabbit.mk.json.JsopReader;
 import org.apache.jackrabbit.mk.json.JsopTokenizer;
-import org.apache.jackrabbit.mk.simple.SimpleKernelImpl;
 import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.api.CoreValueFactory;
-import org.apache.jackrabbit.oak.kernel.KernelNodeStore;
+import org.apache.jackrabbit.oak.kernel.CoreValueFactoryImpl;
+import org.apache.jackrabbit.oak.util.CoreValueUtil;
 import org.junit.Before;
 import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import javax.jcr.PropertyType;
 import java.io.ByteArrayInputStream;
@@ -44,25 +42,17 @@ import static org.junit.Assert.assertEqu
 /**
  * CoreValueUtilTest...
  */
-public class CoreValueUtilTest {
+public class CoreValueFactoryTest {
 
-    /**
-     * logger instance
-     */
-    private static final Logger log = LoggerFactory.getLogger(CoreValueUtilTest.class);
-
-    // TODO: use regular oak-repo setup
-    private MicroKernel microKernel;
-    private CoreValueFactory valueFactory;
+    private final CoreValueFactory valueFactory =
+            new CoreValueFactoryImpl(new MicroKernelImpl());
 
     private Map<CoreValue, String> singleValueMap;
+
     private Map<String, List<CoreValue>> mvValueMap;
 
     @Before
     public void setUp() throws IOException {
-        microKernel = new SimpleKernelImpl("mem:" + getClass().getName());
-        valueFactory = new KernelNodeStore(microKernel).getValueFactory();
-
         singleValueMap = new HashMap<CoreValue, String>();
         singleValueMap.put(valueFactory.createValue("abc"), "\"abc\"");
         singleValueMap.put(valueFactory.createValue("a:bc"), "\"a:bc\"");
@@ -185,4 +175,5 @@ public class CoreValueUtilTest {
             }
         }
     }
+
 }
\ No newline at end of file



Mime
View raw message