8000 Make `VerifyAll` ignore setups from `SetupAllProperties` by stakx · Pull Request #684 · devlooped/moq · GitHub
[go: up one dir, main page]

Skip to content

Make VerifyAll ignore setups from SetupAllProperties - #684

Merged
stakx merged 3 commits into
devlooped:masterfrom
stakx:setupallproperties-verifyall
Sep 5, 2018
Merged

stakx merged 3 commits into
devlooped:masterfrom
stakx:setupallproperties-verifyall

Conversation

@stakx
@stakx stakx commented Sep 5, 2018 •
Copy link
Copy Markdown
Contributor

This resolves #681 (and fixes both #191 and #556) by making VerifyAll ignore the setups registered by SetupAllProperties.

This adds a test demonstrating that `SetupAllProperties` as it is
currently implemented makes `VerifyAll` fail. `SetupAllProperties`
registers a setup for each and every property accessor, requiring the
user to invoke every one of those to make `VerifyAll` pass. This ren-
ders `VerifyAll` rather useless in practice.
Those property accessors that are auto-implemented by `SetupAllProper-
ties` no longer need to be invoked in order to pass verification by
`VerifyAll`. (This is easily implemented now that setups verify them-
selves, because for auto-implemented property accessors we have two
dedicated setup types.)
@stakx stakx added this to the 4.10.0 milestone Sep 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Does SetupAllProperties actually create any setups, or does it not?

1 participant

0