Hi,
I tried to do some MsCorLib Mocking following the Datetime.Now example (http://www.telerik.com/help/justmock/advanced-usage-mscorlib-mocking.html) and adjust it for Stopwatch.GetTimestamp().
But somehow it does not work - What do I miss?
Any help or hints would be great
Tobias
I tried to do some MsCorLib Mocking following the Datetime.Now example (http://www.telerik.com/help/justmock/advanced-usage-mscorlib-mocking.html) and adjust it for Stopwatch.GetTimestamp().
But somehow it does not work - What do I miss?
Any help or hints would be great
Tobias
[TestClass]public class MsCorlibFixture{ static MsCorlibFixture() { Mock.Replace(() => Stopwatch.GetTimestamp()).In<MsCorlibFixture>(x => x.ShouldAssertCustomValueForDateTime()); } [TestMethod] public void ShouldAssertCustomValueForDateTime() { Mock.Arrange(() => Stopwatch.GetTimestamp()).Returns(100); var now = Stopwatch.GetTimestamp() Assert.AreEqual(100, now); }}