Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call description is wrong when asserting a call to a property setter #1298

Closed
thomaslevesque opened this issue Feb 3, 2018 · 1 comment
Closed
Labels
Milestone

Comments

@thomaslevesque
Copy link
Member

thomaslevesque commented Feb 3, 2018

Consider this code:

public interface IFoo {  int Bar { get; set; } }
public void Test()
{
    var foo = A.Fake<IFoo>();
    foo.Bar = 0;
    A.CallToSet(() => foo.Bar).To(42).MustHaveHappened();
}

As expected, this throws an ExpectationException, but the call description in the exception message is wrong:

Assertion failed for the following call:
    Castle.Proxies.ObjectProxy_12.set_Bar(value: 42)
  Expected to find it once or more but didn't find it among the calls:
    1: UserQuery+IFoo.Bar = 0

It should say UserQuery+IFoo instead of Castle.Proxies.ObjectProxy_12. It works as expected for method calls and property getters, the issue seems to exist only for property setters.

@blairconrad
Copy link
Member

This change has been released as part of FakeItEasy 4.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants