r1375 - trunk/wikitty-jdbc/src/test/java/org/nuiton/wikitty/services
Author: echatellier Date: 2012-01-26 16:00:35 +0100 (Thu, 26 Jan 2012) New Revision: 1375 Url: http://nuiton.org/repositories/revision/wikitty/1375 Log: Remove ProxyTest Removed: trunk/wikitty-jdbc/src/test/java/org/nuiton/wikitty/services/ProxyTest.java Modified: trunk/wikitty-jdbc/src/test/java/org/nuiton/wikitty/services/WikittyServiceInMemoryJdbcSolr.java Deleted: trunk/wikitty-jdbc/src/test/java/org/nuiton/wikitty/services/ProxyTest.java =================================================================== --- trunk/wikitty-jdbc/src/test/java/org/nuiton/wikitty/services/ProxyTest.java 2012-01-26 14:30:07 UTC (rev 1374) +++ trunk/wikitty-jdbc/src/test/java/org/nuiton/wikitty/services/ProxyTest.java 2012-01-26 15:00:35 UTC (rev 1375) @@ -1,93 +0,0 @@ -/* - * #%L - * Wikitty :: wikitty-jdbc-impl - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2009 - 2010 CodeLutin, Benjamin Poussin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * #L% - */ -package org.nuiton.wikitty.services; - - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.junit.Assert; -import org.junit.Test; -import org.nuiton.wikitty.WikittyConfig; -import org.nuiton.wikitty.WikittyProxy; -import org.nuiton.wikitty.WikittyService; -import org.nuiton.wikitty.WikittyServiceFactory; -import org.nuiton.wikitty.entities.Wikitty; -import org.nuiton.wikitty.entities.WikittyLabel; -import org.nuiton.wikitty.entities.WikittyLabelImpl; -import org.nuiton.wikitty.entities.WikittyTreeNode; -import org.nuiton.wikitty.entities.WikittyTreeNodeImpl; - -import java.util.Collections; -import org.nuiton.util.ApplicationConfig; -import org.nuiton.wikitty.WikittyConfigOption; - -/** - * - * @author poussin - * @version $Revision$ - * - * Last update: $Date$ - * by : $Author$ - */ -public class ProxyTest { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - static private Log log = LogFactory.getLog(ProxyTest.class); - - @Test - public void testProxyStoreRestoreTreeNode() throws Exception { - ApplicationConfig config = WikittyConfig.getConfig( - "wikitty-config-sample-standalone.properties"); - config.setOption(WikittyConfigOption. - WIKITTY_STORAGE_JDBC_URL.getKey(), - "jdbc:h2:file:./target/data/db"); - config.setOption(WikittyConfigOption. - WIKITTY_SEARCHENGINE_SOLR_DIRECTORY_DATA.getKey(), - "./target/data/solr"); - - WikittyService ws = WikittyServiceFactory.buildWikittyService(config); - -// Assert.assertEquals(WikittyServiceStorage.class, ws.getClass()); - - WikittyProxy proxy = new WikittyProxy(ws); - WikittyTreeNodeImpl node = new WikittyTreeNodeImpl(); - node.setName("NodeName"); - - Wikitty w = node.getWikitty(); - WikittyLabelImpl label = new WikittyLabelImpl(w); - label.addLabels("TheLabel"); - - proxy.store(label); - - WikittyTreeNode nodeRestored = proxy.restore(WikittyTreeNode.class, node.getWikittyId()); - - Assert.assertEquals("NodeName", nodeRestored.getName()); - - WikittyLabel labelRestored = proxy.restore(WikittyLabel.class, node.getWikittyId()); - Assert.assertEquals(Collections.singleton("TheLabel"), labelRestored.getLabels()); - - } - -} Modified: trunk/wikitty-jdbc/src/test/java/org/nuiton/wikitty/services/WikittyServiceInMemoryJdbcSolr.java =================================================================== --- trunk/wikitty-jdbc/src/test/java/org/nuiton/wikitty/services/WikittyServiceInMemoryJdbcSolr.java 2012-01-26 14:30:07 UTC (rev 1374) +++ trunk/wikitty-jdbc/src/test/java/org/nuiton/wikitty/services/WikittyServiceInMemoryJdbcSolr.java 2012-01-26 15:00:35 UTC (rev 1375) @@ -29,7 +29,6 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.solr.core.RAMDirectoryFactory; -import org.nuiton.util.ApplicationConfig; import org.nuiton.wikitty.WikittyConfig; import org.nuiton.wikitty.WikittyConfigOption; import org.nuiton.wikitty.jdbc.WikittyExtensionStorageJDBC;
participants (1)
-
echatellier@users.nuiton.org