1 46 47 package org.codehaus.groovy.runtime; 48 49 import groovy.util.GroovyTestCase; 50 51 import java.util.ArrayList ; 52 import java.util.HashMap ; 53 import java.util.List ; 54 import java.util.Map ; 55 56 61 public class DefaultGroovyMethodsTest extends GroovyTestCase { 62 63 public void testPrint() throws Exception { 64 Map map = new HashMap (); 65 map.put("bob", "drools"); 66 map.put("james", "geronimo"); 67 List list = new ArrayList (); 68 list.add(map); 69 70 71 } 73 74 public void testIncrementString() throws Exception { 75 String original = "z"; 76 String answer = DefaultGroovyMethods.next(original); 77 78 System.out.println(answer); 79 assertTrue(answer.compareTo(original) > 0); 80 } 81 82 public void testDecrementString() throws Exception { 83 String original = "a"; 84 String answer = DefaultGroovyMethods.previous(original); 85 86 System.out.println(answer); 87 assertTrue(InvokerHelper.compareLessThan(answer, original)); 88 } 89 } 90 | Popular Tags |