[exo-jcr-commits] exo-jcr SVN: r535 - jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Nov 10 03:56:46 EST 2009
Author: sergiykarpenko
Date: 2009-11-10 03:56:46 -0500 (Tue, 10 Nov 2009)
New Revision: 535
Modified:
jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/IndexerCacheLoaderTest.java
Log:
EXOJCR-202: IndexerCacheLoaderTest updated
Modified: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/IndexerCacheLoaderTest.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/IndexerCacheLoaderTest.java 2009-11-10 08:54:53 UTC (rev 534)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/IndexerCacheLoaderTest.java 2009-11-10 08:56:46 UTC (rev 535)
@@ -90,8 +90,30 @@
indexerCacheLoader.put(modification);
assertNotNull(searchManager.getAddedNodes());
assertNotNull(searchManager.getRemovedNodes());
+ assertTrue(searchManager.getRemovedNodes().isEmpty());
}
+ public void testRemoveNode() throws Exception
+ {
+ QPath node1path = QPath.parse("[]:1[]node:1");
+ NodeData node =
+ new TransientNodeData(node1path, "n123456", 1, Constants.NT_UNSTRUCTURED, new InternalQName[0], 0,
+ Constants.ROOT_UUID, new AccessControlList());
+
+ QPath prop1path = QPath.makeChildPath(node1path, Constants.JCR_PRIMARYTYPE);
+ PropertyData prop = new TransientPropertyData(prop1path, "p123456", 0, PropertyType.NAME, "n123456", false);
+
+ List<Modification> modification = new ArrayList<Modification>();
+
+ modification.add(removeNode(node));
+ modification.add(removeProperty(prop));
+ indexerCacheLoader.put(modification);
+ assertTrue(searchManager.getAddedNodes().isEmpty());
+ assertNotNull(searchManager.getRemovedNodes());
+ assertFalse(searchManager.getRemovedNodes().isEmpty());
+
+ }
+
private class DummySearchManager implements SearchManager
{
More information about the exo-jcr-commits
mailing list