Open MelbourneDeveloper opened 2 years ago
I'm trying to get a basic sample working and I'm having difficulties. So, I added this test case to the existing unit tests:
[TestMethod] public void TestReplace2() { var expected = new DateTime(1999, 12, 31, 23, 59, 59); DateTime? actual = null; PoseContext.Isolate(() => actual = DateTime.Now, Shim.Replace(() => DateTime.Now). With(() => expected)); Assert.AreEqual(expected, actual.Value); }
This fails. Am I doing something wrong, or is this a bug?
Assert.AreEqual failed. Expected:<31/12/1999 11:59:59 PM>. Actual:<25/10/2021 7:41:25 AM>.
@MelbourneDeveloper What version of Pose were you using?
As mentioned in tonerdo/Pose#79 there is a bug in versions above 1.1.0. Please see my comment there.
Please see my comment on #63
I'm trying to get a basic sample working and I'm having difficulties. So, I added this test case to the existing unit tests:
This fails. Am I doing something wrong, or is this a bug?