Is it possible to create custom Assertions for Unity Test Tools?

I’d like to create an assertion that works like the built in assertions.

For example:

Assert.AreNear(vectorA, vectorB, 0.01f); // doesn't exist

Right now I have to write it like this:

Assert.Less((vectorA - vectorB).magnitude, 0.01f); // readability is bad for complicated tests

I could define my own wrappers for Assert in some CustomAssertClass like this:

CustomAssertClass.AreNear(vectorA, vectorB, 0.01f); // editor brings you to the wrong spot

but when you click on a failed assertion from the editor, it doesn’t bring you to the test, it brings you to the CustomAssertClass, which is a pain in the butt.

Is there a clean way to extend the Assertions?

Hi NianticMortoc!
Currently there is no way as far as I know. It should be possible and I’ll give it a look at some point but can’t promise a date. Maybe we could somehow use DebuggerStepThroughAttribute.
Thanks for suggestion!
Tomek