deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jérôme Pochat <jpoc...@axway.com>
Subject CDITestRunner and mocks
Date Tue, 15 Sep 2015 14:25:02 GMT
Hi DeltaSpike users

I'm facing issue with running multiple unit tests with CDITestRunner:
- CDI container is not restarted between tests because ScanService consumes lot of time as
there a lot of tests.
- Foo service depends on Bar service
- Foo and Bar are ApplicationScoped services

Foo unit test:
- inject Foo reference
- register Bar mock using ApplicationMockManager

Bar unit test:
- inject Bar reference ==> previous Bar mock is injected :-(

How to unregister ApplicationScoped mock from CDI container?

Any tips that could help me?
Thanks in advance.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message