Skip to content

IgnoreCase, Seconds and Minutes can be used on numerical constraints #4874

Description

@OsirisTerje

Currently the following is allowed by the compiler, thought it is warned by the NUnit.Analyzer:

   Assert.That(42,Is.EqualTo(42).IgnoreCase  // Raises NUnit2008 warning.   IgnoreWhitespace
   Assert.That(42,Is.EqualTo(42).IgnoreWhiteSpace);
   Assert.That(42,Is.EqualTo(42).Minutes  // Seconds also allowed.  Doesn't raise any Analyzer warnings.

The compiler should report these as errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions