mooli tayer has posted comments on this change.

Change subject: tests: Add simple mocking library
......................................................................


Patch Set 1: Code-Review+1

(1 comment)

....................................................
Commit Message
Line 11: environment for running.
Line 12: 
Line 13: MockCallable is using the record and play aprroach; After a mock is
Line 14: created, you tell it what calls to expect. If needed, you may specify
Line 15: the result of each call. The result may any return value or rasing an
The only thing missing for me is an ability to return something more complex 
then a static value - based on arguments. ( Actually I believe you've 
implemented a stub and not a mock, but nomenclature is always arguable... you 
can checkout this by martin fowler: 
http://martinfowler.com/articles/mocksArentStubs.html#TheDifferenceBetweenMocksAndStubs
 )
Line 16: exception.
Line 17: 
Line 18: When the mock is called by the code under test, it will raise a
Line 19: MockError as soon as it is called with unexpected arguments or keyword


-- 
To view, visit http://gerrit.ovirt.org/21155
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5d874f553b6a983652ed745d7d8554716e7a15e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: mooli tayer <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to