Sorry about that hit the send by accident, here is the rest of it:
        @BeforeClass
        public static void setup() {

                // tapestry interfaces
                _mockAsm = createMock(ApplicationStateManager.class);
                _mockContext = createMock(Context.class);
                _mockResponse = createMock(Response.class);
                _mockRequest = createMock(Request.class);

                // an interface of my own
                _mockSiteError = createMock(ISiteError.class);

                _transport = new SMTPTransport("mailrelay",25);
        }

        /**
         * Test the properties for the service are set correctly and that the
         * service can be constructed
         */
        @Test
        public final void testConstruction() {
                
expect(_mockContext.getInitParameter("DevelopmentMode")).andReturn(
                                "false");
                expect(_mockContext.getInitParameter("MailServer")).andReturn(
                                "mailrelay");
                replay(_mockContext);

                // now see if we can construct an instance of the class under 
test
                _mockSiteErrorImpl = new SiteErrorImpl(_mockAsm, _mockContext,
                                _mockResponse, _mockRequest);
                // run the verify
                verify(_mockContext);
        }




----- Original Message -----
From: "Russell Brown" <[EMAIL PROTECTED]>
To: "Tapestry users" <users@tapestry.apache.org>
Sent: Wednesday, 17 September, 2008 2:00:12 PM GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: RE: T5: testing using PageTester and EasyMock

Hi Peter,
How have you done this? When I try to use Tapestry to "Build" my EasyMock 
services the resultant proxies are rejected by EasyMock as not being EasyMock 
proxies...

Cheers

Russell

-----Original Message-----
From: Peter Stavrinides [mailto:[EMAIL PROTECTED] 
Sent: 17 September 2008 11:47
To: Tapestry users
Subject: Re: T5: testing using PageTester and EasyMock

Hi all,

I haven't got around to using PageTester yet, but I started using Easymock for 
my IoC services recently... Its quite amazing how you can create a full blown 
IoC service with all dependencies satisfied so easily, it just works since 
service proxies are all interfaces in Tapestry.



----- Original Message -----
From: "Angelo Chen" <[EMAIL PROTECTED]>
To: users@tapestry.apache.org
Sent: Wednesday, 17 September, 2008 1:16:57 PM GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: T5: testing using PageTester and EasyMock


Hi,

This will be a very interesting topic, I'd like to see how TDD can be used
in the development of T5 pages, my experience with T5 page tester isn't so
successful, now I try to do everything in the services as it is a easy place
to test.

angelo


akochnev wrote:
> 
> 
> Let's keep this discussion rolling, we certainly need a little more info
> on
> testing in T5.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-testing-using-PageTester-and-EasyMock-tp19496126p19529056.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to