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

Property behaviour for indexers don't work #53

Closed
dtchepak opened this issue Aug 17, 2011 · 2 comments
Closed

Property behaviour for indexers don't work #53

dtchepak opened this issue Aug 17, 2011 · 2 comments
Labels
bug Reported problem with NSubstitute behaviour

Comments

@dtchepak
Copy link
Member

public interface IFoo { string this[string s] { get; set; } }

[Test]
public void Props()
{
    var foo = Substitute.For<IFoo>();
    foo["hi"] = "howdy";
    Assert.That(foo["hi"], Is.EqualTo("howdy"));
}

Thanks to @rbanks54 for the bug report.

dtchepak added a commit to dtchepak/NSubstitute that referenced this issue Aug 17, 2011
Plus minor clean up of acceptance tests.
dtchepak added a commit to dtchepak/NSubstitute that referenced this issue Aug 18, 2011
Fixes main problem with nsubstitute#53, but still need to get arg matchers working
  with this syntax.
@dtchepak
Copy link
Member Author

Fixed, including for arg specs, as of 2366bc1.

@rbanks54
Copy link
Contributor

Thanks :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reported problem with NSubstitute behaviour
Projects
None yet
Development

No branches or pull requests

2 participants