jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Wyszinski <mike_wyszin...@yahoo.com>
Subject dual in/out container testing?
Date Wed, 08 May 2002 23:18:35 GMT
OK,

Is it possible for cactus tests to be run as
standalone plain old junit tests? 

Here's our situation:

1)We are writting some "Foundation" SessionEJBs
2)We using Sun J2EE Business Delegate pattern to
isolate clients from our deployment architecture
Therefore, we can run the same logic/code from within
a EJB environment or not.
2)we chose to write POJT (plain old junit tests) to
test the basic logic AND use cactus to test
in-container reaction to our code. 

Well doing it that way has meant us having to copy n'
paste the same test logic into 2 classes:

1)public class XTest extends TestCase 
2)public class XCactus extends ServletTestCase 

We'd like to get rid of the duplication effort, any
ideas on  how to centralize the test code and have it
runnable as ServletTestCase And TestCase?

BTW we thought about using composition ie:
public class XTestLogic{
	//all test code in here
}
public class XTest extends TestCase {
	private XTestLogic testlogic = new XTestLogic()
}
public class XCactus extends ServletTestCase{
	private XTestLogic testlogic = new XTestLogic()
}

but all the assertX() are obviously not available in
XTestLogic.

any insight would be appreciated,
Mike

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Mother's Day is May 12th!
http://shopping.yahoo.com

--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message