Advertisement
pszczyg

Untitled

Jul 1st, 2017
517
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1.         [Test]
  2.         public void Smock_Can_Mock_Static_Properties()
  3.         {
  4.             Smock.Run(context =>
  5.             {
  6.                 context.Setup(() => DateTime.Now).Returns(new DateTime(2017, 5, 5));
  7.  
  8.                 var dateNow = DateTime.Now;
  9.                 Assert.That(dateNow, Is.EqualTo(new DateTime(2017, 5, 5)));
  10.             });
  11.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement