JadeTestCase assert methods Help Plz

For questions and postings not covered by the other forums
shamshergil
Posts: 2
Joined: Sun Sep 16, 2012 5:38 pm

JadeTestCase assert methods Help Plz

Postby shamshergil » Sun Sep 16, 2012 5:42 pm

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

User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: JadeTestCase assert methods Help Plz

Postby BeeJay » Mon Sep 17, 2012 12:12 pm

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.

shamshergil
Posts: 2
Joined: Sun Sep 16, 2012 5:38 pm

Re: JadeTestCase assert methods Help Plz

Postby shamshergil » Mon Sep 17, 2012 12:59 pm

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...

User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: JadeTestCase assert methods Help Plz

Postby BeeJay » Mon Sep 17, 2012 1:51 pm

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.

User avatar
Dr Danyo
Posts: 56
Joined: Fri Aug 21, 2009 8:59 am

Re: JadeTestCase assert methods Help Plz

Postby Dr Danyo » Tue Sep 18, 2012 8:05 pm

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...


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests