From: <fg...@us...> - 2010-08-27 18:50:54
|
Revision: 2912 http://openutils.svn.sourceforge.net/openutils/?rev=2912&view=rev Author: fgiust Date: 2010-08-27 18:50:47 +0000 (Fri, 27 Aug 2010) Log Message: ----------- cleanup junit leftovers and switch everything to testng Modified Paths: -------------- trunk/openutils-mgnlcriteria/pom.xml trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/AbstractMagnoliaCriteriaImpl.java trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/MagnoliaCriteriaTest.java trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/tests/RepositoryTestNgTestcase.java trunk/openutils-mgnlcriteria/src/test/resources/crit-repository/indexing_configuration.xml Modified: trunk/openutils-mgnlcriteria/pom.xml =================================================================== --- trunk/openutils-mgnlcriteria/pom.xml 2010-08-27 15:37:53 UTC (rev 2911) +++ trunk/openutils-mgnlcriteria/pom.xml 2010-08-27 18:50:47 UTC (rev 2912) @@ -136,17 +136,17 @@ <scope>test</scope> </dependency> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.7</version> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <classifier>jdk15</classifier> <version>5.10</version> <scope>test</scope> + <exclusions> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + </exclusions> </dependency> </dependencies> <repositories> @@ -167,8 +167,5 @@ <jackrabbit.version>1.6.2</jackrabbit.version> <jcr.version>1.0</jcr.version> </properties> - <!-- test running maven with - -Djcr.version=2.0 -Djackrabbit.version=2.0.0 - -Djcr.version=2.0 -Djackrabbit.version=2.1.0 - --> + <!-- test running maven with -Djcr.version=2.0 -Djackrabbit.version=2.0.0 -Djcr.version=2.0 -Djackrabbit.version=2.1.0 --> </project> \ No newline at end of file Modified: trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/AbstractMagnoliaCriteriaImpl.java =================================================================== --- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/AbstractMagnoliaCriteriaImpl.java 2010-08-27 15:37:53 UTC (rev 2911) +++ trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/AbstractMagnoliaCriteriaImpl.java 2010-08-27 18:50:47 UTC (rev 2912) @@ -77,6 +77,11 @@ protected static HierarchyManager getPrivateHierarchyManagerFromQuery(QueryManager queryManager) { + if (queryManager == null) + { + return null; + } + java.lang.reflect.Field field; try { Modified: trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/MagnoliaCriteriaTest.java =================================================================== --- trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/MagnoliaCriteriaTest.java 2010-08-27 15:37:53 UTC (rev 2911) +++ trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/MagnoliaCriteriaTest.java 2010-08-27 18:50:47 UTC (rev 2912) @@ -19,13 +19,13 @@ package net.sourceforge.openutils.mgnlcriteria.jcr.query.xpath.impl; -import junit.framework.Assert; import net.sourceforge.openutils.mgnlcriteria.jcr.query.Criteria; import net.sourceforge.openutils.mgnlcriteria.jcr.query.JCRCriteriaFactory; import net.sourceforge.openutils.mgnlcriteria.jcr.query.criterion.Junction; import net.sourceforge.openutils.mgnlcriteria.jcr.query.criterion.Restrictions; -import org.junit.Test; +import org.testng.Assert; +import org.testng.annotations.Test; /** Modified: trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/tests/RepositoryTestNgTestcase.java =================================================================== --- trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/tests/RepositoryTestNgTestcase.java 2010-08-27 15:37:53 UTC (rev 2911) +++ trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/tests/RepositoryTestNgTestcase.java 2010-08-27 18:50:47 UTC (rev 2912) @@ -45,10 +45,10 @@ import org.apache.commons.lang.StringUtils; import org.apache.jackrabbit.core.jndi.BindableRepositoryFactory; import org.apache.log4j.Level; -import org.junit.AfterClass; -import org.junit.BeforeClass; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; /** Modified: trunk/openutils-mgnlcriteria/src/test/resources/crit-repository/indexing_configuration.xml =================================================================== --- trunk/openutils-mgnlcriteria/src/test/resources/crit-repository/indexing_configuration.xml 2010-08-27 15:37:53 UTC (rev 2911) +++ trunk/openutils-mgnlcriteria/src/test/resources/crit-repository/indexing_configuration.xml 2010-08-27 18:50:47 UTC (rev 2912) @@ -2,34 +2,22 @@ <!DOCTYPE configuration SYSTEM "http://jackrabbit.apache.org/dtd/indexing-configuration-1.2.dtd"> <configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:mgnl="http://www.magnolia.info/jcr/mgnl" xmlns:jcr="http://www.jcp.org/jcr/1.0"> + <!-- - <analyzers> - <analyzer class="org.apache.lucene.analysis.KeywordAnalyzer"> - <property>tags</property> - </analyzer> - </analyzers> <index-rule nodeType="nt:hierarchyNode"> <property boost="10" useInExcerpt="false">title</property> <property boost="1.0" useInExcerpt="true">text</property> - <property isRegexp="true" nodeScopeIndex="false" useInExcerpt="false">mgnl:.*</property> - <property isRegexp="true" nodeScopeIndex="false" useInExcerpt="false">jcr:.*</property> </index-rule> <index-rule nodeType="mgnl:content"> <property boost="10" useInExcerpt="false">title</property> <property boost="1.0" useInExcerpt="true">text</property> - <property nodeScopeIndex="false" useInExcerpt="false">excludedproperty</property> - <property isRegexp="true" nodeScopeIndex="false" useInExcerpt="false">mgnl:.*</property> - <property isRegexp="true" nodeScopeIndex="false" useInExcerpt="false">jcr:.*</property> - <property nodeScopeIndex="false" useInExcerpt="false">jcr:createdBy</property> </index-rule> <index-rule nodeType="mgnl:contentNode"> - <property boost="0.5" nodeScopeIndex="false" useInExcerpt="false">title</property> - <property boost="1.0" nodeScopeIndex="false" useInExcerpt="true">text</property> - <property isRegexp="true" nodeScopeIndex="false" useInExcerpt="false">mgnl:.*</property> - <property isRegexp="true" nodeScopeIndex="false" useInExcerpt="false">jcr:.*</property> - <property nodeScopeIndex="false" useInExcerpt="false">jcr:createdBy</property> + <property boost="0.5" useInExcerpt="false">title</property> + <property boost="1.0" useInExcerpt="true">text</property> </index-rule> --> + <!-- index text content on paragraphs --> <aggregate primaryType="mgnl:content"> <!-- aggregates content on the main column --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |