File tree Expand file tree Collapse file tree 1 file changed +26
-2
lines changed
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public void Repeat_Null()
1818 }
1919
2020 [ Fact ]
21- public async Task Repeat1Async ( )
21+ public async Task Repeat_Many ( )
2222 {
2323 var xs = AsyncEnumerable . Repeat ( 2 , 5 ) ;
2424
@@ -32,12 +32,36 @@ public async Task Repeat1Async()
3232 }
3333
3434 [ Fact ]
35- public async Task Repeat2Async ( )
35+ public async Task Repeat_Zero ( )
3636 {
3737 var xs = AsyncEnumerable . Repeat ( 2 , 0 ) ;
3838
3939 var e = xs . GetAsyncEnumerator ( ) ;
4040 await NoNextAsync ( e ) ;
4141 }
42+
43+ [ Fact ]
44+ public async Task Repeat_Count ( )
45+ {
46+ var xs = AsyncEnumerable . Repeat ( 2 , 5 ) ;
47+
48+ Assert . Equal ( 5 , await xs . CountAsync ( ) ) ;
49+ }
50+
51+ [ Fact ]
52+ public async Task Repeat_ToArray ( )
53+ {
54+ var xs = AsyncEnumerable . Repeat ( 2 , 5 ) ;
55+
56+ Assert . Equal ( Enumerable . Repeat ( 2 , 5 ) , await xs . ToArrayAsync ( ) ) ;
57+ }
58+
59+ [ Fact ]
60+ public async Task Repeat_ToList ( )
61+ {
62+ var xs = AsyncEnumerable . Repeat ( 2 , 5 ) ;
63+
64+ Assert . Equal ( Enumerable . Repeat ( 2 , 5 ) , await xs . ToListAsync ( ) ) ;
65+ }
4266 }
4367}
You can’t perform that action at this time.
0 commit comments