Replies: 2 comments 1 reply
-
Hey @0xfded you just need support for custom messages? I've mostly built this I've just been trying to work out the best way to expose this on the API in combination with chaining without making it too messy. Which might not actually be possible. I'll take a look. If I can't think of a way to improve it I'll just open up a method "With message" that returns the same assertion but with your overridden message. If that would solve your issue? |
Beta Was this translation helpful? Give feedback.
-
Hi @thomhurst , thanks for the quick reply. I understand wanting to keep the API clean and intuitive. If I'm the only person that is missing having additional context for failures, maybe I'm not writing good unit tests 😄. I've written a lot of tests that iterate through structures and have found it helpful to be able to easily identify the object that was involved in the failure. Rather than making a quick fix, perhaps we can leave this open for a bit and see if anyone else needs it or has suggestions on how to handle these situations. In the meantime, I'll continue to work with the framework, maybe I'm just not approaching the problem correctly. |
Beta Was this translation helpful? Give feedback.
-
Is there a way to display more information on an assertion failure? In particular when you're in a loop it's helpful to know what item or index caused the failure.
In the example below, there's really no way to know from the failure which sector was involved.
NUnit has something like:
Assert.That(fmgr.VTOC.IsSectorFree(sector), Is.False, $"Sector {sector} is marked free.");
PS - the framework is awesome, thanks for sharing it. It's fast and has so many options.
Beta Was this translation helpful? Give feedback.
All reactions