Is using layouts a good programming practice or just another way to do this?

Could you say that using layouts is better than using others? Is supervision only mocked in unit testing, or can it be used directly in the original project as a real object and switch it after?

I read here and there, and the most attractive thing about ridicule was the isolation of the layers.

+5
source share
3 answers

Could you say that using mocks is better than not using mocks?

Is driving a motorcycle better than driving a car? It depends on what you are trying to achieve :).

mocks?

Mocks . , / , , mocks - . ? , , , , - / .

, , - " " - , , . Mocks .

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

mocks ?

?

"" "" , ", - " ", .. .

, , . , . ( , ).

, , "", " ", - , , .

+2

mocks . A, B, , B ( /), A. , B , , .

. , , , .

. - . " ! Yaaaaay!" , / ...

+6

, , " ". .

.

/ , , . , /stubbing, , , , , , .

:

  • ClassA , .
  • ( , ).
  • , ClassA RepositoryM.
  • RepositoryM, ClassA.
  • , RepositoryM.
  • Darn, RepositoryM ServiceX .
  • ServiceX, RepositoryM, ClassA

... .

mocks - . , , .

.

Mocking/stubbing - .

+6

All Articles