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

Unified Diff: pkg/typed_mock/lib/typed_mock.dart

Issue 324083005: Add 'resetInteractions' into typed_mock. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/typed_mock/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/typed_mock/lib/typed_mock.dart
diff --git a/pkg/typed_mock/lib/typed_mock.dart b/pkg/typed_mock/lib/typed_mock.dart
index ab962d45cd22bc3c6a3e9c2cf858c462f11e7c17..180ff2773ed823dbe41c93d3848f4eef2177aca5 100644
--- a/pkg/typed_mock/lib/typed_mock.dart
+++ b/pkg/typed_mock/lib/typed_mock.dart
@@ -39,6 +39,14 @@ Behavior when(_ignored) {
}
}
+
+/// Clears all interactions remembered so far.
+resetInteractions(TypedMock mock) {
+ mock._invocations.clear();
+ mock._verifiedInvocations.clear();
+}
+
+
/// Verifies certain behavior happened a specified number of times.
Verifier verify(_ignored) {
try {
« no previous file with comments | « no previous file | pkg/typed_mock/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698