AW: [Seaside] SeasideTesting: Access session from component
Schwarz, Jan-Felix
Jan-Felix.Schwarz at student.hpi.uni-potsdam.de
Mon Jan 14 10:07:04 UTC 2008
I am familiar with your nice tutorial. I don't get it to run anyway. So here is an excerpt of my test code:
SCComponentTestCase subclass: #WWComponentTestCase>>
configureApplicationForComponent: aComponentClass
super configureApplicationForComponent: aComponentClass.
app preferenceAt: #sessionClass put: WWSession.
WWComponentTestCase subclass: #WWStartComponentTest>>
testXYZ
self newApplicationWithRootClass: WWStartComponent.
self establishSession.
self component session isLoggedIn.
This raises an OndefinedObject(Object)>>doesNotUnderstand: #isLoggedIn exception.
Thank you for your help.
Felix
-----Ursprüngliche Nachricht-----
Von: seaside-bounces at lists.squeakfoundation.org im Auftrag von C. David Shaffer
Gesendet: So 13.01.2008 22:08
An: Seaside - general discussion
Betreff: Re: [Seaside] SeasideTesting: Access session from component
Schwarz, Jan-Felix wrote:
> Hello,
>
> I want to use SeasideTesting to test my components. I have overriden the Session class and access the customized session class from my components. Application runs fine in web browser.
>
> While excecuting the test cases I get errors because calling session from the component returns UndefinedObject. I know I get the session by calling 'self session' from the test class. But for reasonable unit testing I need my component's methods to work properly. Anyone knows how to fix this problem?
>
> Sorry for my bad English. Thanks for your help.
>
> Felix
>
http://www.shaffer-consulting.com/david/Seaside/TestingComponents/TestingComponents.html
Then just search for the text "sessionClass". If that doesn't help, let
me know.
David
_______________________________________________
seaside mailing list
seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3752 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20080114/2f67c507/attachment.bin
More information about the seaside
mailing list