Skip to content

Invalid test operation #5

Open
Open
@NatMarchand

Description

@NatMarchand

Hi,
Your test operation is incorrect : it compares Path(target) with target.

The code should be :

protected override void Test(TestOperation operation)
{
    var existingValue = operation.Path.Find(_target);
    if (!existingValue.Equals(operation.Value))
    {
        throw new InvalidOperationException("Value at " + operation.Path.ToString() + " does not match.");
    }
}

Note: I'm unable to make a PR from where I'm writing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions