Skip to content

Tighten public API + cleanup #39

Merged
TedSander merged 4 commits intodart-lang:masterfrom
thso:cleanup
Oct 4, 2016
Merged

Tighten public API + cleanup #39
TedSander merged 4 commits intodart-lang:masterfrom
thso:cleanup

Conversation

@thso
Copy link
Contributor

@thso thso commented Sep 29, 2016

Explicitly expose public methods in order not to leak internals and re-expose mockito_no_mirrors.dart from mockito.dart to ensure consistency.

Removes CannedResponse, InOrderVerification, Verification, RealCall, resetMockitoState from the public API since these are only meant to be used internally by Mockito.

  • simplify toString logic in RealCall,
  • have verifyInOrder take a List since taking a single argument would be an invalid usage,
  • other minor adjustments and dartfmt

@thso
Copy link
Contributor Author

thso commented Sep 29, 2016

Removing these from the public API is a breaking change, so we should bump the major version. I checked and there are no references at all to these internally in Google. Going forward we should be more careful with what's exposed.

WDYT @TedSander ?

@TedSander
Copy link
Contributor

I think this looks good, but yes please bump the major version as it does have breaking changes.

@TedSander
Copy link
Contributor

Please rebase. Matan just added matcher functionality that clients can use.

@matanlurey
Copy link
Contributor

+1. Thanks.

typedef dynamic Answering(Invocation realInvocation);

typedef VerificationResult Verification(matchingInvocations);
typedef VerificationResult _Verification(matchingInvocations);
Copy link
Member

Choose a reason for hiding this comment

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

I think this has to stay public, yes?

Verification verification = verify(foo.bar(captureAny));
var args = verification.captured;
verification.called(1);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, thanks.

@thso
Copy link
Contributor Author

thso commented Oct 3, 2016

PTAL @srawlins

@TedSander TedSander merged commit 44d8aca into dart-lang:master Oct 4, 2016
mosuem pushed a commit to dart-lang/test that referenced this pull request Oct 17, 2024
davidmorgan pushed a commit to dart-lang/build that referenced this pull request Mar 23, 2026
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.

4 participants