Skip to content

double?.Should().BeApproximately is looking for a float? #922

@ravensorb

Description

@ravensorb

I am using 5.4.2 and trying to work with both double and double? type data elements

double? d1 = 1.0123;
double expected = 1.01;

d1.Should().BeApproximately(expected, 1.0); <-- this extension doesn't exist
d1.Value.Should().BeApproximately(expected, 1.0) <-- complains that "expected" should be float

Shouldn't both work?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions