jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1483791 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeEditorTest.java
Date Fri, 17 May 2013 13:24:33 GMT
Author: jukka
Date: Fri May 17 13:24:33 2013
New Revision: 1483791

URL: http://svn.apache.org/r1483791
Log:
OAK-822: TypeEditor: Missing validation for mandatory items

minor cleanup

Modified:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeEditorTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeEditorTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeEditorTest.java?rev=1483791&r1=1483790&r2=1483791&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeEditorTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeEditorTest.java
Fri May 17 13:24:33 2013
@@ -17,20 +17,16 @@
 package org.apache.jackrabbit.oak.plugins.nodetype;
 
 import static org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.EMPTY_NODE;
-import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.createControl;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.replay;
 
-import java.util.Collections;
-
 import org.apache.jackrabbit.oak.api.CommitFailedException;
-import org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState;
 import org.apache.jackrabbit.oak.plugins.memory.PropertyStates;
 import org.apache.jackrabbit.oak.plugins.nodetype.write.InitialContent;
 import org.apache.jackrabbit.oak.spi.commit.EditorHook;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
-import org.easymock.EasyMock;
 import org.junit.Test;
 
 /**
@@ -63,7 +59,7 @@ public class TypeEditorTest {
 
     @Test
     public void removeNonMandatoryProperty() throws CommitFailedException {
-        EffectiveType effective = createMock(EffectiveType.class);
+        EffectiveType effective = createControl().createMock(EffectiveType.class);
         expect(effective.isMandatoryProperty("mandatory")).andReturn(false);
 
         replay(effective);
@@ -75,7 +71,7 @@ public class TypeEditorTest {
 
     @Test(expected = CommitFailedException.class)
     public void removeMandatoryProperty() throws CommitFailedException {
-        EffectiveType effective = createMock(EffectiveType.class);
+        EffectiveType effective = createControl().createMock(EffectiveType.class);
         expect(effective.isMandatoryProperty("mandatory")).andReturn(true);
         expect(effective.constraintViolation(
                 22, "/", "Mandatory property mandatory can not be removed"))
@@ -90,7 +86,7 @@ public class TypeEditorTest {
 
     @Test
     public void removeNonMandatoryChildNode() throws CommitFailedException {
-        EffectiveType effective = createMock(EffectiveType.class);
+        EffectiveType effective = createControl().createMock(EffectiveType.class);
         expect(effective.isMandatoryChildNode("mandatory")).andReturn(false);
 
         replay(effective);
@@ -102,7 +98,7 @@ public class TypeEditorTest {
 
     @Test(expected = CommitFailedException.class)
     public void removeMandatoryChildNode() throws CommitFailedException {
-        EffectiveType effective = createMock(EffectiveType.class);
+        EffectiveType effective = createControl().createMock(EffectiveType.class);
         expect(effective.isMandatoryChildNode("mandatory")).andReturn(true);
         expect(effective.constraintViolation(
                 26, "/", "Mandatory child node mandatory can not be removed"))



Mime
View raw message