Changeset 5296
- Timestamp:
- 08/17/08 01:32:17 (3 months ago)
- Files:
-
- openmrs-modules/groovyforms/.classpath (modified) (2 diffs)
- openmrs-modules/groovyforms/.project (modified) (1 diff)
- openmrs-modules/groovyforms/groovyModule.iml (modified) (5 diffs)
- openmrs-modules/groovyforms/lib-common/junit-4.4.jar (deleted)
- openmrs-modules/groovyforms/lib-common/junit-4.5.jar (added)
- openmrs-modules/groovyforms/src/org/openmrs/module/groovyforms/GroovyFormsActivator.java (modified) (3 diffs)
- openmrs-modules/groovyforms/test/org/openmrs/module/groovyforms/util/GroovyFormsGenerationUtilTest.groovy (modified) (1 diff)
- openmrs-modules/groovyforms/test/org/openmrs/module/groovyforms/web/dwr/DWRGroovyFormsServiceTest.groovy (deleted)
- openmrs-modules/groovyforms/test/org/openmrs/module/groovyforms/web/servlet/CreateGroovyFormsServletTest.groovy (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openmrs-modules/groovyforms/.classpath
r5242 r5296 11 11 <classpathentry kind="lib" path="lib-common/xstream-1.3.jar" /> 12 12 <classpathentry kind="lib" path="lib-common/simple-xml-1.6.1-mod.jar" /> 13 <classpathentry kind="lib" path="lib-common/junit-4.4.jar" />14 13 <classpathentry kind="lib" path="lib-common/mail.jar" /> 15 14 <classpathentry kind="lib" path="lib-common/openmrs-api-1.3.0.12.4809.jar" /> … … 20 19 <classpathentry kind="lib" path="lib/js-1.6R5.jar" /> 21 20 <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" /> 22 24 <classpathentry kind="output" path="build" /> 23 25 </classpath> openmrs-modules/groovyforms/.project
r5243 r5296 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <projectDescription> 3 <name> GroovyForms module</name>3 <name>groovyModule</name> 4 4 <comment>A module to easily create forms using groovy for OpenMRS</comment> 5 5 <projects /> openmrs-modules/groovyforms/groovyModule.iml
r5242 r5296 13 13 <facet type="web" name="Web"> 14 14 <configuration> 15 <descriptors>16 <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/WEB-INF/web.xml" optional="false" version="2.5" />17 </descriptors>18 15 <webroots> 19 16 <root url="file://$MODULE_DIR$/httpunit-1.7/doc/tutorial" relative="/WEB-INF" /> … … 32 29 <setting name="BUILD_EXTERNAL_DEPENDENCIES" value="false" /> 33 30 <setting name="EXCLUDE_EXPLODED_DIRECTORY" value="true" /> 34 <setting name="RUN_JASPER_VALIDATION" value=" true" />31 <setting name="RUN_JASPER_VALIDATION" value="false" /> 35 32 <setting name="BUILD_ONLY_WEB_RESOURCES" value="false" /> 36 33 </building> … … 92 89 <attribute name="method" value="0" /> 93 90 <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" /> 94 121 <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>110 122 </containerElement> 111 123 <containerElement type="library" level="module"> … … 178 190 <library> 179 191 <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>189 192 <root url="jar://$MODULE_DIR$/lib-common/mail.jar!/" /> 190 193 </CLASSES> … … 251 254 <CLASSES> 252 255 <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!/" /> 253 283 </CLASSES> 254 284 <JAVADOC /> openmrs-modules/groovyforms/src/org/openmrs/module/groovyforms/GroovyFormsActivator.java
r5237 r5296 23 23 import java.io.File; 24 24 import java.util.List; 25 25 import java.text.MessageFormat; 26 26 27 27 … … 30 30 * is either started or shutdown 31 31 */ 32 33 @SuppressWarnings("unchecked") 32 34 public class GroovyFormsActivator implements Activator { 33 35 … … 76 78 } 77 79 80 81 78 82 public void loadAll() { 79 83 try { 80 84 List<GroovyForm> forms = GroovyFormsUtil. 81 unMarshalGroovyForms( new File(GroovyFormsUtil.getGROOVY_FORMS_HOME().getCanonicalPath()+"/groovyforms.xml"));85 unMarshalGroovyForms(GroovyFormsUtil.getGlobalXML()); 82 86 GroovyFormsContainer.setGroovyForms(forms); 83 87 } catch(Exception e) { openmrs-modules/groovyforms/test/org/openmrs/module/groovyforms/util/GroovyFormsGenerationUtilTest.groovy
r5180 r5296 20 20 def gen = new GroovyFormsGenerationUtil() 21 21 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 23 24 assertTrue "Should have the onSubmit() method", controller.indexOf("onSubmit(Foo form) {") > 0 24 25 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 {")` 26 27 } 27 28 }