I want to mock DAO bean using Springockito in one of my IT. In my IT I have to use spring context.xml to autowire some services and also mockApplication.xml to mock the DAOs. So, how can I use both the xml configuration files at the same time?
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(loader = SpringockitoContextLoader.class, locations = {"classpath*:/MockApplicationContext.xml"})
public class PayRollComponentFacadeIT {
@Autowired
IPayRollComponentFacade payRollComponentFacade;
@ReplaceWithMock
@Autowired
IPayRollPersistenceManager payRollPersistenceManager;
I have included mock context as @ContextConfiguration(loader = SpringockitoContextLoader.class, locations = {"classpath*:/MockApplicationContext.xml"})
But I have to include the spring context also @ContextConfiguration(locations = {"classpath*:/testApplicationContext.xml"})
Regards Rajib