Created
July 30, 2012 15:36
-
-
Save jfojtl/3207874 to your computer and use it in GitHub Desktop.
This should pass, right? http://ayende.com/wiki/RecursiveMocksGuidance.ashx - but it fails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Rhino.Mocks; | |
using Xunit; | |
namespace ClassLibrary1 | |
{ | |
public class RhinoMocksRecursiveMocking | |
{ | |
[Fact] | |
public void RecursiveMocksTesting() | |
{ | |
var complicatedSUT = MockRepository.GenerateStub<IFirstDep>(); | |
Assert.Equal(complicatedSUT.SecondDep.Name, string.Empty); | |
} | |
} | |
public interface IFirstDep | |
{ | |
ISecondDep SecondDep { get; set; } | |
} | |
public interface ISecondDep | |
{ | |
string Name { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment