Skip to content

Instantly share code, notes, and snippets.

@GraemeF
Created February 10, 2011 15:17
Show Gist options
  • Save GraemeF/820679 to your computer and use it in GitHub Desktop.
Save GraemeF/820679 to your computer and use it in GitHub Desktop.
Setup with NSubstitute
public class MyFixture
{
private readonly ICloseLogFileCommand _closeCommand = Substitute.For<ICloseLogFileCommand>();
private readonly ILog _log = Substitute.For<ILog>();
public MyFixture()
{
_log.Name.Returns(@"C:\Path\To\File.log");
_log.Count.Returns(42);
_log.Offset.Returns(TimeSpan.FromSeconds(69));
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment