Changeset 5297
- Timestamp:
- 08/17/08 01:37:54 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openmrs-modules/groovyforms/test/org/openmrs/module/groovyforms/util/GroovyFormsGenerationUtilTest.groovy
r5296 r5297 19 19 void testGenerationController() { 20 20 def gen = new GroovyFormsGenerationUtil() 21 def controller = gen.generateController("Foo", GroovyFormsClassUtil.getProperties(new Foo())) 22 println controller 21 def controller = gen.generateController("Foo", GroovyFormsClassUtil.getProperties(new Foo())) 23 22 assertTrue "Should contain the assert statements", controller.indexOf("assert ") > 0 24 23 assertTrue "Should have the onSubmit() method", controller.indexOf("onSubmit(Foo form) {") > 0 25 24 assertTrue "Should have the validate() method", controller.indexOf("validate(Foo form) {") > 0 26 assertTrue "Should have the class name FooController", controller.startsWith("class FooController extends AbstractGroovyFormController {") `25 assertTrue "Should have the class name FooController", controller.startsWith("class FooController extends AbstractGroovyFormController {") 27 26 } 28 27 }