-
Notifications
You must be signed in to change notification settings - Fork 291
Open
Labels
Area: AssertionArea: MSTestIssues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)Issues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)State: Needs Approval
Description
I would instead suggest to fix the implementation of the APIs to use IComparable instead of IComparable<T> or use overload with Enum like:
public static void IsGreaterThan(Enum lowerBound, Enum value, string? message = "",
[CallerArgumentExpression(nameof(lowerBound))] string lowerBoundExpression = "",
[CallerArgumentExpression(nameof(value))] string valueExpression = "")
{
if (value.CompareTo(lowerBound) <= 0)
{
// throw assertion failure
}
}Originally posted by @Evangelink in #7206 (comment)
Metadata
Metadata
Assignees
Labels
Area: AssertionArea: MSTestIssues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)Issues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)State: Needs Approval