r1293 - topia/trunk/topia-soa/src/test/java/org/codelutin/topia/service
Author: chatellier Date: 2009-01-12 10:40:22 +0000 (Mon, 12 Jan 2009) New Revision: 1293 Removed: topia/trunk/topia-soa/src/test/java/org/codelutin/topia/service/TaistService.java topia/trunk/topia-soa/src/test/java/org/codelutin/topia/service/TaistServiceImpl.java topia/trunk/topia-soa/src/test/java/org/codelutin/topia/service/TaistServiceServer.java topia/trunk/topia-soa/src/test/java/org/codelutin/topia/service/TaistServiceTest.java Log: Replace "Taist" by "Example" :p Deleted: topia/trunk/topia-soa/src/test/java/org/codelutin/topia/service/TaistService.java =================================================================== --- topia/trunk/topia-soa/src/test/java/org/codelutin/topia/service/TaistService.java 2009-01-12 10:39:50 UTC (rev 1292) +++ topia/trunk/topia-soa/src/test/java/org/codelutin/topia/service/TaistService.java 2009-01-12 10:40:22 UTC (rev 1293) @@ -1,41 +0,0 @@ -/* *##% ToPIA - Tools for Portable and Independent Architecture - * Copyright (C) 2004 - 2008 CodeLutin - * - * 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>. ##%*/ - -package org.codelutin.topia.service; - -import org.codelutin.topia.TopiaException; - -/** - * TestService.java - * <p/> - * Genere par Topia ! - * - * @author chatellier - * @version $Revision$ - * <p/> - * Last update : $Date$ By : $Author$ - */ -public interface TaistService extends TopiaApplicationService { - - /** - * Declaration d'un service - * - * @param name le nom - * @return hello - */ - public String sayHello(String name) throws TopiaException; -} Deleted: topia/trunk/topia-soa/src/test/java/org/codelutin/topia/service/TaistServiceImpl.java =================================================================== --- topia/trunk/topia-soa/src/test/java/org/codelutin/topia/service/TaistServiceImpl.java 2009-01-12 10:39:50 UTC (rev 1292) +++ topia/trunk/topia-soa/src/test/java/org/codelutin/topia/service/TaistServiceImpl.java 2009-01-12 10:40:22 UTC (rev 1293) @@ -1,61 +0,0 @@ -/* *##% ToPIA - Tools for Portable and Independent Architecture - * Copyright (C) 2004 - 2008 CodeLutin - * - * 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>. ##%*/ - -package org.codelutin.topia.service; - -import org.codelutin.topia.service.TopiaApplicationServiceAbstract; - -/** - * TestServiceImpl.java - * - * Developpe par le programmeur ! - * - * @author chatellier - * @version $Revision$ - * - * Last update : $Date$ By : $Author$ - */ -public class TaistServiceImpl extends TopiaApplicationServiceAbstract implements - TaistService { - - private String prefix; - - private static int nb = 0; - - public TaistServiceImpl() { - this.prefix = "Salut"; - nb = nb + 1; - } - - /** - * - * @param prefix - */ - public TaistServiceImpl(String prefix) { - this(); - this.prefix = prefix; - } - - /* - * (non-Javadoc) - * - * @see service.TaistService#sayHello(java.lang.String) - */ - public String sayHello(String name) { - return prefix + " " + name + " (instance " + nb + ")"; - } -} Deleted: topia/trunk/topia-soa/src/test/java/org/codelutin/topia/service/TaistServiceServer.java =================================================================== --- topia/trunk/topia-soa/src/test/java/org/codelutin/topia/service/TaistServiceServer.java 2009-01-12 10:39:50 UTC (rev 1292) +++ topia/trunk/topia-soa/src/test/java/org/codelutin/topia/service/TaistServiceServer.java 2009-01-12 10:40:22 UTC (rev 1293) @@ -1,57 +0,0 @@ -/* *##% ToPIA - Tools for Portable and Independent Architecture - * Copyright (C) 2004 - 2008 CodeLutin - * - * 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>. ##%*/ - -package org.codelutin.topia.service; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -/** - * TopiaServiceServer.java - * <p/> - * Class main chargee de lire le fichier de configuration et de lancer les - * serveurs, pour les protocoles definit. - * - * @author chatellier - * @version $Revision$ - * <p/> - * Last update : $Date$ By : $Author$ - */ -public class TaistServiceServer { - - /** Logger (common logging) */ - private static final Log logger = LogFactory - .getLog(TaistServiceServer.class); - - /** - * Main. Demarre les serveurs. - * - * @param args arguments - */ - public static void main(String... args) { - - // TaistService ts = new TaistServiceImpl("Bonjour"); - // TopiaServiceFactory.addService(TaistService.class, ts , - // Protocole.XML_RPC); - //TopiaServiceFactory.addService(TaistService.class, - // TaistServiceImpl.class, Protocole.XML_RPC); - TopiaApplicationServiceFactory.addService(TaistService.class, - TaistServiceImpl.class, Protocol.SOAP); - - logger.info("Service TaistService added..."); - } -} Deleted: topia/trunk/topia-soa/src/test/java/org/codelutin/topia/service/TaistServiceTest.java =================================================================== --- topia/trunk/topia-soa/src/test/java/org/codelutin/topia/service/TaistServiceTest.java 2009-01-12 10:39:50 UTC (rev 1292) +++ topia/trunk/topia-soa/src/test/java/org/codelutin/topia/service/TaistServiceTest.java 2009-01-12 10:40:22 UTC (rev 1293) @@ -1,81 +0,0 @@ -/* *##% ToPIA - Tools for Portable and Independent Architecture - * Copyright (C) 2004 - 2008 CodeLutin - * - * 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>. ##%*/ - -package org.codelutin.topia.service; - -import org.codelutin.topia.TopiaException; -import org.codelutin.topia.TopiaNotFoundException; -import org.junit.Assert; -import org.junit.Test; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -/** - * TestServiceTestCase.java - * <p/> - * Test junit du service. - * <p/> - * Il faut lancer les serveurs avant ce test - * - * @author chatellier - * @version $Revision$ - * <p/> - * Last update : $Date$ By : $Author$ - * @see TaistServiceServer - */ -public class TaistServiceTest extends Assert { - - @BeforeClass - public static void beforeClass() { - //one dayit will works :) - //TaistServiceServer.main(); - } - - @Test - public void HUMM() { - - } - /** Test de la methode say hello */ - @Ignore - //@Test - public void testSayHello() { - - String reponse = null; - - TaistService testService; - try { - testService = TopiaApplicationServiceFactory - .getService(TaistService.class); - - String myName = "eric"; - - reponse = testService.sayHello(myName); - - System.out.println("TaistService says : " + reponse); - } catch (TopiaNotFoundException e) { - System.err - .println("TopiaNotFoundException: erreur du fichier de configuration"); - } catch (TopiaException e) { - System.err - .println("TopiaException: impossible d'instancier le service"); - } - - assertNotNull(reponse); - } -}
participants (1)
-
chatellierï¼ users.labs.libre-entreprise.org