Hello,

the attached test will print "20" twice with the initial 3.6 version -
but the behavior has changed - now it will print "20" and "0". What
I'm interested in - what is/was the intended/correct behavior?

Was this a side effect of the two attached changesets? At least at my
interpretation it was - but that doesn't need to mean that the old
behavior was correct.

I'll try to write a patch for ProxyInstance.cs that considers only the
Name and the Type of a property. Sounds this like a reasonable
solution?

Br,

Andreas

public interface IReadOnly
  {
    int MyProperty { get; }
  }

  public interface IWriteable : IReadOnly
  {
    new int MyProperty { get; set; }
  }

  [TestFixture]
  public class Class1
  {
    [Test]
    public void ExplorationTest()
    {
      var proc = MockRepository.GenerateStub<IWriteable>();
      proc.MyProperty = 20;

      Console.WriteLine(proc.MyProperty);
      Console.WriteLine(((IReadOnly)proc).MyProperty);
    }
  }

This revision leads to a implicit implementation of the interface in
the proxy - and therefore enables the distinction of the "two"
properties.

Revision: 625425fda3055d3ffb5161329c7767ef8395b7f5
Author: Tim Barcz
Date: 09.09.2009 20:17:15
Message:
Updated Castle.Core and Castle.DynamicProxy2 dlls to version running
on the trunk. This is in efforts to fix bug around
BadImageFormatException when mocking some interfaces (ie.
IUnityContainer)


----
Modified : Rhino.Mocks.Tests/Expectations/AnyArgsExpectationTests.cs
Modified : Rhino.Mocks.Tests/MockRepositoryTests.cs
Modified : Rhino.Mocks.Tests/MockingClassesTests.cs
Modified : Rhino.Mocks.Tests/MockingDelegatesTests.cs
Modified : Rhino.Mocks.Tests/Rhino.Mocks.Tests 3.5.csproj
Modified : SharedLibs/Castle.Core.dll
Modified : SharedLibs/Castle.DynamicProxy2.dll

And this revision enables the distinction in RhinoMocks - it's funny
that this is the older revision, meaning that the breaking change was
a side effect of the subsequent DynamicProxy update ;-)

Revision: 884e302fa4981ef344dd85a665711606515b3f43
Author: Ayende Rahien
Date: 01.09.2009 14:01:40
Message:
Removing old release.cmd file

Patch from Alexander Groß, fixing an issue with stubbing properties of
generic interfaces implemented twice using different generic
parameters
----
Added : Rhino.Mocks.Tests/FieldsProblem/FieldProblem_Alex.cs
Modified : Rhino.Mocks.Tests/Rhino.Mocks.Tests 3.5.csproj
Modified : Rhino.Mocks/Impl/ProxyInstance.cs
Deleted : release.cmd

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rhinomocks?hl=en.

Reply via email to