Skip to content
New issue

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

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

Already on GitHub? # to your account

chore(deps): bump Moq from 4.12.0 to 4.13.0 in /src/Templates/MvxNative/Shared/test/MvxNative.Core.Test #535

Conversation

dependabot-preview[bot]
Copy link
Contributor

Bumps Moq from 4.12.0 to 4.13.0.

Changelog

Sourced from Moq's changelog.

4.13.0 (2019-08-31)

Changed

  • Improved error message that is supplied with ArgumentException thrown when Setup or Verify are called on a protected method if the method could not be found with both the name and compatible argument types specified (@​thomasfdm, #852).

  • mock.Invocations.Clear() now removes traces of previous invocations more thoroughly by additionally resetting all setups to an "unmatched" state. (@​stakx, #854)

  • Consistent Callback delegate validation regardless of whether or not Callback is preceded by a Returns: Validation for post-Returns callback delegates used to be very relaxed, but is now equally strict as in the pre-Returns case.) (@​stakx, #876)

  • Subscription to mocked events used to be handled less strictly than subscription to regular CLI events. As with the latter, subscribing to mocked events now also requires all handlers to have the same delegate type. (@​stakx, #891)

  • Moq will throw when it detects that an argument matcher will never match anything due to the presence of an implicit conversion operator. (@​michelcedric, #897, #898)

  • New algorithm for matching invoked methods against methods specified in setup/verification expressions. (@​stakx, #904)

Added

  • Added support for setup and verification of the event handlers through Setup[Add|Remove] and Verify[Add|Remove|All] (@​lepijohnny, #825)

  • Added support for lambda expressions while creating a mock through new Mock<SomeType>(() => new SomeType("a", "b")) and repository.Create<SomeType>(() => new SomeType("a", "b")). This makes the process of mocking a class without a parameterless constructor simpler (compiler syntax checker...). (@​frblondin, #884)

  • Support for matching generic type arguments: mock.Setup(m => m.Method<It.IsAnyType>(...)). (@​stakx, #908)

    The standard type matchers are:

    • It.IsAnyType — matches any type
    • It.IsSubtype<T> — matches T and proper subtypes of T
    • It.IsValueType — matches only value types

    You can create your own custom type matchers:

    [TypeMatcher]
    class Either<A, B> : ITypeMatcher
    {
        public bool Matches(Type type) => type == typeof(A) || type == typeof(B);
    }
  • In order to support type matchers (see bullet point above), some new overloads have been added to existing methods:

    • setup.Callback(new InvocationAction(invocation => ...)),
      setup.Returns(new InvocationFunc(invocation => ...)):

      The lambda specified in these new overloads will receive an IInvocation representing the current invocation from which type arguments as well as arguments can be discovered.

    • Match.Create<T>((object argument, Type parameterType) => ..., ...),
      It.Is<T>((object argument, Type parameterType) => ...):

... (truncated)
Commits
  • a12fe5b Update version to 4.13.0
  • fff9464 Retire .xdoc XML documentation files (#916)
  • 3024c61 Merge pull request #915 from stakx/returnsasync-null
  • 50b5d0a Update the changelog
  • 6f8edce Add special handling for .ReturnsAsync(null)
  • 030f000 .ReturnsAsync(null): should interpret as value, not lambda
  • bf45f80 Merge pull request #914 from stakx/events
  • 429e870 Update the changelog
  • 3117d53 Add more tests re: event method resolution
  • 645c034 Represent events not by name only, but by their EventInfo
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

Bumps [Moq](https://github.com/moq/moq4) from 4.12.0 to 4.13.0.
- [Release notes](https://github.com/moq/moq4/releases)
- [Changelog](https://github.com/moq/moq4/blob/master/CHANGELOG.md)
- [Commits](devlooped/moq@v4.12.0...v4.13.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
@dependabot-preview dependabot-preview bot added the dependencies Pull requests that update a dependency file label Sep 2, 2019
@Plac3hold3r Plac3hold3r merged commit 0857dd7 into develop Sep 2, 2019
@dependabot-preview dependabot-preview bot deleted the dependabot/nuget/src/Templates/MvxNative/Shared/test/MvxNative.Core.Test/Moq-4.13.0 branch September 2, 2019 18:04
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant