Skip to content
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

Assorted v7 improvements #1677

Open
1 of 14 tasks
lg2de opened this issue Sep 1, 2021 · 2 comments
Open
1 of 14 tasks

Assorted v7 improvements #1677

lg2de opened this issue Sep 1, 2021 · 2 comments
Milestone

Comments

@lg2de
Copy link
Contributor

lg2de commented Sep 1, 2021

After release of V6 there are issues reported which cannot be (completely) realized before V7 because of breaking changes.
This issue lists all pending changes including link to related issue(s). It will be updated permanently.

  • Make ComparableAssertions more generic - draft
  • Remove GreaterOrEqualTo (obsolete) methods replaced by GreaterThanOrEqualTo (Change names of "OrEqualTo" assertion methods #1673)
  • In EquivalentValidator replace the last IEquivalencyStep with a hard-coded assertion to replace the NotImplementedException. See https://github.com/fluentassertions/fluentassertions/blob/master/Src/FluentAssertions/Equivalency/EquivalencyValidator.cs#L76
  • Rename RespectingRuntimeTypes to RespectingRuntimeTypeProperties or something like that. See Exception thrown when comparing empty types using 'BeEquivalentTo' with 'RespectingRuntimeTypes' set #1830. Also, it can be confusing because we also have IncludingAllRuntimeProperties and IncludingAllDeclaredProperties
  • Check whether assertions on AndWhichConstraint should be executed within AssertionScope after base assertion has failed. See discussion on Slack.
  • Refactor AsyncFunctionAssertions as "real" base class (preparation in Prepare constructors of AsyncFunctionAssertions to make them protected in V7 #1972).
  • Investigate if we can replace/aid CallerIdentifier using [CallerArgumentExpression].
    • sometimes it could also be useful to extract the variable name of the expected parameter.
    • this might also let us replace Expression<> with Func<>
    • investigate whether this works for .NET 4.8 as well
  • Consider renaming AssertionScope.Current to AssertionScope.ThreadInstance
  • Consider renaming FailWith since it does not always throw
  • Consider renaming ExcludingNestedObjects to something with recursive in it or deep vs shallow
  • Align terminology between "object graph comparison" in the docs vs "structural comparison" in the code.
  • Consider renaming "expected" to "expectation" and "unexpected" to ?, to use nouns instead of adjectives
  • Consider returning AndWhichConstraint from GenericCollectionAssertions.ContainItemsAssignableTo<T>
  • Consider making EquivalencyValidator and some other "internal" classes internal
@dennisdoomen
Copy link
Member

dennisdoomen commented Sep 1, 2021

Why not use a milestone for this?

@dennisdoomen dennisdoomen added this to the 7.0 milestone Sep 16, 2021
@dennisdoomen dennisdoomen changed the title Backlog for Version 7 Other minor v7 improvements Sep 16, 2021
@dennisdoomen dennisdoomen pinned this issue Jan 26, 2022
@jnyrup
Copy link
Member

jnyrup commented Mar 7, 2022

Some thoughts I think we should have in mind:
Just because SemVer allows us breaking everything doesn't mean we have to - or should.

The more exposed an API is, the more havoc breaking it will cause.
E.g. MemberFactory could probably be renamed without anyone noticing, but renaming Be to BeEqualTo would break compilation for ~all consumers of FA.

This discussion has some interesting points on this topic
https://www.youtube.com/watch?v=Os7Rpm3LBkE&t=1s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants