Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(447)

Issue 10855128: Added ability to reset Mocks. (Closed)

Created:
8 years, 4 months ago by gram
Modified:
8 years, 4 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Added ability to reset Mocks. Committed: https://code.google.com/p/dart/source/detail?r=10588

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -1 line) Patch
M lib/unittest/mock.dart View 2 chunks +22 lines, -1 line 0 comments Download
M tests/lib/unittest/mock_test.dart View 1 1 chunk +31 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
gram
8 years, 4 months ago (2012-08-13 17:04:30 UTC) #1
Siggi Cherem (dart-lang)
lgtm https://chromiumcodereview.appspot.com/10855128/diff/1/lib/unittest/mock.dart File lib/unittest/mock.dart (right): https://chromiumcodereview.appspot.com/10855128/diff/1/lib/unittest/mock.dart#newcode1441 lib/unittest/mock.dart:1441: void resetBehavior() => _behaviors.clear(); do you expect people ...
8 years, 4 months ago (2012-08-13 17:09:12 UTC) #2
gram
8 years, 4 months ago (2012-08-13 17:26:58 UTC) #3
https://chromiumcodereview.appspot.com/10855128/diff/1/lib/unittest/mock.dart
File lib/unittest/mock.dart (right):

https://chromiumcodereview.appspot.com/10855128/diff/1/lib/unittest/mock.dart...
lib/unittest/mock.dart:1441: void resetBehavior() => _behaviors.clear();
On 2012/08/13 17:09:12, sigmund wrote:
> do you expect people will want to call these separately
> (resetBehavior/clearLogs)? ow, make them private?

Yes. For example, I may want to set up the behavior once with 'alwaysReturn'
actions, then do some tests, verify, clear logs, do more tests, verify, etc. So
I do think they are orthogonal.

Powered by Google App Engine
This is Rietveld 408576698