Cactus Against False Objects (jMock, Easy mock)

I am a little confused with Cactus and mock objects (jMock, Easy mock).

Can anyone answer the following questions?

  • When to use Cactus for testing?
  • When not to use Cactus for testing?
  • When to use layouts for testing?
  • When not to use layouts for testing?
+3
source share
2 answers

Well, there is no objective answer to this question, but the false objects concern testing the behavior of your code, but they cannot tell you whether you are interacting correctly with the container.

, , , , , (, , , , , ).

, , , x, x. , x .

, , . TDD, - . , , , , , / , , .

, , , , , mocks , .

Mock, Cactus, , , , , , .

+4

Cactus ?

( ). . , , ... .

Cactus ?

, ( , , Cactus).

?

unit test - . , .

?

(.. ), ..

Mock Objects vs In-Container - Cactus .

+3

Source: https://habr.com/ru/post/1740951/


All Articles