File tree Expand file tree Collapse file tree
CommonExtendedObjectsTests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,10 +31,12 @@ public class SortedKvStoreTests
3131 [ TestMethod ]
3232 public void AddAndTryGetWorks ( )
3333 {
34- var store = new SortedKvStore ( ) ;
35- store . Add ( 10 , 100 ) ;
36- store . Add ( 5 , 50 ) ;
37- store . Add ( 15 , 150 ) ;
34+ var store = new SortedKvStore
35+ {
36+ { 10 , 100 } ,
37+ { 5 , 50 } ,
38+ { 15 , 150 }
39+ } ;
3840
3941 Assert . IsTrue ( store . TryGetValue ( 10 , out var val10 ) ) ;
4042 Assert . AreEqual ( 100 , val10 ) ;
@@ -54,9 +56,11 @@ public void AddAndTryGetWorks()
5456 [ TestMethod ]
5557 public void TryRemoveRemovesExisting ( )
5658 {
57- var store = new SortedKvStore ( ) ;
58- store . Add ( 1 , 10 ) ;
59- store . Add ( 2 , 20 ) ;
59+ var store = new SortedKvStore
60+ {
61+ { 1 , 10 } ,
62+ { 2 , 20 }
63+ } ;
6064
6165 Assert . IsTrue ( store . TryRemove ( 1 , out var idx ) ) ;
6266 Assert . IsFalse ( store . TryGetValue ( 1 , out _ ) ) ;
You can’t perform that action at this time.
0 commit comments