manuel aldana wrote:
hi,
throughout my test methods the config settings are repeating and I
would like to put it to the setUp() method (see sample code). put then
the inner webtest closure context is lost and the config setting won't
work.
--------------------------------------
void setUp(){
config(....){...}
}
void test1(){
webtest(...){....}
}
void test2(){
webtest(...){....}
}
-----------------------------------
how is it possible to extract the config-settings inside a setup
logic? Looking at the code itself I think it is not possible because
the webtest() context is unknown inside setUp().
I found a little workaround, which is still forcing a config setting in
each test method, but at least duplicates less stuff.
-----------------------------------
def config={webtestContext ->
webtestContext.config(...){...}
}
void test1(){
webtest(...){config(delegate);....}
}
void test2(){
webtest(...){config(delegate);....}
}
-----------------------------------
--
manuel aldana
[email protected]
software-engineering blog: http://www.aldana-online.de
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest