public async Task ReturnSelectedWhenCompleted() { (await SlowCollection.SelectAsync(i => i.ToString())).Should().ContainInOrder(new string[] { "1", "2", "3", "4" }); }
public async Task ReturnFirstWhenCompleted() { (await SlowSingleItemCollection.FirstAsync()).Should().Be(1); (await SlowCollection.FirstAsync()).Should().Be(1); }
public async Task ReturnFilteredWhenCompleted() { (await SlowCollection.WhereAsync(i => i % 2 == 0)).Should().OnlyContain(i => i % 2 == 0); }
public async Task ReturnSingleWhenCompleted() { (await SlowSingleItemCollection.SingleAsync()).Should().Be(1); ((Func <Task>)(async() => await SlowCollection.SingleAsync())).Should().Throw <InvalidOperationException>(); }