« Eclipse 3.1 | Main | The zen of branching »

2005.02.24

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341c9edc53ef00d834283b5c53ef

Listed below are links to weblogs that reference JUnit testing with Acegi Security:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Brian Topping
Your listing of the classes is helpful, thanks. A trick that I use to get around having to change configuration files for testing is to use three different classes of configuration files: Mainline, Runtime, and Test. Basically a mainline configuration is always loaded, in conjunction with either a runtime or test configuration. So my test AbstractTestBase class has a config location of {"classpath*:META-INF/applicationContext-*.xml", "classpath*:META-INF/testContext-*.xml"}, and my runtime has a config location of {"classpath*:META-INF/applicationContext-*.xml", "classpath*:META-INF/runtimeContext-*.xml"}. When I need to add components, I always add them to the mainline, unless there is a situation like you name here, which would be split up accordingly.
Paul
A useful tip - thanks! One problem - the right hand side of the code snippet is getting truncated (both in Firefox & IE). I managed to pluck the code from the html source anyway :)
Frode Reinertsen
Nice tip! Just want to mention that in my version av Acegi, 1.0.3, there has been some renaming: SecureContextImpl --> SecurityContextImpl ContextHolder --> SecurityContextHolder
Anna Skawińska
Thanks a lot! You saved me lots of experimenting! And thank Frode Reinertsen, too :)
Phil Haigh
As of acegi 0.9.0, ContectHolder is now SecurityContextHolder... Other than that an excellent article and yes, saved me lots of time too... which I burnt reading soem of your other posts ;-)

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Comments are moderated, and will not appear until the author has approved them.