Hello,
I have the following code, as a test, but it is not working at all.
var timer1 = new Timer(500);
Mock.Arrange(() => new Timer(Arg.IsAny<double>())).Returns(timer1);
var sameTimer = new Timer(200);
Assert.AreEqual(timer1,sameTimer);
The use case, is that we have lots of timers in our legacy code that need mocking. They are not injected so I would like to override the constructor if possible and return a different object. Is this doable?
Thanks
Phillip Davis