e that has a unit test with Arquillian
> > working?
> > So far I have not been able to find a complete example of an integration
> > test using Tomee.
> >
> >
> >
> > --
> > View this message in context:
> >
> http://openejb.979440.n4.nabble.
n able to find a complete example of an integration
> test using Tomee.
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/OpenEJB-Mockito-unit-test-tp4657142p4657433.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Romain,
Is there a simple project with Tomee that has a unit test with Arquillian
working?
So far I have not been able to find a complete example of an integration
test using Tomee.
--
View this message in context:
http://openejb.979440.n4.nabble.com/OpenEJB-Mockito-unit-test
w.softplan.com.br
>
>
> -Mensagem original-
> De: Romain Manni-Bucau [mailto:rmannibu...@gmail.com]
> Enviada em: terça-feira, 11 de setembro de 2012 10:09
> Para: users@openejb.apache.org
> Assunto: Re: OpenEJB Mockito unit test
>
> some n
5, SCBCD 5
Pesquisa & Desenvolvimento
Softplan/Poligraph
+ 55 48 3027-8000
www.softplan.com.br
-Mensagem original-
De: Romain Manni-Bucau [mailto:rmannibu...@gmail.com]
Enviada em: terça-feira, 11 de setembro de 2012 10:09
Para: users@openejb.apache.org
Assunto: Re: OpenEJB Mockito unit test
some news:
application composer + mockito:
http://svn.apache.org/repos/asf/openejb/trunk/openejb/utils/openejb-mockito/src/test/java/org/apache/openejb/mockito/MockitoAndAppComposerTest.java
the idea is to provide a custom injector (for @EJB) and an extension is
automatically discovered for cdi
Currently no but should be pretty easy ;)
Not sure i can go further today but the idea is:
1) create an fallback injector with a map string/object you can feed
statically
2) implement getvalue method simply getting in the map the key i said before
3) return an instance in the test class with mocki
any basic sample to give it a try?
Very interesting BTW
JLouis
2012/9/5 Romain Manni-Bucau
> added org.apache.openejb.injection.FallbackPropertyInjector which should
> manage failling injections (so you can inject a mock) and in application
> composer you can return your injector annotating @Mo
added org.apache.openejb.injection.FallbackPropertyInjector which should
manage failling injections (so you can inject a mock) and in application
composer you can return your injector annotating @MockInjector a method.
i didnt test too much, was just trying to find a way which doesn't impact
the c
Nothing against it but here is my opinion,
JEE is designed to be testable so no need of any "complicated for nothing"
framework.
For me mockito answer to a different need.
For a cdi sample we have an example on trunk using alternatives ans
stereotypes.
- Romain
Le 31 août 2012 12:45, "Yann Blaz
I'm agree but tests with arquilian take more time than simple unit tests.
Le 31 août 2012 11:21, "Jean-Louis MONTEIRO" a écrit :
> Waiting for Romain's answer, but I guess it will be. Mocking is an old
> school solution ;-)
> Indeed, nowadays, and mainly thanks to EJB 3 lite, Arquillian, and so o
Waiting for Romain's answer, but I guess it will be. Mocking is an old
school solution ;-)
Indeed, nowadays, and mainly thanks to EJB 3 lite, Arquillian, and so on,
it's far easier to get simple integration tests. So the need to really
write unit tests is smaller.
Just some thoughts.
Romain is cur
Well, in fact I'm not sure to go in the right way.
I wan't to make the demonstration that jee6 can now replace spring.
One thing very interesting in spring is about that faculty to make
"unit-test" between real unit-test and integration tests with
@Configuration. I wanted to make the same thing.
I dont think so (the proxy). The need is more than it: vetoing a bean
deployment (not managed today i think) + mocking (i would like to avoid to
update core for this need)
- Romain
Le 31 août 2012 09:15, "Jean-Louis MONTEIRO" a écrit :
> Romain,
>
> maybe a proxy handler on top of the business i
Romain,
maybe a proxy handler on top of the business interface can do the trick.
Not sure it will work, but it should be able to provide any implementation
even a mock to a business interface.
The need is there, so that be great to have a look.
Any other ideas?
Jean-Louis
2012/8/30 Romain Mann
Hmm, not sure i get what is hard, never tried it but using alternative of
cdi or specialize should do the trick.
To use mockito you need to change deep in the code the way ejb are
instantiated+scanned (doable but i really think it is easier to mock an ejb
than using mockito)
Another lazy solution
Wo I'm studying applicationComposer code. It's difficult.
Why I want to use mockito ? Simply because I wan't to make some unit tests
without have to get all.
For example I wan't to test a business service, a stateless ejb. This one
use another one that make some things with mms, databases and oth
Mockito is more easy to use than extends the ejb class.
I will search for a way to make that works.
2012/8/28 Romain Manni-Bucau
> Hi,
>
> Generally we mock services replacing them by child or another
> implementation so no need of mockito and you keep injection
> consistent...but you can use m
Hi,
Generally we mock services replacing them by child or another
implementation so no need of mockito and you keep injection
consistent...but you can use mockito to implement this other class with a
kind of delegate pattern.
- Romain
Le 28 août 2012 16:19, "Yann Blazart" a écrit :
> Hi , is th
Hi , is there a way to use Mockito instance with Application composer for
unit tests ?
For example here, is there a solution to use the mockito instance for the
EjbJar ? :
> @RunWith(ApplicationComposer.class)
> public class EchoServiceTest {
>
> @Mock
> private DummyService dummyService
20 matches
Mail list logo