1
- using System ;
1
+ using System ;
2
2
using System . Collections ;
3
3
using System . Collections . Generic ;
4
4
using System . Diagnostics ;
18
18
using FluentAssertions . Types ;
19
19
using FluentAssertions . Xml ;
20
20
using JetBrains . Annotations ;
21
+ using NotNullAttribute = System . Diagnostics . CodeAnalysis . NotNullAttribute ;
21
22
#if ! NETSTANDARD2_0
22
23
using FluentAssertions . Events ;
23
24
#endif
@@ -174,7 +175,7 @@ public static ExecutionTimeAssertions Should(this ExecutionTime executionTime)
174
175
/// current <see cref="Assembly"/>.
175
176
/// </summary>
176
177
[ Pure ]
177
- public static AssemblyAssertions Should ( this Assembly assembly )
178
+ public static AssemblyAssertions Should ( [ NotNull ] this Assembly assembly )
178
179
{
179
180
return new AssemblyAssertions ( assembly ) ;
180
181
}
@@ -184,7 +185,7 @@ public static AssemblyAssertions Should(this Assembly assembly)
184
185
/// current <see cref="XElement"/>.
185
186
/// </summary>
186
187
[ Pure ]
187
- public static XDocumentAssertions Should ( this XDocument actualValue )
188
+ public static XDocumentAssertions Should ( [ NotNull ] this XDocument actualValue )
188
189
{
189
190
return new XDocumentAssertions ( actualValue ) ;
190
191
}
@@ -194,7 +195,7 @@ public static XDocumentAssertions Should(this XDocument actualValue)
194
195
/// current <see cref="XElement"/>.
195
196
/// </summary>
196
197
[ Pure ]
197
- public static XElementAssertions Should ( this XElement actualValue )
198
+ public static XElementAssertions Should ( [ NotNull ] this XElement actualValue )
198
199
{
199
200
return new XElementAssertions ( actualValue ) ;
200
201
}
@@ -204,7 +205,7 @@ public static XElementAssertions Should(this XElement actualValue)
204
205
/// current <see cref="XAttribute"/>.
205
206
/// </summary>
206
207
[ Pure ]
207
- public static XAttributeAssertions Should ( this XAttribute actualValue )
208
+ public static XAttributeAssertions Should ( [ NotNull ] this XAttribute actualValue )
208
209
{
209
210
return new XAttributeAssertions ( actualValue ) ;
210
211
}
@@ -214,7 +215,7 @@ public static XAttributeAssertions Should(this XAttribute actualValue)
214
215
/// current <see cref="Stream"/>.
215
216
/// </summary>
216
217
[ Pure ]
217
- public static StreamAssertions Should ( this Stream actualValue )
218
+ public static StreamAssertions Should ( [ NotNull ] this Stream actualValue )
218
219
{
219
220
return new StreamAssertions ( actualValue ) ;
220
221
}
@@ -224,7 +225,7 @@ public static StreamAssertions Should(this Stream actualValue)
224
225
/// current <see cref="BufferedStream"/>.
225
226
/// </summary>
226
227
[ Pure ]
227
- public static BufferedStreamAssertions Should ( this BufferedStream actualValue )
228
+ public static BufferedStreamAssertions Should ( [ NotNull ] this BufferedStream actualValue )
228
229
{
229
230
return new BufferedStreamAssertions ( actualValue ) ;
230
231
}
@@ -281,7 +282,7 @@ private static void ForceEnumeration<T>(T subject, Func<T, IEnumerable> enumerab
281
282
/// current <see cref="object"/>.
282
283
/// </summary>
283
284
[ Pure ]
284
- public static ObjectAssertions Should ( this object actualValue )
285
+ public static ObjectAssertions Should ( [ NotNull ] this object actualValue )
285
286
{
286
287
return new ObjectAssertions ( actualValue ) ;
287
288
}
@@ -311,7 +312,7 @@ public static NullableBooleanAssertions Should(this bool? actualValue)
311
312
/// current <see cref="HttpResponseMessage"/>.
312
313
/// </summary>
313
314
[ Pure ]
314
- public static HttpResponseMessageAssertions Should ( this HttpResponseMessage actualValue )
315
+ public static HttpResponseMessageAssertions Should ( [ NotNull ] this HttpResponseMessage actualValue )
315
316
{
316
317
return new HttpResponseMessageAssertions ( actualValue ) ;
317
318
}
@@ -341,7 +342,7 @@ public static NullableGuidAssertions Should(this Guid? actualValue)
341
342
/// current <see cref="IEnumerable{T}"/>.
342
343
/// </summary>
343
344
[ Pure ]
344
- public static GenericCollectionAssertions < T > Should < T > ( this IEnumerable < T > actualValue )
345
+ public static GenericCollectionAssertions < T > Should < T > ( [ NotNull ] this IEnumerable < T > actualValue )
345
346
{
346
347
return new GenericCollectionAssertions < T > ( actualValue ) ;
347
348
}
@@ -351,7 +352,7 @@ public static GenericCollectionAssertions<T> Should<T>(this IEnumerable<T> actua
351
352
/// current <see cref="IEnumerable{T}"/>.
352
353
/// </summary>
353
354
[ Pure ]
354
- public static StringCollectionAssertions Should ( this IEnumerable < string > @this )
355
+ public static StringCollectionAssertions Should ( [ NotNull ] this IEnumerable < string > @this )
355
356
{
356
357
return new StringCollectionAssertions ( @this ) ;
357
358
}
@@ -362,7 +363,7 @@ public static StringCollectionAssertions Should(this IEnumerable<string> @this)
362
363
/// </summary>
363
364
[ Pure ]
364
365
public static GenericDictionaryAssertions < IDictionary < TKey , TValue > , TKey , TValue > Should < TKey , TValue > (
365
- this IDictionary < TKey , TValue > actualValue )
366
+ [ NotNull ] this IDictionary < TKey , TValue > actualValue )
366
367
{
367
368
return new GenericDictionaryAssertions < IDictionary < TKey , TValue > , TKey , TValue > ( actualValue ) ;
368
369
}
@@ -373,7 +374,7 @@ public static GenericDictionaryAssertions<IDictionary<TKey, TValue>, TKey, TValu
373
374
/// </summary>
374
375
[ Pure ]
375
376
public static GenericDictionaryAssertions < IEnumerable < KeyValuePair < TKey , TValue > > , TKey , TValue > Should < TKey , TValue > (
376
- this IEnumerable < KeyValuePair < TKey , TValue > > actualValue )
377
+ [ NotNull ] this IEnumerable < KeyValuePair < TKey , TValue > > actualValue )
377
378
{
378
379
return new GenericDictionaryAssertions < IEnumerable < KeyValuePair < TKey , TValue > > , TKey , TValue > ( actualValue ) ;
379
380
}
@@ -384,7 +385,7 @@ public static GenericDictionaryAssertions<IEnumerable<KeyValuePair<TKey, TValue>
384
385
/// </summary>
385
386
[ Pure ]
386
387
public static GenericDictionaryAssertions < TCollection , TKey , TValue > Should < TCollection , TKey , TValue > (
387
- this TCollection actualValue )
388
+ [ NotNull ] this TCollection actualValue )
388
389
where TCollection : IEnumerable < KeyValuePair < TKey , TValue > >
389
390
{
390
391
return new GenericDictionaryAssertions < TCollection , TKey , TValue > ( actualValue ) ;
@@ -478,7 +479,7 @@ public static NullableTimeOnlyAssertions Should(this TimeOnly? actualValue)
478
479
/// current <see cref="IComparable{T}"/>.
479
480
/// </summary>
480
481
[ Pure ]
481
- public static ComparableTypeAssertions < T > Should < T > ( this IComparable < T > comparableValue )
482
+ public static ComparableTypeAssertions < T > Should < T > ( [ NotNull ] this IComparable < T > comparableValue )
482
483
{
483
484
return new ComparableTypeAssertions < T > ( comparableValue ) ;
484
485
}
@@ -708,7 +709,7 @@ public static NullableNumericAssertions<double> Should(this double? actualValue)
708
709
/// current <see cref="string"/>.
709
710
/// </summary>
710
711
[ Pure ]
711
- public static StringAssertions Should ( this string actualValue )
712
+ public static StringAssertions Should ( [ NotNull ] this string actualValue )
712
713
{
713
714
return new StringAssertions ( actualValue ) ;
714
715
}
@@ -738,7 +739,7 @@ public static NullableSimpleTimeSpanAssertions Should(this TimeSpan? actualValue
738
739
/// current <see cref="System.Type"/>.
739
740
/// </summary>
740
741
[ Pure ]
741
- public static TypeAssertions Should ( this Type subject )
742
+ public static TypeAssertions Should ( [ NotNull ] this Type subject )
742
743
{
743
744
return new TypeAssertions ( subject ) ;
744
745
}
@@ -762,7 +763,7 @@ public static TypeSelectorAssertions Should(this TypeSelector typeSelector)
762
763
/// </summary>
763
764
/// <seealso cref="TypeAssertions"/>
764
765
[ Pure ]
765
- public static ConstructorInfoAssertions Should ( this ConstructorInfo constructorInfo )
766
+ public static ConstructorInfoAssertions Should ( [ NotNull ] this ConstructorInfo constructorInfo )
766
767
{
767
768
return new ConstructorInfoAssertions ( constructorInfo ) ;
768
769
}
@@ -772,7 +773,7 @@ public static ConstructorInfoAssertions Should(this ConstructorInfo constructorI
772
773
/// </summary>
773
774
/// <seealso cref="TypeAssertions"/>
774
775
[ Pure ]
775
- public static MethodInfoAssertions Should ( this MethodInfo methodInfo )
776
+ public static MethodInfoAssertions Should ( [ NotNull ] this MethodInfo methodInfo )
776
777
{
777
778
return new MethodInfoAssertions ( methodInfo ) ;
778
779
}
@@ -797,7 +798,7 @@ public static MethodInfoSelectorAssertions Should(this MethodInfoSelector method
797
798
/// </summary>
798
799
/// <seealso cref="TypeAssertions"/>
799
800
[ Pure ]
800
- public static PropertyInfoAssertions Should ( this PropertyInfo propertyInfo )
801
+ public static PropertyInfoAssertions Should ( [ NotNull ] this PropertyInfo propertyInfo )
801
802
{
802
803
return new PropertyInfoAssertions ( propertyInfo ) ;
803
804
}
@@ -821,7 +822,7 @@ public static PropertyInfoSelectorAssertions Should(this PropertyInfoSelector pr
821
822
/// current <see cref="System.Action"/>.
822
823
/// </summary>
823
824
[ Pure ]
824
- public static ActionAssertions Should ( this Action action )
825
+ public static ActionAssertions Should ( [ NotNull ] this Action action )
825
826
{
826
827
return new ActionAssertions ( action , Extractor ) ;
827
828
}
@@ -831,7 +832,7 @@ public static ActionAssertions Should(this Action action)
831
832
/// current <see cref="System.Func{Task}"/>.
832
833
/// </summary>
833
834
[ Pure ]
834
- public static NonGenericAsyncFunctionAssertions Should ( this Func < Task > action )
835
+ public static NonGenericAsyncFunctionAssertions Should ( [ NotNull ] this Func < Task > action )
835
836
{
836
837
return new NonGenericAsyncFunctionAssertions ( action , Extractor ) ;
837
838
}
@@ -841,7 +842,7 @@ public static NonGenericAsyncFunctionAssertions Should(this Func<Task> action)
841
842
/// current <see><cref>System.Func{Task{T}}</cref></see>.
842
843
/// </summary>
843
844
[ Pure ]
844
- public static GenericAsyncFunctionAssertions < T > Should < T > ( this Func < Task < T > > action )
845
+ public static GenericAsyncFunctionAssertions < T > Should < T > ( [ NotNull ] this Func < Task < T > > action )
845
846
{
846
847
return new GenericAsyncFunctionAssertions < T > ( action , Extractor ) ;
847
848
}
@@ -851,7 +852,7 @@ public static GenericAsyncFunctionAssertions<T> Should<T>(this Func<Task<T>> act
851
852
/// current <see cref="System.Func{T}"/>.
852
853
/// </summary>
853
854
[ Pure ]
854
- public static FunctionAssertions < T > Should < T > ( this Func < T > func )
855
+ public static FunctionAssertions < T > Should < T > ( [ NotNull ] this Func < T > func )
855
856
{
856
857
return new FunctionAssertions < T > ( func , Extractor ) ;
857
858
}
0 commit comments