You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am converting over from another test framework, and it has a convenience method where I can assert on each item in a collection. I couldn't find anything obvious with tunit assertions through intellisense, and so I'm left with this:
await Assert.That(someListOfItems).IsNotEmpty();
foreach(var item in someListOfItems)
{
await Assert.That(item).IsNotNull();
}
Is there an easier way to do this without the foreach statement?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am converting over from another test framework, and it has a convenience method where I can assert on each item in a collection. I couldn't find anything obvious with tunit assertions through intellisense, and so I'm left with this:
Is there an easier way to do this without the foreach statement?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions