groovy practise - findAllBy

void testFindAllBy() {
   def foos = [] as Set
   [1..2].each {
     foos << new Foo(name:'Smokejumper')
    }
    foos*.save()
    assertEquals foos, Foo.findAllByName('Smokejumper') as Set
}
 

你可能感兴趣的:(groovy)