Skip to content

Commit

Permalink
Use collection property count access
Browse files Browse the repository at this point in the history
  • Loading branch information
FreeApophis committed Nov 29, 2023
1 parent e627042 commit 808675e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Funcky.Async.Test/AsyncSequence/CycleRangeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public async Task CycleRangeEnumeratesUnderlyingEnumerableOnlyOnceAsync()
await using var cycleRange = AsyncSequence.CycleRange(enumerateOnce);

await cycleRange
.Take(sequence.Count() * 3)
.Take(sequence.Count * 3)
.ForEachAsync(NoOperation<string>);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public async Task GivenASequencePairWiseReturnsTheElementsPairwise()
var asyncSequence = Enumerable.Range(0, numberOfElements).ToAsyncEnumerable();

var pairs = await asyncSequence.Pairwise().ToListAsync();
Assert.Equal(numberOfElements - 1, pairs.Count());
Assert.Equal(numberOfElements - 1, pairs.Count);

foreach (var (pair, index) in pairs.Select((pair, index) => (pair, index)))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ public Property AShuffleHasTheSameElementsAsTheSource(List<int> source)

[Property]
public Property AShuffleHasTheSameLengthAsTheSource(List<int> source)
=> (source.ToAsyncEnumerable().ShuffleAsync().Result.Count() == source.Count)
=> (source.ToAsyncEnumerable().ShuffleAsync().Result.Count == source.Count)
.ToProperty();
}

0 comments on commit 808675e

Please sign in to comment.