session usage inside model

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

session usage inside model

NorbertHartl
Hi,
       
        I need to access the session from inside my model objects.
        I know that is not the best way but the workaround would
        be very difficult. My biggest problem with this approach
        is testability. I like to test my model without having to
        use SeasideTesting or anything else.
       
        Do you know an approach where I can provide a session
        even if I'm not in a seaside application. To be correct:
        I don't need the WASession but the Glorp session which
        is provided by a WASession. Is there any smalltalk way
        to solve such a thing.
       
        thanks,
       
        Norbert
       

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: session usage inside model

Philippe Marschall
MyFakeSessionTestCaseBaseClass >> #runCase
    WACurrentSession
        use: self dummySession
        during: [ super runCase ]

2007/7/4, Norbert Hartl <[hidden email]>:

> Hi,
>
>         I need to access the session from inside my model objects.
>         I know that is not the best way but the workaround would
>         be very difficult. My biggest problem with this approach
>         is testability. I like to test my model without having to
>         use SeasideTesting or anything else.
>
>         Do you know an approach where I can provide a session
>         even if I'm not in a seaside application. To be correct:
>         I don't need the WASession but the Glorp session which
>         is provided by a WASession. Is there any smalltalk way
>         to solve such a thing.
>
>         thanks,
>
>         Norbert
>
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: session usage inside model

NorbertHartl
On Wed, 2007-07-04 at 19:32 +0200, Philippe Marschall wrote:
> MyFakeSessionTestCaseBaseClass >> #runCase
>     WACurrentSession
>         use: self dummySession
>         during: [ super runCase ]
>
thanks, works perfect!

Norbert

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside