/trunk/CoelTest-hosted |
---|
1,3 → 1,3 |
#!/bin/sh |
APPDIR=`dirname $0`; |
java -Dgwt.args="-noserver -port 80 -out www-test" -Xmx256M -cp "$APPDIR/src:$APPDIR/test:$APPDIR/bin:/opt/eclipse/plugins/org.junit_3.8.2.v20090203-1005/junit.jar:/opt/gwt-1.5.3/gwt-user.jar:/opt/gwt-1.5.3/gwt-dev-linux.jar:/opt/gxt-1.2.4/gxt.jar" junit.textui.TestRunner org.tela_botanica.client.CoelTest "$@"; |
java -Dgwt.args="-out www-test" -Xmx256M -cp "$APPDIR/src:$APPDIR/test:$APPDIR/bin:/opt/eclipse/plugins/org.junit_3.8.2.v20090203-1005/junit.jar:/opt/gwt-1.5.3/gwt-user.jar:/opt/gwt-1.5.3/gwt-dev-linux.jar:/opt/gxt-1.2.4/gxt.jar" junit.textui.TestRunner org.tela_botanica.client.CoelTestSuite "$@"; |
/trunk/CoelTest-web.launch |
---|
1,26 → 1,26 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig"> |
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> |
<listEntry value="/coel/test/org/tela_botanica/client/CoelTest.java"/> |
</listAttribute> |
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> |
<listEntry value="1"/> |
</listAttribute> |
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/> |
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> |
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> |
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/> |
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/> |
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH"> |
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" javaProject="coel" path="1" type="4"/> "/> |
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/coel/src" path="3" type="2"/> "/> |
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/coel/test" path="3" type="2"/> "/> |
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento project="coel"/> </runtimeClasspathEntry> "/> |
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.USER_LIBRARY/GWT-1.5.3" path="3" type="4"/> "/> |
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.USER_LIBRARY/GXT-1.2.4" path="3" type="4"/> "/> |
</listAttribute> |
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/> |
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.tela_botanica.client.CoelTest"/> |
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="coel"/> |
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dgwt.args="-web -out www-test" -Xmx256M"/> |
</launchConfiguration> |
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> |
<listEntry value="/coel/test/org/tela_botanica/client/CoelTestSuite.java"/> |
</listAttribute> |
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> |
<listEntry value="1"/> |
</listAttribute> |
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/> |
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> |
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> |
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/> |
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/> |
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH"> |
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" javaProject="coel" path="1" type="4"/> "/> |
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/coel/src" path="3" type="2"/> "/> |
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/coel/test" path="3" type="2"/> "/> |
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento project="coel"/> </runtimeClasspathEntry> "/> |
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.USER_LIBRARY/GWT-1.5.3" path="3" type="4"/> "/> |
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.USER_LIBRARY/GXT-1.2.4" path="3" type="4"/> "/> |
</listAttribute> |
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/> |
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.tela_botanica.client.CoelTestSuite"/> |
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="coel"/> |
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dgwt.args="-web -out www-test" -Xmx256M"/> |
</launchConfiguration> |
/trunk/CoelTest-web |
---|
1,3 → 1,3 |
#!/bin/sh |
APPDIR=`dirname $0`; |
java -Dgwt.args="-web -out www-test" -Xmx256M -cp "$APPDIR/src:$APPDIR/test:$APPDIR/bin:/opt/eclipse/plugins/org.junit_3.8.2.v20090203-1005/junit.jar:/opt/gwt-1.5.3/gwt-user.jar:/opt/gwt-1.5.3/gwt-dev-linux.jar:/opt/gxt-1.2.4/gxt.jar" junit.textui.TestRunner org.tela_botanica.client.CoelTest "$@"; |
java -Dgwt.args="-web -out www-test" -Xmx256M -cp "$APPDIR/src:$APPDIR/test:$APPDIR/bin:/opt/eclipse/plugins/org.junit_3.8.2.v20090203-1005/junit.jar:/opt/gwt-1.5.3/gwt-user.jar:/opt/gwt-1.5.3/gwt-dev-linux.jar:/opt/gxt-1.2.4/gxt.jar" junit.textui.TestRunner org.tela_botanica.client.CoelTestSuite "$@"; |
/trunk/CoelTest-hosted.launch |
---|
1,7 → 1,7 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig"> |
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> |
<listEntry value="/coel/test/org/tela_botanica/client/CoelTest.java"/> |
<listEntry value="/coel/test/org/tela_botanica/client/CoelTestSuite.java"/> |
</listAttribute> |
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> |
<listEntry value="1"/> |
20,7 → 20,7 |
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.USER_LIBRARY/GXT-1.2.4" path="3" type="4"/> "/> |
</listAttribute> |
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/> |
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.tela_botanica.client.CoelTest"/> |
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.tela_botanica.client.CoelTestSuite"/> |
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="coel"/> |
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dgwt.args="-out www-test" -Xmx256M"/> |
</launchConfiguration> |
/trunk/test/org/tela_botanica/client/CoelTest.java |
---|
17,26 → 17,26 |
module.onModuleLoad(); |
} |
public void testerExistanceConstanteI18n() { |
public void testerCreationConstanteI18n() { |
String messageErreur = "L'attribut contenant l'i18n doit être accesible et non null"; |
assertTrue(messageErreur, module.i18nC != null); |
assertTrue(messageErreur, module.getI18nConstante() != null); |
} |
public void testerInstanceConstanteI18n() { |
String messageErreur = "L'attribut contenant l'i18n doit être une instance de "+AppliConstantes.class; |
assertTrue(messageErreur, module.i18nC instanceof AppliConstantes); |
assertTrue(messageErreur, module.getI18nConstante() instanceof AppliConstantes); |
} |
public void testerRegistreContientAppliNom() { |
assertEquals(module.i18nC.appliNom(), Registry.get(RegistreId.APPLI_NOM)); |
assertEquals(module.getI18nConstante().appliNom(), Registry.get(RegistreId.APPLI_NOM)); |
} |
public void testerRegistreContientAppliCode() { |
assertEquals(module.i18nC.appliCode(), Registry.get(RegistreId.APPLI_CODE)); |
assertEquals(module.getI18nConstante().appliCode(), Registry.get(RegistreId.APPLI_CODE)); |
} |
public void testerRegistreContientAppliVersion() { |
assertEquals(module.i18nC.appliVersion(), Registry.get(RegistreId.APPLI_VERSION)); |
assertEquals(module.getI18nConstante().appliVersion(), Registry.get(RegistreId.APPLI_VERSION)); |
} |
public void testerRegistreContientAppliRevision() { |
/trunk/test/org/tela_botanica/client/vues/StructureDetailPanneauVueTest.java |
---|
New file |
0,0 → 1,43 |
package org.tela_botanica.client.vues; |
import org.tela_botanica.client.Coel; |
import org.tela_botanica.client.Mediateur; |
import org.tela_botanica.client.RegistreId; |
import org.tela_botanica.client.modeles.ValeurListe; |
import org.tela_botanica.client.vues.StructureDetailPanneauVue; |
import com.extjs.gxt.ui.client.Registry; |
import com.google.gwt.core.client.JavaScriptObject; |
import com.google.gwt.json.client.JSONArray; |
import com.google.gwt.junit.client.GWTTestCase; |
public class StructureDetailPanneauVueTest extends GWTTestCase { |
private Coel module = null; |
private Mediateur mediateur = null; |
public String getModuleName() { |
return "org.tela_botanica.Coel"; |
} |
protected void gwtSetUp() { |
module = new Coel(); |
module.onModuleLoad(); |
mediateur = Registry.get(RegistreId.MEDIATEUR); |
} |
public void testerConstructionTxtListeOntologie() { |
StructureDetailPanneauVue vueDetail = new StructureDetailPanneauVue(mediateur); |
JSONArray json = new JSONArray(getJsonArrayListeValeursStockageLocal()); |
ValeurListe ontologie = new ValeurListe(json); |
String chaineAAnalyser = "2068;;2069;;2067"; |
String chaineFormatee = vueDetail.construireTxtListeOntologie(ontologie, chaineAAnalyser); |
System.out.println(chaineFormatee); |
assertEquals("Bâtiment (ex. : Herbier), Pièce, Réserves", chaineFormatee); |
} |
private native JavaScriptObject getJsonArrayListeValeursStockageLocal() /*-{ |
{"id":"1018","valeurs":[{"cmlv_id_valeur":"2067","0":"2067","cmlv_ce_parent":"1018","1":"1018","cmlv_ce_projet":"1","2":"1","cmlv_nom":"R\u00e9serves","3":"R\u00e9serves","cmlv_abreviation":"1","4":"1","cmlv_description":"Lieu de stockage des collections d'un mus\u00e9e, d'une biblioth\u00e8que, etc. qui sert \u00e0 conserver les collections, les \u00e9tudier et les g\u00e9rer mais non accessible au public.","5":"Lieu de stockage des collections d'un mus\u00e9e, d'une biblioth\u00e8que, etc. qui sert \u00e0 conserver les collections, les \u00e9tudier et les g\u00e9rer mais non accessible au public.","cmlv_ce_meta":"209","6":"209"},{"cmlv_id_valeur":"2068","0":"2068","cmlv_ce_parent":"1018","1":"1018","cmlv_ce_projet":"1","2":"1","cmlv_nom":"B\u00e2timent (ex. : Herbier)","3":"B\u00e2timent (ex. : Herbier)","cmlv_abreviation":"2","4":"2","cmlv_description":"NULL","5":"NULL","cmlv_ce_meta":"210","6":"210"},{"cmlv_id_valeur":"2069","0":"2069","cmlv_ce_parent":"1018","1":"1018","cmlv_ce_projet":"1","2":"1","cmlv_nom":"Pi\u00e8ce","3":"Pi\u00e8ce","cmlv_abreviation":"3","4":"3","cmlv_description":"NULL","5":"NULL","cmlv_ce_meta":"211","6":"211"}]} |
}-*/; |
} |
/trunk/test/org/tela_botanica/client/CoelTestSuite.java |
---|
New file |
0,0 → 1,17 |
package org.tela_botanica.client; |
import junit.framework.Test; |
import junit.framework.TestSuite; |
import org.tela_botanica.client.vues.StructureDetailPanneauVueTest; |
import com.google.gwt.junit.tools.GWTTestSuite; |
public class CoelTestSuite extends GWTTestSuite { |
public static Test suite() { |
TestSuite suite = new TestSuite("Tests du COEL"); |
suite.addTestSuite(CoelTest.class); |
suite.addTestSuite(StructureDetailPanneauVueTest.class); |
return suite; |
} |
} |