Re[4]: А кто такие моки?
От: andrey.t  
Дата: 04.07.08 17:36
Оценка: 26 (1) +1
Здравствуйте, Геннадий Васильев, Вы писали:

>>> А кто такие моки?

.>>http://en.wikipedia.org/wiki/Mock_object

ГВ>Заглушка, короче говоря.


Не совсем http://martinfowler.com/articles/mocksArentStubs.html

* Dummy objects are passed around but never actually used. Usually they are just used to fill parameter lists.
* Fake objects actually have working implementations, but usually take some shortcut which makes them not suitable for production (an in memory database is a good example).
* Stubs provide canned answers to calls made during the test, usually not responding at all to anything outside what's programmed in for the test. Stubs may also record information about calls, such as an email gateway stub that remembers the messages it 'sent', or maybe only how many messages it 'sent'.
* Mocks are what we are talking about here: objects pre-programmed with expectations which form a specification of the calls they are expected to receive.


чуть ниже более конкретно:

There is a difference in that the stub uses state verification while the mock uses behavior verification.

... << RSDN@Home 1.2.0 alpha rev. 783>>
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.