Skip to content

Instantly share code, notes, and snippets.

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