pszczyg

Untitled

Jul 1st, 2017
305
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.         }
RAW Paste Data