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