Skip to content

First draft of upgrade guide for Mockito 3.0 #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 21, 2018

Conversation

srawlins
Copy link
Member

No description provided.

`eatFood()`, nor a bool as `hungry:`, which is what the method expects.
Instead, Mockito passes an ArgumentMatcher, a completely different object from
a String or bool! This is no longer allowed in Dart 2. As an interim solution,
Mockito 1.0.0 sports an awkward `typed` function, which wraps other Mockito
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this true, was it just for Mockito 2.x, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mockito 1 is when we introduced typed. Mockito 2 is when you un-exported spy.

@srawlins srawlins merged commit 2384ccc into dart-lang:master Feb 21, 2018
@srawlins srawlins deleted the doc-to-3 branch February 21, 2018 00:57
srawlins added a commit that referenced this pull request Apr 16, 2018
* master:
  Remove upper case constants (#113)
  Bump to 3.0.0-alpha+3 (#112)
  Switch back to Chrome for Travis (#104)
  Try using a staged, fancy travis config. (#100)
  Update travis script to actually run dartanalyzer (#102)
  verify*Interactions methods throw helpfully that they expect Mock (#92)
  First draft of upgrade guide for Mockito 3.0 (#96)
  Generic support for `thenReturn` and `thenAnswer` (#101)
  Remove references to `@proxy`. (#99)
  Remove Spy docs (#97)
  Remove mirrors implementation (#91)
mosuem pushed a commit to dart-lang/test that referenced this pull request Oct 17, 2024
First (perhaps final) draft of upgrade guide
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants