Skip to content

Logic changed between depricated Guard.Against.AgainstExpression(...) and new Guard.Against.Expression(...) #356

@egreiner

Description

@egreiner

Logic inverted between
GuardAgainstExpression.cs
and
GuardAgainstExpressionDeprecated.cs

before it was:
if (!func(input)) throw
now it's:
if (func(input)) throw

in tests:
before it was :
"Value is not equal to 10"
now it's:
"Value cannot be 10"

should imho be mentioned in
[Obsolete("Deprecated: Switch to Expression for validation.")]

  • .NET SDK Version:
    all

Steps to Reproduce:

  1. look at the tests for GuardAgainstExpression and GuardAgainstExpressionDeprecated

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