Skip to content

Instantly share code, notes, and snippets.

@ElemarJR
Created August 22, 2012 22:18
Show Gist options
  • Select an option

  • Save ElemarJR/3430003 to your computer and use it in GitHub Desktop.

Select an option

Save ElemarJR/3430003 to your computer and use it in GitHub Desktop.
[TestMethod]
public void Ctor_WhenShouldBeNow()
{
using (ShimsContext.Create())
{
ShimDateTime.NowGet = () => new DateTime(2012, 09, 06);
var entry = new LogEntry("Hello World!");
Assert.AreEqual(DateTime.Now, entry.When);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment