[Seaside] Albatross: How should I access the model?

Adrian Lienhard adi at netstyle.ch
Sun Mar 2 17:40:49 UTC 2008


Hi Matthias,

Apparently this got lost in a recent refactoring.
In Albatross-al.215 you can access the root component instance from a  
unit test. As an example see APierTest>>testEditPage.

This version of Albatross also allows one to easily access to the  
current URL and title as you requested in another mail.

Cheers,
Adrian


On Feb 29, 2008, at 09:51 , Matthias Berth wrote:

> Hello,
>
> in the Albatross paper [1] there is a section about "Model  
> access" (p 15):
>
>> There is unlimited access to the
>> model available by the test component accessor  
>> ATestCase>>testComponent. Depending
>> on the test components code, we may access the model with self  
>> testComponent model
>> or likewise. The model access can be useful for assertions before  
>> and after user interactions.
>
> I'd like to do just that, e.g. accessing the Pier kernel after I have
> added / removed a page. The method testComponent seems to have
> migrated to AComponentWrapper, looking at its senders does not help.
> All the example tests seem to deal only with user interactions
> (browser click: etc).
>
> So, how do I access the model from inside an Albatross unit test?
>
>
> Cheers
>
> Matthias
>
> [1] http://www.iam.unibe.ch/~scg/Archive/Projects/Brue06a.pdf
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list