[Seaside] Overriding session class for SeasideTesting based test cases...?

David Shaffer cdshaffer at acm.org
Thu Sep 21 15:57:32 UTC 2006


Rick Flower wrote:
> I'm again trying to setup some nice test cases for my web-app with the
> help of David Shaffer's SeasideTesting package.  The one think that
> I'm stumped with (for today anyway) is that my application requires
> the use
> of a custom session class, but I don't see an obvious way to override
> what the SeasideTesting framework is using for the session.  Has
> anyone done this in the past and if so how?
>
> Thanks!
>
> -- Rick
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Rick,

You can override #configureApplicationForComponent: to set your session
class.  I have pasted an example from the online tutorial below:

configureApplicationForComponent: aComponentClass
	super configureApplicationForComponent: aComponentClass.
	app configuration addAncestor: MyCustomConfiguration localConfiguration.
	app preferenceAt: #sessionClass put: MyCustomSession.
	FakeMailer reset.
	app preferenceAt: #mailerFactory put: FakeMailer


David




More information about the Seaside mailing list