I looked at JUnitStory code and replicated that in my custom Test class which also extends from AbstractTransactionalJUnit4SpringContextTests
Sathish On Sun, Feb 27, 2011 at 7:07 PM, Brian Repko <[email protected] > wrote: > > I'd suggest looking at the spring-security example for this. > > Brian > > ----- Original message ----- > From: "Sathish Kumar" <[email protected]> > To: [email protected] > Date: Sun, 27 Feb 2011 16:52:19 +0530 > Subject: [jbehave-user] Spring support for JBehave JUnitStory > > Hi, > I've got my story tests extend JUnitStory and an Embedder for running all > stories. > Now i can run tests during build using Embedder and individual tests in > IDE. > > I looked at the TraderEmbedderWithSpringJUnit4ClassRunner which adds Spring > integration. > Some of my story tests require Hibernate SessionFactory for data setup. > Since stories already extend JUnitStory, i can't extend > AbstractTransactionalJUnit4SpringContextTests and i'm not able to get > Autowiring working in Story tests. > > Is there a way to Autowire session factory or existing Spring beans when > running stories individually? > > Thanks, > Sathish > > --- > Brian Repko > LearnThinkCode, Inc. <http://www.learnthinkcode.com> > email: [email protected] > phone: +1 612 229 6779 >
