Skip to content

Commit

Permalink
Failing test: mocked delegate's Target should not include the delegat…
Browse files Browse the repository at this point in the history
…e type in ImplementedTypes
  • Loading branch information
dahlbyk committed Sep 19, 2010
1 parent b2f15b6 commit 4d1054f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Rhino.Mocks.Tests/FieldsProblem/FieldProblem_KeithD.cs
Original file line number Diff line number Diff line change
@@ -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<EventHandler>();

var mockTarget = mockDelegate.Target as IMockedObject;

Assert.NotNull(mockTarget);
Assert.DoesNotContain(typeof(EventHandler), mockTarget.ImplementedTypes);
}

[Fact]
public void CanStubReturningAnonymousDelegateTwice()
{
Expand Down

0 comments on commit 4d1054f

Please sign in to comment.