Skip to content

InitializingHomePageViewModel_WhenSuccessfull_UpdatesVideos throws NotSupportedException #1

@StephenHidem

Description

@StephenHidem

Occurs when executing unit test InitializingHomePageViewModel_WhenSuccessfull_UpdatesVideos.

Expected: Unit test passes.
Actual: Unit test throws exception "System.NotSupportedException : Calling Equals on Assertion classes is not supported.".

Discussion: FluentAssertions NumericAssertions were updated early 2022 to override the Equals method and throw this exception. The authors of FluentAssertions deemed that the implicit Equals method should not be used.

Resolution: Replace the following line -
viewModel.Videos.Count.Should().Equals(videos.Count());
with -
viewModel.Videos.Count.Should().Be(videos.Count());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions