Page 1 of 1
JadeTestCase assert methods Help Plz
Posted: Sun Sep 16, 2012 5:42 pm
by shamshergil
Hi there!
i dont know how to see the assert methods in JadeTestCase class. I want to see their codes in all assert methods.
I have a TestController class which is sub class of JadeTestCase class. I am student and i used assert methods in TestController claas.
just for learning I want to see the codes written in assert methods..
Any Idea
Thanks
Re: JadeTestCase assert methods Help Plz
Posted: Mon Sep 17, 2012 12:12 pm
by BeeJay
As with all RootSchema supplied methods in Jade, the source code is not available for any of the assert******* methods on the JadeTestCase class.
ie: You're not missing anything, it is just simply not possible to see the source code for any of the methods provided in RootSchema.
Cheers,
BeeJay.
Re: JadeTestCase assert methods Help Plz
Posted: Mon Sep 17, 2012 12:59 pm
by shamshergil
Thanks BeeJay for ur reply,,
actually what i wanted to do is:
here is in simple pseudo:
if assert** method fails then:
i want to call one of my own method
elseif assert** method pass then:
i want to call my another own method
dont know how to do that..
Any ideas plz...
Re: JadeTestCase assert methods Help Plz
Posted: Mon Sep 17, 2012 1:51 pm
by BeeJay
The assert******* methods do not return a value, so you can't code methods as indicated.
Depending on what you're actually trying to achieve, you may be able to utilise the testFailure and testSuccess callback methods by implementing the JadeTestListenerIF interface.
Cheers,
BeeJay.
Re: JadeTestCase assert methods Help Plz
Posted: Tue Sep 18, 2012 8:05 pm
by Dr Danyo
Hi, can you provide more details on what outcome you are trying to achieve?
Are you trying to perform some sort of clean-up activity based on the outcome of the test? Without knowing more, I'd plan for the test passing, if it was to fail you would have to get involved either way. If you are considering the outcome of the test for reporting etc, then BJ is correct you should consider implementing your own test listeners.
- Dr Danyo.
Thanks BeeJay for ur reply,,
actually what i wanted to do is:
here is in simple pseudo:
if assert** method fails then:
i want to call one of my own method
elseif assert** method pass then:
i want to call my another own method
dont know how to do that..
Any ideas plz...