Skip to content

Conversation

@dennisdoomen
Copy link
Member

This implements the functionality as suggested by @jnyrup in #876.

  • If both subject and expectation are DateTimes, use the Using
  • If WithAutoConversion is enabled, try to convert subject into the type of expectation
  • If, after conversion, both the converted subject and the expectation are DateTimes, use the Using

Also fixes the API approval script.

@dennisdoomen dennisdoomen requested a review from jnyrup February 19, 2020 19:55
@dennisdoomen dennisdoomen force-pushed the Fix/ConversionOfCustomRules branch from 36163e8 to d0a1245 Compare February 19, 2020 20:02
* If both subject and expectation are DateTimes, use the Using
* If WithAutoConversion is enabled, try to convert subject into the type of expectation
* If, after conversion, both the converted subject and the expectation are DateTimes, use the Using

fixup! Using/When in BeEquivalentTo will respect the conversion rules.
@dennisdoomen dennisdoomen force-pushed the Fix/ConversionOfCustomRules branch from d0a1245 to 25e39bd Compare February 22, 2020 13:55
@dennisdoomen dennisdoomen requested a review from jnyrup February 22, 2020 13:57
@dennisdoomen dennisdoomen force-pushed the Fix/ConversionOfCustomRules branch from 25e39bd to 1d51f5c Compare February 22, 2020 16:02
@dennisdoomen dennisdoomen merged commit fee487d into fluentassertions:develop Feb 23, 2020
@dennisdoomen dennisdoomen deleted the Fix/ConversionOfCustomRules branch February 23, 2020 07:47
@jnyrup jnyrup linked an issue Feb 23, 2020 that may be closed by this pull request
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.

TryConversionStep executing after Using statements

2 participants