Ok so let speak on real use cases for now. I didnt speak of anything theorical just than mocking means missing sthg and with tomee you never need it so better to not start by it. Le 1 août 2015 21:07, "Alex Gout" <agg...@gmail.com> a écrit :
> Thanks for your comment. However, I'm still not certain what type of > testing you are talking about. For integration test, you are absolutely > right. However, integration tests only don't cut it if you want to really > test your product and its components. You can find numerous sites where you > can read about the importance of unit tests. > You don't always need mocks or stubs when writing unit tests, but sometimes > they will break a dependency you're not interested in for the test at hand > and you just want to mock or stub expected behaviour of that dependency, > UNLIKE you would do in an integration test which I think is your main > concern. > I don't have an example at the moment, I was just curious because I don't > see many unit tests using mocks. > > > On Sat, Aug 1, 2015 at 11:28 AM Romain Manni-Bucau <rmannibu...@gmail.com> > wrote: > > > Dont want to debate here but mocking internals is not really testing - it > > is ok for external systems cause you dont have the choice most of the > time. > > > > What do you want to mock? Maybe it would be easier this way. > > > > Le 1 août 2015 17:11, "Alex Gout" <agg...@gmail.com> a écrit : > > > > > > I can only assume you're talking about integration testing in which > case > > > you shouldn't use mocks (maybe stubs in some cases for example when > > relying > > > on 3rd party services). However, for solid unit testing using mocks is > > not > > > avoidable. > > > Your side note illustrates why unit tests are so important. > > > > > > On Sat, Aug 1, 2015 at 12:53 AM Romain Manni-Bucau < > > rmannibu...@gmail.com> > > > wrote: > > > > > > > Hi > > > > > > > > Le 1 août 2015 03:30, "Alex Gout" <agg...@gmail.com> a écrit : > > > > > > > > > > Hi, > > > > > > > > > > I created JIRA TOMEE-1618. Can someone check and assign to me > please? > > > > > > > > > > Also a question.. I don't see many unit tests that use mocks, only > a > > few > > > > > that use easymock. Is it a problem to introduce Mockito? > > > > > > > > > > > > > Why mocking? Just really test :p. Whell behind the joke the reality > is > > a > > > > mocked test doesnt gives you any guarantee so for me it is like not > > testing > > > > anything - sadly speaking from experience. > > > > > > > > Side note: arquillian and mvn modules can have additional tests. > > > > > > > > > -Alex > > > > > > >