Skip to content

Assorted v8 improvements #1677

@lg2de

Description

@lg2de

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions