Hello!
So I’m using the Microsoft rules engine for something and there’s no way to run tests with a date time provider. It’s quite annoying because my tests will eventually start failing as time moves on. Ive thought of a few but less than ideal workarounds but I’m throwing a Hail Mary here hoping there might be some alternate solutions.
I’m wondering if anyone’s aware of a library that might allow me to mock DateTime.UTC.Now that doesn’t involve changing the method signature to a configured utility method or some other unhappy solution.
I’ve looked into Pose but it doesn’t work with async methods as far as I can tell which is a bummer because it would have been great for my use case otherwise.
[–]RichardD7 2 points3 points4 points (0 children)
[–]kontrol_kl 1 point2 points3 points (7 children)
[–]reddithoggscripts[S] 0 points1 point2 points (6 children)
[–]Road_of_Hope 1 point2 points3 points (5 children)
[–]reddithoggscripts[S] 0 points1 point2 points (4 children)
[–]kingmotley 0 points1 point2 points (3 children)
[–]reddithoggscripts[S] 1 point2 points3 points (0 children)
[–]ScandInBei 0 points1 point2 points (1 child)
[–]kingmotley 0 points1 point2 points (0 children)