File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,6 +146,18 @@ public void Enqueue_EmptyInRequires()
146146 e . ParamName . ShouldBe ( "requires" ) ;
147147 }
148148
149+ [ Test ]
150+ public void Enqueue_NullEntry ( )
151+ {
152+ using var queue = new Queue ( ) ;
153+
154+ var e = Should . Throw < ArgumentNullException > (
155+ ( ) => queue . Enqueue ( null ! )
156+ ) ;
157+
158+ e . ParamName . ShouldBe ( "entry" ) ;
159+ }
160+
149161 [ Test ]
150162 public void Enqueue_IndependentEntry ( )
151163 {
Original file line number Diff line number Diff line change @@ -17,9 +17,6 @@ internal static Exception ArgumentContainsNull(string name)
1717 internal static Exception ArgumentContainsEmpty ( string name )
1818 => new ArgumentException ( "Argument cannot contain an empty item." , name ) ;
1919
20- internal static Exception ArgumentOutOfRange ( string name )
21- => new ArgumentOutOfRangeException ( name ) ;
22-
2320 internal static Exception ObjectDisposed ( string ? name )
2421 => new ObjectDisposedException ( name ) ;
2522
You can’t perform that action at this time.
0 commit comments