Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Changeset 5296

Show
Ignore:
Timestamp:
08/17/08 01:32:17 (3 months ago)
Author:
r0bby
Message:

groovyforms: update junit to 4.5 -- fix up some tests (removing the old tests which will now fail due to the fact I removed an old servlet and other misc. things.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs-modules/groovyforms/.classpath

    r5242 r5296  
    1111    <classpathentry kind="lib" path="lib-common/xstream-1.3.jar" /> 
    1212    <classpathentry kind="lib" path="lib-common/simple-xml-1.6.1-mod.jar" /> 
    13     <classpathentry kind="lib" path="lib-common/junit-4.4.jar" /> 
    1413    <classpathentry kind="lib" path="lib-common/mail.jar" /> 
    1514    <classpathentry kind="lib" path="lib-common/openmrs-api-1.3.0.12.4809.jar" /> 
     
    2019    <classpathentry kind="lib" path="lib/js-1.6R5.jar" /> 
    2120    <classpathentry kind="lib" path="lib-common/spring-2.5.1.jar" /> 
     21    <classpathentry kind="lib" path="lib-common/spring-webmvc.jar" /> 
     22    <classpathentry kind="lib" path="lib-common/spring-test.jar" /> 
     23    <classpathentry kind="lib" path="lib-common/junit-4.5.jar" /> 
    2224    <classpathentry kind="output" path="build" /> 
    2325</classpath> 
  • openmrs-modules/groovyforms/.project

    r5243 r5296  
    11<?xml version="1.0" encoding="UTF-8"?> 
    22<projectDescription> 
    3     <name>GroovyForms module</name> 
     3    <name>groovyModule</name> 
    44    <comment>A module to easily create forms using groovy for OpenMRS</comment> 
    55    <projects /> 
  • openmrs-modules/groovyforms/groovyModule.iml

    r5242 r5296  
    1313    <facet type="web" name="Web"> 
    1414      <configuration> 
    15         <descriptors> 
    16           <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/WEB-INF/web.xml" optional="false" version="2.5" /> 
    17         </descriptors> 
    1815        <webroots> 
    1916          <root url="file://$MODULE_DIR$/httpunit-1.7/doc/tutorial" relative="/WEB-INF" /> 
     
    3229          <setting name="BUILD_EXTERNAL_DEPENDENCIES" value="false" /> 
    3330          <setting name="EXCLUDE_EXPLODED_DIRECTORY" value="true" /> 
    34           <setting name="RUN_JASPER_VALIDATION" value="true" /> 
     31          <setting name="RUN_JASPER_VALIDATION" value="false" /> 
    3532          <setting name="BUILD_ONLY_WEB_RESOURCES" value="false" /> 
    3633        </building> 
     
    9289            <attribute name="method" value="0" /> 
    9390            <attribute name="URI" value="/WEB-INF/lib" /> 
     91            <url>jar://$MODULE_DIR$/lib-common/spring-2.5.1.jar!/</url> 
     92          </containerElement> 
     93          <containerElement type="library" level="module"> 
     94            <attribute name="method" value="0" /> 
     95            <attribute name="URI" value="/WEB-INF/lib" /> 
     96            <url>jar://$MODULE_DIR$/lib-common/spring-test.jar!/</url> 
     97          </containerElement> 
     98          <containerElement type="library" level="module"> 
     99            <attribute name="method" value="0" /> 
     100            <attribute name="URI" value="/WEB-INF/lib" /> 
     101            <url>jar://$MODULE_DIR$/lib-common/spring-webmvc.jar!/</url> 
     102          </containerElement> 
     103          <containerElement type="library" level="module"> 
     104            <attribute name="method" value="0" /> 
     105            <attribute name="URI" value="/WEB-INF/lib" /> 
     106            <url>jar://$MODULE_DIR$/lib-common/web-openmrs-api-1.3.0.12.4809.jar!/</url> 
     107          </containerElement> 
     108          <containerElement type="library" level="module"> 
     109            <attribute name="method" value="0" /> 
     110            <attribute name="URI" value="/WEB-INF/lib" /> 
     111            <url>jar://$MODULE_DIR$/lib-common/xercesImpl-2.6.1.jar!/</url> 
     112          </containerElement> 
     113          <containerElement type="library" level="module"> 
     114            <attribute name="method" value="0" /> 
     115            <attribute name="URI" value="/WEB-INF/lib" /> 
     116            <url>jar://$MODULE_DIR$/lib-common/xstream-1.3.jar!/</url> 
     117          </containerElement> 
     118          <containerElement type="library" level="module"> 
     119            <attribute name="method" value="0" /> 
     120            <attribute name="URI" value="/WEB-INF/lib" /> 
    94121            <url>jar://$MODULE_DIR$/lib-common/spring-2.0.jar!/</url> 
    95           </containerElement> 
    96           <containerElement type="library" level="module"> 
    97             <attribute name="method" value="0" /> 
    98             <attribute name="URI" value="/WEB-INF/lib" /> 
    99             <url>jar://$MODULE_DIR$/lib-common/web-openmrs-api-1.3.0.12.4809.jar!/</url> 
    100           </containerElement> 
    101           <containerElement type="library" level="module"> 
    102             <attribute name="method" value="0" /> 
    103             <attribute name="URI" value="/WEB-INF/lib" /> 
    104             <url>jar://$MODULE_DIR$/lib-common/xercesImpl-2.6.1.jar!/</url> 
    105           </containerElement> 
    106           <containerElement type="library" level="module"> 
    107             <attribute name="method" value="0" /> 
    108             <attribute name="URI" value="/WEB-INF/lib" /> 
    109             <url>jar://$MODULE_DIR$/lib-common/xstream-1.3.jar!/</url> 
    110122          </containerElement> 
    111123          <containerElement type="library" level="module"> 
     
    178190      <library> 
    179191        <CLASSES> 
    180           <root url="jar://$MODULE_DIR$/lib-common/junit-4.4.jar!/" /> 
    181         </CLASSES> 
    182         <JAVADOC /> 
    183         <SOURCES /> 
    184       </library> 
    185     </orderEntry> 
    186     <orderEntry type="module-library"> 
    187       <library> 
    188         <CLASSES> 
    189192          <root url="jar://$MODULE_DIR$/lib-common/mail.jar!/" /> 
    190193        </CLASSES> 
     
    251254        <CLASSES> 
    252255          <root url="jar://$MODULE_DIR$/lib-common/spring-2.5.1.jar!/" /> 
     256        </CLASSES> 
     257        <JAVADOC /> 
     258        <SOURCES /> 
     259      </library> 
     260    </orderEntry> 
     261    <orderEntry type="module-library"> 
     262      <library> 
     263        <CLASSES> 
     264          <root url="jar://$MODULE_DIR$/lib-common/spring-webmvc.jar!/" /> 
     265        </CLASSES> 
     266        <JAVADOC /> 
     267        <SOURCES /> 
     268      </library> 
     269    </orderEntry> 
     270    <orderEntry type="module-library"> 
     271      <library> 
     272        <CLASSES> 
     273          <root url="jar://$MODULE_DIR$/lib-common/spring-test.jar!/" /> 
     274        </CLASSES> 
     275        <JAVADOC /> 
     276        <SOURCES /> 
     277      </library> 
     278    </orderEntry> 
     279    <orderEntry type="module-library"> 
     280      <library> 
     281        <CLASSES> 
     282          <root url="jar://$MODULE_DIR$/lib-common/junit-4.5.jar!/" /> 
    253283        </CLASSES> 
    254284        <JAVADOC /> 
  • openmrs-modules/groovyforms/src/org/openmrs/module/groovyforms/GroovyFormsActivator.java

    r5237 r5296  
    2323import java.io.File; 
    2424import java.util.List; 
    25  
     25import java.text.MessageFormat; 
    2626 
    2727 
     
    3030 * is either started or shutdown 
    3131 */ 
     32 
     33@SuppressWarnings("unchecked") 
    3234public class GroovyFormsActivator implements Activator { 
    3335 
     
    7678    } 
    7779 
     80 
     81 
    7882    public void loadAll() { 
    7983        try { 
    8084            List<GroovyForm> forms = GroovyFormsUtil. 
    81                     unMarshalGroovyForms(new File(GroovyFormsUtil.getGROOVY_FORMS_HOME().getCanonicalPath()+"/groovyforms.xml"));             
     85                    unMarshalGroovyForms(GroovyFormsUtil.getGlobalXML());             
    8286            GroovyFormsContainer.setGroovyForms(forms); 
    8387        } catch(Exception e) { 
  • openmrs-modules/groovyforms/test/org/openmrs/module/groovyforms/util/GroovyFormsGenerationUtilTest.groovy

    r5180 r5296  
    2020        def gen = new GroovyFormsGenerationUtil() 
    2121        def controller = gen.generateController("Foo", GroovyFormsClassUtil.getProperties(new Foo())) 
    22         assertTrue "Should contain the assert statements", control / jj / jler.indexOf("assert form.bar != null && assert form.x != null") > 0 
     22        println controller 
     23        assertTrue "Should contain the assert statements", controller.indexOf("assert ") > 0 
    2324        assertTrue "Should have the onSubmit() method", controller.indexOf("onSubmit(Foo form) {") > 0 
    2425        assertTrue "Should have the validate() method", controller.indexOf("validate(Foo form) {") > 0 
    25         assertTrue "Should have the class name FooController", controller.startsWith("class FooController extends AbstractGroovyFormController {") 
     26        assertTrue "Should have the class name FooController", controller.startsWith("class FooController extends AbstractGroovyFormController {")` 
    2627    } 
    2728}