From JUnit3 to Easyb
In this post I would like to show you a simple class and its tests and what was the evolution since JUnit3 to easyb.
In this post I would like to show you a simple class and its tests and what was the evolution since JUnit3 to easyb.
The 5th issue of free JavaExpress magazine is now available in English. You can find it here.
In this issue you will find:
Grails, Groovy, JavaExpress, java |
If you need the latest possible version of Grails (not release) you can download a fresh build from Hudson or build it yourself. The second options is fairly easy.
That's all. Your project should run now with your fresh build. More detailed information can be found here: http://www.grails.org/GrailsDevEnvironment
I've found another Google Wave Robot tutorial. This one is based on Gaelyk, "a lightweight Groovy toolkit for Google App Engine Java."
Groovy |
Not much time passed sinced Google Wave has been introduced to wider audience and there already is a Google Wave Grails plugin. David Trattnig prepared a great plugin that lets you embed waves in your app or do even more amazing thing - write Wave robots. See an example of a wave robot. If you add a sample robot to your wave you can ask it to execute a groovy code and return results
Hubert Klein Ikkink przestawia na swoim blogu ciekawą serię postów pod tytułem Groovy Goodness. W każdym poście przedstawia ciekawy "smaczek" z Groovy oraz jego użycie. Bardzo ciekawa seria umożliwiająca poznanie możliwości Grooviego. Polecam czytać razem z komentarzami, gdyż czasami inne osoby dopisują ciekawe przykłady.
Hubert Klein Ikkink presents an interesting series of posts at his blog called the Groovy Goodness (http://mrhaki.blogspot.com/search/label/Groovy:Goodness). The series presents the power of Groovy. It's an excellent way to learn something about Groovy.
Groovy |
Do kompletu z wczorajszym wywołaniem WebService'u z Groovy poniżej mały przykład, jak w SoapUI odczytać parametry request'u i zasymulować bardziej skomplikowaną odpowiedź.
import groovyx.net.ws.WSClient // Tu wstawiamy nasz adres def proxy = new WSClient("http://localhost:8088/calc?wsdl", this.class.classLoader) proxy.initialize() // Tu wstawiamy wywołanie naszej metody def result = proxy.Add(1.0 as double, 2.0 as double) println result
Gotowe
Do testów użyłem WSDLa, którego znalazłem tutaj. Najłatwiej pobrać SoapUI, wczytać owego WSDLa, wygenerować MockService i możemy już się bawić w testowe wywołanie WebService'u. W samym SoapUI możemy też generować przykładowe odpowiedzi z wykorzystaniem, niespodzianka, Groovy