Skip to content

Conversation

wonderful-panda
Copy link
Contributor

PAssertExtension was removed at d435d5d.

My recommendation is that this class becomes a code snippet
that anyone can add to their own test library if they want the syntactic sugar

I understand what you mean.
But when I write it in my own library, PAssert can't detect TestClass and caller location correctly.

So, I want to add optional argument location to each APIs.

use case:

public static void Should<T>(this T target, Expression<Func<T, bool>> expression)
{
    var f = new StackTrace(0, true).GetFrame(1);
    var location = new CallerLocation(f);
    PAssert.IsTrue(target, expression, location: location);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant