Quantcast
Channel: Fluent Assertions
Viewing all articles
Browse latest Browse all 1402

Closed Issue: Should().NotBeEmpty() enumerates whole collection [10362]

$
0
0
I have a service that returns IEnumerable<T> one by one very slowly (or even returns stream that never ends).
I want to test that it actually returns something so I do

service.GetAll().Should().NotBeEmpty();

and it does not complete until it enumerates the whole result. I could do Take(1) but I would rather fix NotBeEmpty method if possible.
Comments:


Viewing all articles
Browse latest Browse all 1402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>