From 4d1054fcd86eaf42873e2800198828c353db0bfb Mon Sep 17 00:00:00 2001 From: Keith Dahlby Date: Sun, 19 Sep 2010 12:47:09 -0500 Subject: [PATCH] Failing test: mocked delegate's Target should not include the delegate type in ImplementedTypes --- .../FieldsProblem/FieldProblem_KeithD.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Rhino.Mocks.Tests/FieldsProblem/FieldProblem_KeithD.cs b/Rhino.Mocks.Tests/FieldsProblem/FieldProblem_KeithD.cs index 498494f5..5b2f8775 100644 --- a/Rhino.Mocks.Tests/FieldsProblem/FieldProblem_KeithD.cs +++ b/Rhino.Mocks.Tests/FieldsProblem/FieldProblem_KeithD.cs @@ -1,10 +1,22 @@ namespace Rhino.Mocks.Tests.FieldsProblem { using System; + using Rhino.Mocks.Interfaces; using Xunit; public class FieldProblem_KeithD { + [Fact] + public void ImplementedTypesOfTargetOfMockedDelegateDoesNotContainDelegateType() + { + var mockDelegate = MockRepository.GenerateMock(); + + var mockTarget = mockDelegate.Target as IMockedObject; + + Assert.NotNull(mockTarget); + Assert.DoesNotContain(typeof(EventHandler), mockTarget.ImplementedTypes); + } + [Fact] public void CanStubReturningAnonymousDelegateTwice() {