Skip to content

Exception With Property Expectations in Verify() #171

@JasonBock

Description

@JasonBock

If I have this code:

public interface IData
{
  string Value { get; set; }
}

var rock = Rock.Create<IData>();
rock.Properties().Setters().Value("3");

var chunk = rock.Instance();

rock.Verify();

I should get a VerificationException, but what I get is:

System.InvalidOperationException: Sequence contains more than one element

This is because in TypeExtensions.GetMemberDescription(), I'm assuming I'll always get only one MemberIdentifierAttribute, and for a property that is read/write, that's not true.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions