Commit graph

4 commits

Author SHA1 Message Date
scheglov@google.com f133e5eded Add 'resetInteractions' into typed_mock.
1. I decided not to change the verifyZeroInteractions(TypedMock) API.
   There is an advantage in having it typed, such as (potentially) improved code completion.

   The drawback is that tests have to use MyClassMock type annotatino instead of MyClass.
   But TypedMock does not have any API, so it should not be a big problem.

2. It is impossible to distinguish 'get:foo' access from taking a reference to a method or property invocation.
   I guess it is intentional.
   We could probably distinguish them using mirrors, but typed_mock should work without mirrors.
   So, resetInteractions() should be used.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org//324083005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37191 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-10 18:23:25 +00:00
scheglov@google.com e30e380c3c Make matcher classes constant.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//318683003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37001 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-04 17:25:09 +00:00
scheglov@google.com 6fe362f666 Tweaks for typed_mock.
1. Force dynamic type for 'any*' matchers, now we propagate types of top-level variables and fields, so using these matchers causes hints.

2. Remove equals() matcher, in conflicts with the one from unittest.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org//311893002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36954 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-03 22:21:20 +00:00
scheglov@google.com 8efee14586 Add a top-level typed_mock package.
R=brianwilkerson@google.com, danrubel@google.com
BUG=

Review URL: https://codereview.chromium.org//281943002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36170 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-14 15:36:18 +00:00