1130 references to Throws
Aspire.Hosting.Containers.Tests (3)
ContainerMountAnnotationTests.cs (3)
17
Assert.
Throws
<ArgumentNullException>("source", () => new ContainerMountAnnotation(source, "/usr/foo", ContainerMountType.BindMount, false));
24
Assert.
Throws
<ArgumentException>("source", () => new ContainerMountAnnotation("usr/foo", "/usr/foo", ContainerMountType.BindMount, false));
30
Assert.
Throws
<ArgumentException>("isReadOnly", () => new ContainerMountAnnotation(null, "/usr/foo", ContainerMountType.Volume, true));
Microsoft.AspNetCore.Http.Results.Tests (38)
ResultsTests.cs (17)
344
Assert.
Throws
<ArgumentNullException>("contents", () => Results.Bytes(null));
350
Assert.
Throws
<ArgumentNullException>("fileContents", () => Results.File(default(byte[])));
356
Assert.
Throws
<ArgumentNullException>("fileStream", () => Results.File(default(Stream)));
362
Assert.
Throws
<ArgumentNullException>("stream", () => Results.Stream(default(Stream)));
368
Assert.
Throws
<ArgumentNullException>("pipeReader", () => Results.Stream(default(PipeReader)));
374
Assert.
Throws
<ArgumentNullException>("streamWriterCallback", () => TypedResults.Stream(default(Func<Stream, Task>)));
478
Assert.
Throws
<ArgumentNullException>("principal", () => Results.SignIn(null));
1039
Assert.
Throws
<ArgumentNullException>("context", () => Results.Json<object>(null, context: null));
1045
Assert.
Throws
<ArgumentNullException>("context", () => Results.Json(null, type: typeof(object), context: null));
1065
Assert.
Throws
<ArgumentNullException>("jsonTypeInfo", () => Results.Json(null, jsonTypeInfo: null));
1071
Assert.
Throws
<ArgumentNullException>("jsonTypeInfo", () => Results.Json<object>(null, jsonTypeInfo: null));
1077
Assert.
Throws
<ArgumentNullException>("localUrl", () => Results.LocalRedirect(default(string)));
1083
Assert.
Throws
<ArgumentException>("localUrl", () => Results.LocalRedirect(string.Empty));
1244
Assert.
Throws
<ArgumentNullException>("problemDetails", () => Results.Problem(default(ProblemDetails)));
1392
Assert.
Throws
<ArgumentNullException>("errors", () => Results.ValidationProblem(default(IDictionary<string, string[]>)));
1460
Assert.
Throws
<ArgumentNullException>("url", () => Results.Redirect(default(string)));
1466
Assert.
Throws
<ArgumentException>("url", () => Results.Redirect(string.Empty));
TypedResultsTests.cs (21)
99
Assert.
Throws
<ArgumentNullException>("uri", () => TypedResults.Accepted(default(Uri)));
105
Assert.
Throws
<ArgumentNullException>("uri", () => TypedResults.Accepted(default(Uri), default(object)));
318
Assert.
Throws
<ArgumentNullException>("contents", () => TypedResults.Bytes(null));
324
Assert.
Throws
<ArgumentNullException>("fileContents", () => TypedResults.File(default(byte[])));
330
Assert.
Throws
<ArgumentNullException>("fileStream", () => TypedResults.File(default(Stream)));
336
Assert.
Throws
<ArgumentNullException>("stream", () => TypedResults.Stream(default(Stream)));
342
Assert.
Throws
<ArgumentNullException>("pipeReader", () => TypedResults.Stream(default(PipeReader)));
348
Assert.
Throws
<ArgumentNullException>("streamWriterCallback", () => TypedResults.Stream(default(Func<Stream, Task>)));
354
Assert.
Throws
<ArgumentNullException>("path", () => TypedResults.PhysicalFile(default(string)));
360
Assert.
Throws
<ArgumentException>("path", () => TypedResults.PhysicalFile(string.Empty));
366
Assert.
Throws
<ArgumentNullException>("path", () => TypedResults.VirtualFile(default(string)));
372
Assert.
Throws
<ArgumentException>("path", () => TypedResults.VirtualFile(string.Empty));
488
Assert.
Throws
<ArgumentNullException>("principal", () => TypedResults.SignIn(null));
899
Assert.
Throws
<ArgumentNullException>("context", () => TypedResults.Json(data, context: null));
915
Assert.
Throws
<ArgumentNullException>("jsonTypeInfo", () => TypedResults.Json(data, jsonTypeInfo: null));
921
Assert.
Throws
<ArgumentNullException>("localUrl", () => TypedResults.LocalRedirect(default(string)));
927
Assert.
Throws
<ArgumentException>("localUrl", () => TypedResults.LocalRedirect(string.Empty));
1060
Assert.
Throws
<ArgumentNullException>("problemDetails", () => TypedResults.Problem(default(ProblemDetails)));
1184
Assert.
Throws
<ArgumentNullException>("errors", () => TypedResults.ValidationProblem(default(IDictionary<string, string[]>)));
1242
Assert.
Throws
<ArgumentNullException>("url", () => TypedResults.Redirect(default(string)));
1248
Assert.
Throws
<ArgumentException>("url", () => TypedResults.Redirect(string.Empty));
Microsoft.AspNetCore.Http.Tests (1)
HttpServiceCollectionExtensionsTests.cs (1)
28
Assert.
Throws
<ArgumentNullException>("services", () => HttpServiceCollectionExtensions.AddHttpContextAccessor(null));
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (1)
UserStoreTest.cs (1)
99
Assert.
Throws
<ArgumentNullException>("context", () => new UserStore(null));
Microsoft.AspNetCore.Identity.Test (6)
RoleManagerTest.cs (1)
123
Assert.
Throws
<ArgumentNullException>("store",
SignInManagerTest.cs (3)
21
Assert.
Throws
<ArgumentNullException>("userManager", () => new SignInManager<PocoUser>(null, null, null, null, null, null, null));
23
Assert.
Throws
<ArgumentNullException>("contextAccessor", () => new SignInManager<PocoUser>(userManager, null, null, null, null, null, null));
27
Assert.
Throws
<ArgumentNullException>("claimsFactory", () => new SignInManager<PocoUser>(userManager, contextAccessor.Object, null, null, null, null, null));
UserClaimsPrincipalFactoryTest.cs (1)
18
Assert.
Throws
<ArgumentException>("optionsAccessor",
UserManagerTest.cs (1)
1018
Assert.
Throws
<ArgumentNullException>("store",
Microsoft.AspNetCore.Mvc.Core.Test (4)
Formatters\FormatterMappingsTest.cs (1)
20
Assert.
Throws
<ArgumentException>("format", () => options.GetMediaTypeMappingForFormat(format));
Formatters\MediaTypeTest.cs (3)
108
Assert.
Throws
<ArgumentNullException>("mediaType", () => new MediaType(null, 0, 2));
117
Assert.
Throws
<ArgumentOutOfRangeException>("offset", () => new MediaType("media", offset, 5));
124
Assert.
Throws
<ArgumentOutOfRangeException>("length", () => new MediaType("media", 0, -1));
Microsoft.AspNetCore.Razor.Test (2)
TagHelpers\ReadOnlyTagHelperAttributeListTest.cs (1)
115
var exception = Assert.
Throws
<ArgumentOutOfRangeException>("index", () => attributes[index]);
TagHelpers\TagHelperAttributeListTest.cs (1)
86
var exception = Assert.
Throws
<ArgumentOutOfRangeException>("index", () => attributes[index]);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (6)
RequestBodyTests.cs (6)
129
Assert.
Throws
<ArgumentNullException>("buffer", () => httpContext.Request.Body.Read(null, 0, 1));
130
Assert.
Throws
<ArgumentOutOfRangeException>("offset", () => httpContext.Request.Body.Read(input, -1, 1));
131
Assert.
Throws
<ArgumentOutOfRangeException>("count", () => httpContext.Request.Body.Read(input, input.Length + 1, 1));
132
Assert.
Throws
<ArgumentOutOfRangeException>("count", () => httpContext.Request.Body.Read(input, 10, -1));
133
Assert.
Throws
<ArgumentOutOfRangeException>("count", () => httpContext.Request.Body.Read(input, 1, input.Length));
134
Assert.
Throws
<ArgumentOutOfRangeException>("count", () => httpContext.Request.Body.Read(input, 0, input.Length + 1));
Microsoft.AspNetCore.WebUtilities.Tests (1)
QueryHelpersTests.cs (1)
107
Assert.
Throws
<ArgumentNullException>("value", () => QueryHelpers.AddQueryString("http://contoso.com/", "hello", null!));
Microsoft.Build.Engine.UnitTests (9)
Evaluation\SimpleVersion_Tests.cs (9)
67
Assert.
Throws
<ArgumentOutOfRangeException>("major", () => new SimpleVersion(-1, 0));
68
Assert.
Throws
<ArgumentOutOfRangeException>("major", () => new SimpleVersion(-1, 0, 0));
69
Assert.
Throws
<ArgumentOutOfRangeException>("major", () => new SimpleVersion(-1, 0, 0, 0));
75
Assert.
Throws
<ArgumentOutOfRangeException>("minor", () => new SimpleVersion(0, -1));
76
Assert.
Throws
<ArgumentOutOfRangeException>("minor", () => new SimpleVersion(0, -1, 0));
77
Assert.
Throws
<ArgumentOutOfRangeException>("minor", () => new SimpleVersion(0, -1, 0, 0));
83
Assert.
Throws
<ArgumentOutOfRangeException>("build", () => new SimpleVersion(0, 0, -1));
84
Assert.
Throws
<ArgumentOutOfRangeException>("build", () => new SimpleVersion(0, 0, -1, 0));
90
Assert.
Throws
<ArgumentOutOfRangeException>("revision", () => new SimpleVersion(0, 0, 0, -1));
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
IOperation\IOperationTests_ICompoundAssignmentOperation.cs (2)
24
Assert.
Throws
<ArgumentNullException>("compoundAssignment", () => nullAssignment.GetInConversion());
25
Assert.
Throws
<ArgumentNullException>("compoundAssignment", () => nullAssignment.GetOutConversion());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (12)
Compilation\CompilationAPITests.cs (7)
446
Assert.
Throws
<ArgumentNullException>("peStream", () => comp.Emit(peStream: null));
447
Assert.
Throws
<ArgumentException>("peStream", () => comp.Emit(peStream: new TestStream(canRead: true, canWrite: false, canSeek: true)));
448
Assert.
Throws
<ArgumentException>("pdbStream", () => comp.Emit(peStream: new MemoryStream(), pdbStream: new TestStream(canRead: true, canWrite: false, canSeek: true)));
457
Assert.
Throws
<ArgumentException>("embeddedTexts", () => comp.Emit(
469
Assert.
Throws
<ArgumentException>("win32Resources", () => comp.Emit(
473
Assert.
Throws
<ArgumentException>("win32Resources", () => comp.Emit(
2961
Assert.
Throws
<ArgumentException>(null, () => compilation.CreateBuiltinOperator(
Symbols\FunctionPointerTypeSymbolTests.cs (5)
1532
Assert.
Throws
<ArgumentNullException>("returnType", () => comp.CreateFunctionPointerTypeSymbol(returnType: null!, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty));
1533
Assert.
Throws
<ArgumentNullException>("parameterTypes", () => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: default, parameterRefKinds: ImmutableArray<RefKind>.Empty));
1534
Assert.
Throws
<ArgumentNullException>("parameterTypes[0]", () => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray.Create((ITypeSymbol?)null)!, parameterRefKinds: ImmutableArray.Create(RefKind.None)));
1535
Assert.
Throws
<ArgumentNullException>("parameterRefKinds", () => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: default));
1536
Assert.
Throws
<ArgumentNullException>("callingConventionTypes[0]", () => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.Unmanaged, ImmutableArray.Create((INamedTypeSymbol)null!)));
Microsoft.CodeAnalysis.Scripting.UnitTests (37)
ScriptOptionsTests.cs (37)
41
Assert.
Throws
<ArgumentNullException>("references", () => options.AddReferences((MetadataReference[])null));
42
Assert.
Throws
<ArgumentNullException>("references[0]", () => options.AddReferences(new MetadataReference[] { null }));
44
Assert.
Throws
<ArgumentNullException>("references", () => options.AddReferences((IEnumerable<MetadataReference>)null));
45
Assert.
Throws
<ArgumentNullException>("references[0]", () => options.AddReferences((IEnumerable<MetadataReference>)new MetadataReference[] { null }));
47
Assert.
Throws
<ArgumentNullException>("references", () => options.AddReferences((Assembly[])null));
48
Assert.
Throws
<ArgumentNullException>("references[0]", () => options.AddReferences(new Assembly[] { null }));
50
Assert.
Throws
<ArgumentNullException>("references", () => options.AddReferences((IEnumerable<Assembly>)null));
51
Assert.
Throws
<ArgumentNullException>("references[0]", () => options.AddReferences((IEnumerable<Assembly>)new Assembly[] { null }));
53
Assert.
Throws
<ArgumentNullException>("references", () => options.AddReferences((string[])null));
54
Assert.
Throws
<ArgumentNullException>("references[0]", () => options.AddReferences(new string[] { null }));
56
Assert.
Throws
<ArgumentNullException>("references", () => options.AddReferences((IEnumerable<string>)null));
57
Assert.
Throws
<ArgumentNullException>("references[0]", () => options.AddReferences((IEnumerable<string>)new string[] { null }));
83
Assert.
Throws
<ArgumentNullException>("references", () => options.WithReferences((MetadataReference[])null));
84
Assert.
Throws
<ArgumentNullException>("references", () => options.WithReferences((IEnumerable<MetadataReference>)null));
85
Assert.
Throws
<ArgumentNullException>("references", () => options.WithReferences(default(ImmutableArray<MetadataReference>)));
86
Assert.
Throws
<ArgumentNullException>("references[0]", () => options.WithReferences(new MetadataReference[] { null }));
87
Assert.
Throws
<ArgumentNullException>("references[0]", () => options.WithReferences(ImmutableArray.Create((MetadataReference)null)));
89
Assert.
Throws
<ArgumentNullException>("references", () => options.WithReferences((Assembly[])null));
90
Assert.
Throws
<ArgumentNullException>("references", () => options.WithReferences((IEnumerable<Assembly>)null));
91
Assert.
Throws
<ArgumentNullException>("references", () => options.WithReferences(default(ImmutableArray<Assembly>)));
92
Assert.
Throws
<ArgumentNullException>("references[0]", () => options.WithReferences(new Assembly[] { null }));
93
Assert.
Throws
<ArgumentNullException>("references[0]", () => options.WithReferences(ImmutableArray.Create((Assembly)null)));
95
Assert.
Throws
<ArgumentNullException>("references", () => options.WithReferences((string[])null));
96
Assert.
Throws
<ArgumentNullException>("references", () => options.WithReferences((IEnumerable<string>)null));
97
Assert.
Throws
<ArgumentNullException>("references", () => options.WithReferences(default(ImmutableArray<string>)));
98
Assert.
Throws
<ArgumentNullException>("references[0]", () => options.WithReferences(new string[] { null }));
99
Assert.
Throws
<ArgumentNullException>("references[0]", () => options.WithReferences(ImmutableArray.Create((string)null)));
122
Assert.
Throws
<ArgumentNullException>("imports", () => options.AddImports((string[])null));
125
Assert.
Throws
<ArgumentNullException>("imports", () => options.AddImports((IEnumerable<string>)null));
126
Assert.
Throws
<ArgumentNullException>("imports[0]", () => options.AddImports((IEnumerable<string>)new string[] { null }));
128
Assert.
Throws
<ArgumentNullException>("imports", () => options.AddImports(default(ImmutableArray<string>)));
129
Assert.
Throws
<ArgumentNullException>("imports[0]", () => options.AddImports(ImmutableArray.Create((string)null)));
143
Assert.
Throws
<ArgumentNullException>("imports", () => options.WithImports((string[])null));
146
Assert.
Throws
<ArgumentNullException>("imports", () => options.WithImports((IEnumerable<string>)null));
147
Assert.
Throws
<ArgumentNullException>("imports[0]", () => options.WithImports((IEnumerable<string>)new string[] { null }));
149
Assert.
Throws
<ArgumentNullException>("imports", () => options.WithImports(default(ImmutableArray<string>)));
150
Assert.
Throws
<ArgumentNullException>("imports[0]", () => options.WithImports(ImmutableArray.Create((string)null)));
Microsoft.CodeAnalysis.Test.Utilities (4)
Compilation\TestOperationVisitor.cs (4)
1178
Assert.
Throws
<ArgumentException>("compoundAssignment", () => VisualBasic.VisualBasicExtensions.GetInConversion(operation));
1179
Assert.
Throws
<ArgumentException>("compoundAssignment", () => VisualBasic.VisualBasicExtensions.GetOutConversion(operation));
1185
Assert.
Throws
<ArgumentException>("compoundAssignment", () => CSharp.CSharpExtensions.GetInConversion(operation));
1186
Assert.
Throws
<ArgumentException>("compoundAssignment", () => CSharp.CSharpExtensions.GetOutConversion(operation));
Microsoft.CodeAnalysis.UnitTests (21)
Analyzers\AnalyzerFileReferenceTests.cs (1)
48
Assert.
Throws
<ArgumentNullException>("assemblyLoader", () => new AnalyzerFileReference(TempRoot.Root, null!));
Collections\ImmutableDictionaryTestBase.cs (2)
288
Assert.
Throws
<ArgumentException>(null, () => map1.Add(key, value2));
289
Assert.
Throws
<ArgumentException>(null, () => map2.Add(key, value1));
Collections\List\ICollection.Generic.Tests.cs (1)
468
Assert.
Throws
<ArgumentNullException>("item", () => collection.Contains(default(T)!));
EmbeddedTextTests.cs (16)
25
Assert.
Throws
<ArgumentNullException>("filePath", () => EmbeddedText.FromBytes(null, default(ArraySegment<byte>)));
26
Assert.
Throws
<ArgumentException>("filePath", () => EmbeddedText.FromBytes("", default(ArraySegment<byte>)));
27
Assert.
Throws
<ArgumentNullException>("bytes", () => EmbeddedText.FromBytes("path", default(ArraySegment<byte>)));
28
Assert.
Throws
<ArgumentException>("checksumAlgorithm", () => EmbeddedText.FromBytes("path", new ArraySegment<byte>(new byte[0], 0, 0), SourceHashAlgorithm.None));
34
Assert.
Throws
<ArgumentNullException>("filePath", () => EmbeddedText.FromSource(null, null));
35
Assert.
Throws
<ArgumentException>("filePath", () => EmbeddedText.FromSource("", null));
36
Assert.
Throws
<ArgumentNullException>("text", () => EmbeddedText.FromSource("path", null));
39
Assert.
Throws
<ArgumentException>("text", () => EmbeddedText.FromSource("path", SourceText.From("source")));
42
Assert.
Throws
<ArgumentException>("text", () => EmbeddedText.FromSource("path", SourceText.From(new byte[0], 0, Encoding.UTF8, canBeEmbedded: false)));
43
Assert.
Throws
<ArgumentException>("text", () => EmbeddedText.FromSource("path", SourceText.From(new MemoryStream(new byte[0]), Encoding.UTF8, canBeEmbedded: false)));
49
Assert.
Throws
<ArgumentNullException>("filePath", () => EmbeddedText.FromStream(null, null));
50
Assert.
Throws
<ArgumentException>("filePath", () => EmbeddedText.FromStream("", null));
51
Assert.
Throws
<ArgumentNullException>("stream", () => EmbeddedText.FromStream("path", null));
52
Assert.
Throws
<ArgumentException>("stream", () => EmbeddedText.FromStream("path", new CannotReadStream()));
53
Assert.
Throws
<ArgumentException>("stream", () => EmbeddedText.FromStream("path", new CannotSeekStream()));
54
Assert.
Throws
<ArgumentException>("checksumAlgorithm", () => EmbeddedText.FromStream("path", new MemoryStream(), SourceHashAlgorithm.None));
Emit\SemanticEditTests.cs (1)
29
Assert.
Throws
<ArgumentOutOfRangeException>("kind", () => new SemanticEdit(SemanticEditKind.None, oldSymbol: null, newSymbol: null));
Microsoft.CodeAnalysis.Workspaces.UnitTests (37)
Simplifier\SimplifierTests.cs (1)
53
Assert.
Throws
<ArgumentNullException>("workspace", () => Simplifier.Expand(token: default, semanticModel: null!, workspace: null!));
SolutionTests\ProjectDependencyGraphTests.cs (2)
117
Assert.
Throws
<ArgumentNullException>("projectId",
339
Assert.
Throws
<ArgumentNullException>("projectId",
SolutionTests\SolutionTests.cs (34)
1449
Assert.
Throws
<ArgumentNullException>("assemblyName", () => solution.WithProjectAssemblyName(projectId, null!));
1450
Assert.
Throws
<ArgumentNullException>("projectId", () => solution.WithProjectAssemblyName(null!, "x.dll"));
1473
Assert.
Throws
<ArgumentNullException>("projectId", () => solution.WithProjectOutputFilePath(null!, "x.dll"));
1474
Assert.
Throws
<ArgumentNullException>("projectId", () => solution.WithProjectOutputFilePath(null!, "x.dll"));
1528
Assert.
Throws
<ArgumentNullException>("projectId", () => solution.WithProjectOutputRefFilePath(null!, "x.dll"));
1551
Assert.
Throws
<ArgumentNullException>("projectId", () => solution.WithProjectCompilationOutputInfo(null!, info));
1574
Assert.
Throws
<ArgumentNullException>("projectId", () => solution.WithProjectDefaultNamespace(null!, "x"));
1688
Assert.
Throws
<ArgumentNullException>("projectId", () => solution.WithProjectName(null!, "x"));
1711
Assert.
Throws
<ArgumentNullException>("projectId", () => solution.WithProjectFilePath(null!, "x"));
1726
Assert.
Throws
<ArgumentNullException>("projectId", () => solution.WithProjectCompilationOptions(null!, options));
1727
Assert.
Throws
<ArgumentNullException>("options", () => solution.WithProjectCompilationOptions(projectId, options: null!));
1775
Assert.
Throws
<ArgumentNullException>("projectId", () => solution.WithProjectParseOptions(null!, options));
1776
Assert.
Throws
<ArgumentNullException>("options", () => solution.WithProjectParseOptions(projectId, options: null!));
1987
Assert.
Throws
<ArgumentNullException>("projectReferences", () => solution.AddProjectReferences(projectId, null!));
2025
Assert.
Throws
<ArgumentNullException>("projectId", () => solution.RemoveProjectReference(null!, projectRef2));
2026
Assert.
Throws
<ArgumentNullException>("projectReference", () => solution.RemoveProjectReference(projectId, null!));
2029
Assert.
Throws
<ArgumentException>("projectReference", () => solution.RemoveProjectReference(projectId, new ProjectReference(ProjectId.CreateNewId())));
2106
Assert.
Throws
<ArgumentNullException>("metadataReferences", () => solution.AddMetadataReferences(projectId, null!));
2131
Assert.
Throws
<ArgumentNullException>("projectId", () => solution.RemoveMetadataReference(null!, metadataRef1));
2132
Assert.
Throws
<ArgumentNullException>("metadataReference", () => solution.RemoveMetadataReference(projectId, null!));
2179
Assert.
Throws
<ArgumentNullException>("analyzerReferences", () => solution.AddAnalyzerReferences(projectId, null!));
2205
Assert.
Throws
<ArgumentNullException>("analyzerReference", () => solution.RemoveAnalyzerReference(projectId, null!));
2246
Assert.
Throws
<ArgumentNullException>("analyzerReferences", () => solution.AddAnalyzerReferences(null!));
2270
Assert.
Throws
<ArgumentNullException>("analyzerReference", () => solution.RemoveAnalyzerReference(null!));
2377
Assert.
Throws
<ArgumentNullException>("loader", () => solution.AddDocument(documentId, "name", loader: null!));
2406
Assert.
Throws
<ArgumentNullException>("documentId", () => solution.AddDocument(documentId: null!, "name", "text"));
2407
Assert.
Throws
<ArgumentNullException>("name", () => solution.AddDocument(documentId, name: null!, "text"));
2408
Assert.
Throws
<ArgumentNullException>("text", () => solution.AddDocument(documentId, "name", text: (string)null!));
2434
Assert.
Throws
<ArgumentNullException>("documentId", () => solution.AddDocument(documentId: null!, "name", sourceText));
2435
Assert.
Throws
<ArgumentNullException>("name", () => solution.AddDocument(documentId, name: null!, sourceText));
2436
Assert.
Throws
<ArgumentNullException>("text", () => solution.AddDocument(documentId, "name", text: (SourceText)null!));
2463
Assert.
Throws
<ArgumentNullException>("documentId", () => solution.AddDocument(documentId: null!, "name", root));
2464
Assert.
Throws
<ArgumentNullException>("name", () => solution.AddDocument(documentId, name: null!, root));
2465
Assert.
Throws
<ArgumentNullException>("syntaxRoot", () => solution.AddDocument(documentId, "name", syntaxRoot: null!));
Microsoft.DotNet.XUnitAssert.Tests (22)
AsyncCollectionAssertsTests.cs (3)
1384
Assert.
Throws
<ArgumentNullException>("collection", () => Assert.Single(default(IAsyncEnumerable<object>)!));
1469
Assert.
Throws
<ArgumentNullException>("collection", () => Assert.Single(default(IAsyncEnumerable<object>)!, _ => true));
1470
Assert.
Throws
<ArgumentNullException>("predicate", () => Assert.Single(new object[0].ToAsyncEnumerable(), null!));
CollectionAssertsTests.cs (4)
2281
Assert.
Throws
<ArgumentNullException>("collection", () => Assert.Single(null!));
2416
Assert.
Throws
<ArgumentNullException>("collection", () => Assert.Single(default(IEnumerable<object>)!));
2501
Assert.
Throws
<ArgumentNullException>("collection", () => Assert.Single(default(IEnumerable<object>)!, _ => true));
2502
Assert.
Throws
<ArgumentNullException>("predicate", () => Assert.Single(new object[0], null!));
ExceptionAssertsTests.cs (15)
18
Assert.
Throws
<ArgumentNullException>("exceptionType", () => Assert.Throws(null!, testCode));
19
Assert.
Throws
<ArgumentNullException>("testCode", () => Assert.Throws(typeof(Exception), default(Action)!));
90
Assert.
Throws
<ArgumentNullException>("exceptionType", () => Assert.Throws(null!, testCode));
91
Assert.
Throws
<ArgumentNullException>("testCode", () => Assert.Throws(typeof(Exception), default(Func<object>)!));
175
Assert.
Throws
<ArgumentNullException>("testCode", () => Assert.Throws<ArgumentException>(default(Action)!));
244
Assert.
Throws
<ArgumentNullException>("testCode", () => Assert.Throws<ArgumentException>(default(Func<object>)!));
327
Assert.
Throws
<ArgumentNullException>("testCode", () => Assert.Throws<ArgumentException>(default(Action)!));
413
Assert.
Throws
<ArgumentNullException>("testCode", () => Assert.Throws<ArgumentException>(default(Func<object>)!));
421
var ex = Record.Exception(() => Assert.
Throws
<ArgumentException>("paramName", testCode));
437
Assert.
Throws
<ArgumentException>("paramName", testCode);
445
var ex = Record.Exception(() => Assert.
Throws
<ArgumentException>("paramName2", testCode));
463
var ex = Record.Exception(() => Assert.
Throws
<ArgumentException>("paramName", testCode));
481
var ex = Record.Exception(() => Assert.
Throws
<ArgumentException>("paramName", testCode));
502
Assert.
Throws
<ArgumentNullException>("testCode", () => Assert.ThrowsAny<ArgumentException>(default(Action)!));
561
Assert.
Throws
<ArgumentNullException>("testCode", () => Assert.ThrowsAny<ArgumentException>(default(Func<object>)!));
Microsoft.Extensions.TimeProvider.Testing.Tests (8)
TimerTests.cs (8)
171
Assert.
Throws
<ArgumentOutOfRangeException>("dueTime", () => t.Change(TimeSpan.FromMilliseconds(-2), TimeSpan.FromMilliseconds(1)));
172
Assert.
Throws
<ArgumentOutOfRangeException>("dueTime", () => t.Change(TimeSpan.FromMilliseconds(-2), TimeSpan.FromSeconds(1)));
173
Assert.
Throws
<ArgumentOutOfRangeException>("dueTime", () => t.Change(TimeSpan.FromMilliseconds(0xFFFFFFFFL), TimeSpan.FromMilliseconds(1)));
174
Assert.
Throws
<ArgumentOutOfRangeException>("dueTime", () => t.Change(TimeSpan.FromMilliseconds(0xFFFFFFFFL), TimeSpan.FromSeconds(1)));
183
Assert.
Throws
<ArgumentOutOfRangeException>("period", () => t.Change(TimeSpan.FromMilliseconds(1), TimeSpan.FromMilliseconds(-2)));
184
Assert.
Throws
<ArgumentOutOfRangeException>("period", () => t.Change(TimeSpan.FromSeconds(1), TimeSpan.FromMilliseconds(-2)));
185
Assert.
Throws
<ArgumentOutOfRangeException>("period", () => t.Change(TimeSpan.FromMilliseconds(1), TimeSpan.FromMilliseconds(0xFFFFFFFFL)));
186
Assert.
Throws
<ArgumentOutOfRangeException>("period", () => t.Change(TimeSpan.FromSeconds(1), TimeSpan.FromMilliseconds(0xFFFFFFFFL)));
System.Drawing.Common.Tests (3)
System\Drawing\BufferedGraphicsContextTests.cs (1)
139
Assert.
Throws
<ArgumentNullException>("hdc", () => context.Allocate(null, new Rectangle(0, 0, 10, 10)));
System\Drawing\FontConverterTests.cs (1)
71
Assert.
Throws
<InvalidEnumArgumentException>(paramName, () => converter.ConvertFrom(input));
System\Drawing\Printing\PrinterResolutionTests.cs (1)
82
Assert.
Throws
<InvalidEnumArgumentException>("value", () => resolution.Kind = value);
System.Windows.Forms.Design.Tests (74)
System\ComponentModel\Design\ArrayEditorTests.cs (2)
212
Assert.
Throws
<ArgumentNullException>("elementType", () => editor.SetItems(null, Array.Empty<object>()));
213
Assert.
Throws
<ArgumentNullException>("elementType", () => editor.SetItems(Array.Empty<object>(), Array.Empty<object>()));
System\ComponentModel\Design\CollectionEditorTests.cs (7)
44
Assert.
Throws
<ArgumentNullException>("type", () => editor.CollectionItemType);
49
Assert.
Throws
<ArgumentNullException>("type", () => editor.NewItemTypes);
113
Assert.
Throws
<ArgumentNullException>("type", editor.CreateCollectionForm);
138
Assert.
Throws
<ArgumentNullException>("type", editor.CreateCollectionItemType);
361
Assert.
Throws
<ArgumentNullException>("itemType", () => editor.CreateInstance(null));
386
Assert.
Throws
<ArgumentNullException>("type", editor.CreateNewItemTypes);
745
Assert.
Throws
<ArgumentNullException>("type", () => editor.EditValue(mockContext.Object, mockServiceProvider.Object, value));
System\ComponentModel\Design\CollectionFormTests.cs (3)
33
Assert.
Throws
<ArgumentNullException>("editor", () => new SubCollectionForm(null));
710
Assert.
Throws
<ArgumentNullException>("itemType", () => form.CreateInstance(null));
822
Assert.
Throws
<ArgumentNullException>("edSvc", () => form.ShowEditorDialog(null));
System\ComponentModel\Design\DesignerActionItemCollectionTests.cs (2)
38
Assert.
Throws
<ArgumentNullException>("value", () => collection.Add(null));
112
Assert.
Throws
<ArgumentNullException>("value", () => collection[0] = null);
System\ComponentModel\Design\DesignerActionListCollectionTests.cs (1)
32
Assert.
Throws
<ArgumentNullException>("value", () => new DesignerActionListCollection(null));
System\ComponentModel\Design\DesignerActionServiceTests.cs (3)
246
Assert.
Throws
<ArgumentNullException>("comp", () => service.Contains(null));
386
Assert.
Throws
<ArgumentNullException>("component", () => service.GetComponentActions(null));
387
Assert.
Throws
<ArgumentNullException>("component", () => service.GetComponentActions(null, ComponentActionsType.All));
System\ComponentModel\Design\DesignerHostTests.cs (7)
978
Assert.
Throws
<ArgumentNullException>("key", () => service.GetValue(null));
996
Assert.
Throws
<ArgumentNullException>("key", () => service.GetValue(null));
1593
Assert.
Throws
<ArgumentNullException>("service", () => component.Site.GetService(null));
1863
Assert.
Throws
<ArgumentNullException>("componentType", () => host.CreateComponent(null));
2273
Assert.
Throws
<ArgumentNullException>("component", () => host.GetDesigner(null));
2373
Assert.
Throws
<ArgumentNullException>("service", () => host.GetService(null));
2428
Assert.
Throws
<ArgumentNullException>("typeName", () => host.GetType(null));
System\ComponentModel\Design\DesignerVerbCollectionTests.cs (1)
32
Assert.
Throws
<ArgumentNullException>("value", () => new DesignerVerbCollection(null));
System\ComponentModel\Design\DesignSurfaceTests.cs (8)
169
Assert.
Throws
<ArgumentNullException>("rootComponentType", () => new DesignSurface((Type)null));
170
Assert.
Throws
<ArgumentNullException>("rootComponentType", () => new DesignSurface(mockServiceProvider.Object, null));
1008
Assert.
Throws
<ArgumentNullException>("component", () => surface.CreateDesigner(null, true));
1009
Assert.
Throws
<ArgumentNullException>("component", () => surface.CreateDesigner(null, false));
1069
Assert.
Throws
<ArgumentNullException>("type", () => surface.CreateComponent(null));
1125
Assert.
Throws
<ArgumentNullException>("type", () => surface.CreateInstance(null));
1153
Assert.
Throws
<ArgumentNullException>("owningComponent", () => surface.CreateNestedContainer(null));
1154
Assert.
Throws
<ArgumentNullException>("owningComponent", () => surface.CreateNestedContainer(null, "name"));
System\ComponentModel\Design\Serialization\CodeDomSerializerExceptionTests.cs (2)
83
Assert.
Throws
<ArgumentNullException>("manager", () => new CodeDomSerializerException("message", (IDesignerSerializationManager)null));
84
Assert.
Throws
<ArgumentNullException>("manager", () => new CodeDomSerializerException(new InvalidOperationException(), (IDesignerSerializationManager)null));
System\ComponentModel\Design\Serialization\DesignerSerializationManagerTests.cs (10)
73
Assert.
Throws
<ArgumentNullException>("provider", () => new DesignerSerializationManager(null));
259
Assert.
Throws
<ArgumentNullException>("property", () => iManager.Properties);
262
Assert.
Throws
<ArgumentNullException>("property", () => iManager.Properties);
859
Assert.
Throws
<ArgumentNullException>("name", () => iManager.GetInstance(null));
958
Assert.
Throws
<ArgumentNullException>("value", () => iManager.GetName(null));
1147
Assert.
Throws
<ArgumentNullException>("typeName", () => manager.GetRuntimeType(null));
1292
Assert.
Throws
<ArgumentNullException>("serializerType", () => manager.GetSerializer(objectType, null));
1413
Assert.
Throws
<ArgumentNullException>("serializerType", () => iManager.GetSerializer(objectType, null));
1552
Assert.
Throws
<ArgumentNullException>("typeName", () => manager.GetType(null));
1640
Assert.
Throws
<ArgumentNullException>("typeName", () => iManager.GetType(null));
System\ComponentModel\Design\Serialization\ExpressionContextTests.cs (3)
46
Assert.
Throws
<ArgumentNullException>("expression", () => new ExpressionContext(null, typeof(int), new object(), new object()));
52
Assert.
Throws
<ArgumentNullException>("expressionType", () => new ExpressionContext(new CodeExpression(), null, new object(), new object()));
58
Assert.
Throws
<ArgumentNullException>("owner", () => new ExpressionContext(new CodeExpression(), typeof(int), null, new object()));
System\ComponentModel\Design\Serialization\RootContextTests.cs (2)
23
Assert.
Throws
<ArgumentNullException>("expression", () => new RootContext(null, new object()));
30
Assert.
Throws
<ArgumentNullException>("value", () => new RootContext(expression, null));
System\ComponentModel\Design\UndoUnitTests.cs (1)
45
Assert.
Throws
<ArgumentNullException>("engine", () => new UndoUnit(null, "name"));
System\Drawing\Design\BitmapEditorTests.cs (1)
97
Assert.
Throws
<ArgumentNullException>("stream", () => editor.LoadFromStream(null));
System\Drawing\Design\ImageEditorTests.cs (2)
51
Assert.
Throws
<ArgumentNullException>("e", () => SubImageEditor.CreateFilterEntry(null));
153
Assert.
Throws
<ArgumentNullException>("stream", () => editor.LoadFromStream(null));
System\Drawing\Design\MetafileEditorTests.cs (1)
76
Assert.
Throws
<ArgumentNullException>("stream", () => editor.LoadFromStream(null));
System\Drawing\Design\ToolboxItemCollectionTests.cs (2)
22
Assert.
Throws
<ArgumentNullException>("c", () => new ToolboxItemCollection((ToolboxItem[])null));
40
Assert.
Throws
<ArgumentNullException>("c", () => new ToolboxItemCollection((ToolboxItemCollection)null));
System\Drawing\Design\ToolboxItemTests.cs (4)
1309
Assert.
Throws
<ArgumentNullException>("typeName", () => item.GetType(mockDesignerHost.Object, null, null, false));
1310
Assert.
Throws
<ArgumentNullException>("typeName", () => item.GetType(null, null, null, false));
1582
Assert.
Throws
<ArgumentNullException>("value", () => item.ValidatePropertyValue(propertyName, null));
1598
Assert.
Throws
<ArgumentException>("value", () => item.ValidatePropertyValue(propertyName, new object()));
System\Resources\Tools\StronglyTypedResourceBuilderTests.cs (12)
29
Assert.
Throws
<ArgumentNullException>(
39
Assert.
Throws
<ArgumentNullException>(
51
Assert.
Throws
<ArgumentNullException>(
61
Assert.
Throws
<ArgumentNullException>(
77
Assert.
Throws
<ArgumentNullException>(
87
Assert.
Throws
<ArgumentNullException>(
99
Assert.
Throws
<ArgumentNullException>(
109
Assert.
Throws
<ArgumentNullException>(
125
Assert.
Throws
<ArgumentNullException>(
135
Assert.
Throws
<ArgumentNullException>(
150
Assert.
Throws
<ArgumentNullException>(
160
Assert.
Throws
<ArgumentNullException>(
System.Windows.Forms.Primitives.Tests (4)
System\Windows\Forms\NonNullCollectionTests.cs (4)
13
Assert.
Throws
<ArgumentNullException>("items", () => new TestCollection(null!));
19
Assert.
Throws
<ArgumentNullException>("items", () => new TestCollection(new object[] { null! }));
43
Assert.
Throws
<ArgumentNullException>("value", () => ((IList)collection).Add(null));
77
Assert.
Throws
<ArgumentNullException>("value", () => ((IList)collection)[0] = null);
System.Windows.Forms.Tests (803)
CheckedListBoxTests.cs (1)
119
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.SelectionMode = value);
System\Drawing\Design\PropertyValueUIItemTests.cs (2)
31
Assert.
Throws
<ArgumentNullException>("uiItemImage", () => new PropertyValueUIItem(null, Dummy_PropertyValueUIItemInvokeHandler, "tooltip"));
38
Assert.
Throws
<ArgumentNullException>("handler", () => new PropertyValueUIItem(uiItemImage, null, "tooltip"));
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (1)
109
Assert.
Throws
<ArgumentNullException>("ownerControl", () => new Control.ControlAccessibleObject(null));
System\Windows\Forms\AccessibleObjects\DataGridViewRowAccessibleObjectTests.cs (1)
271
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => accessibleObject.GetChild(index));
System\Windows\Forms\AccessibleObjects\ToolStripItemAccessibleObjectTests.cs (1)
39
Assert.
Throws
<ArgumentNullException>("ownerItem", () => new ToolStripItem.ToolStripItemAccessibleObject(null));
System\Windows\Forms\ApplicationTests.cs (2)
72
Assert.
Throws
<ArgumentNullException>("value", () => Application.CurrentCulture = null);
358
Assert.
Throws
<InvalidEnumArgumentException>("highDpiMode", () => Application.SetHighDpiMode(value));
System\Windows\Forms\AxHostTests.cs (6)
216
Assert.
Throws
<ArgumentNullException>("g", () => new SubAxHost(null));
217
Assert.
Throws
<ArgumentNullException>("g", () => new SubAxHost(null, 0));
342
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value);
568
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.ImeMode = value);
1510
Assert.
Throws
<ArgumentException>("font", () => SubAxHost.GetIFontDispFromFont(font));
1571
Assert.
Throws
<ArgumentException>("font", () => SubAxHost.GetIFontFromFont(font));
System\Windows\Forms\BindingContextTests.cs (8)
396
Assert.
Throws
<ArgumentNullException>("dataSource", () => context.Contains(null));
397
Assert.
Throws
<ArgumentNullException>("dataSource", () => context.Contains(null, null));
398
Assert.
Throws
<ArgumentNullException>("dataSource", () => context.Contains(null, string.Empty));
470
Assert.
Throws
<ArgumentNullException>("dataSource", () => context[mockIListSource.Object]);
682
Assert.
Throws
<ArgumentNullException>("dataSource", () => context[dataSource, "Property"]);
734
Assert.
Throws
<ArgumentNullException>("dataSource", () => context[null]);
735
Assert.
Throws
<ArgumentNullException>("dataSource", () => context[null, null]);
736
Assert.
Throws
<ArgumentNullException>("dataSource", () => context[null, string.Empty]);
System\Windows\Forms\BindingSourceTests.cs (1)
524
Assert.
Throws
<ArgumentNullException>("container", () => new SubBindingSource(null));
System\Windows\Forms\ButtonBaseTests.cs (6)
1373
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.FlatStyle = value);
2050
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.ImageAlign = value);
2211
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.ImageIndex = value);
2704
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.ImeMode = value);
3493
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.TextAlign = value);
3723
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.TextImageRelation = value);
System\Windows\Forms\ButtonTests.cs (2)
609
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.AutoSizeMode = value);
663
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.DialogResult = value);
System\Windows\Forms\CheckBoxTests.cs (4)
168
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.Appearance = value);
205
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.CheckAlign = value);
287
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.CheckState = value);
442
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.TextAlign = value);
System\Windows\Forms\ColumnHeaderCollectionTests.cs (10)
22
Assert.
Throws
<ArgumentNullException>("owner", () => new ListView.ColumnHeaderCollection(null));
59
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
84
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
144
Assert.
Throws
<ArgumentException>("ch", () => collection.Add(header));
156
Assert.
Throws
<ArgumentException>("ch", () => collection.Add(header));
318
Assert.
Throws
<ArgumentNullException>("ch", () => collection.Add((ColumnHeader)null));
327
Assert.
Throws
<InvalidEnumArgumentException>("value", () => collection.Add("text", 1, textAlign));
328
Assert.
Throws
<InvalidEnumArgumentException>("value", () => collection.Add("name", "text", 1, textAlign, "imageKey"));
329
Assert.
Throws
<InvalidEnumArgumentException>("value", () => collection.Add("name", "text", 1, textAlign, 1));
350
Assert.
Throws
<ArgumentException>("value", () => collection.Add(value));
System\Windows\Forms\ColumnHeaderConverterTests.cs (1)
123
Assert.
Throws
<ArgumentNullException>("destinationType", () => converter.ConvertTo(new object(), null));
System\Windows\Forms\ColumnHeaderTests.cs (3)
233
Assert.
Throws
<ArgumentOutOfRangeException>("DisplayIndex", () => header.DisplayIndex = value);
486
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => header.ImageIndex = value);
1213
Assert.
Throws
<InvalidEnumArgumentException>("value", () => header.TextAlign = value);
System\Windows\Forms\ColumnStyleTests.cs (2)
42
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => new ColumnStyle(SizeType.AutoSize, -1));
139
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => style.Width = -1);
System\Windows\Forms\Combobox.ObjectCollectionTests.cs (4)
95
Assert.
Throws
<ArgumentNullException>("item", () => comboBoxObjectCollection.Add(null));
1318
Assert.
Throws
<ArgumentNullException>("value", () => comboBoxObjectCollection[0] = null);
1335
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => comboBoxObjectCollection[-1] = 1);
1352
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => comboBoxObjectCollection[3] = 1);
System\Windows\Forms\ComboBoxTests.cs (7)
160
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.AutoCompleteMode = value);
613
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value);
887
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.AutoCompleteSource = source);
981
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.DropDownStyle = value);
1316
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.RightToLeft = value);
1590
Assert.
Throws
<ArgumentOutOfRangeException>("startIndex", () => control.FindString("s", startIndex));
1714
Assert.
Throws
<ArgumentOutOfRangeException>("startIndex", () => control.FindStringExact("s", startIndex));
System\Windows\Forms\ContainerControlTests.cs (6)
175
Assert.
Throws
<ArgumentException>("value", () => control.ActiveControl = control);
176
Assert.
Throws
<ArgumentException>("value", () => control.ActiveControl = new Control());
217
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.AutoScaleDimensions = value);
273
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.AutoScaleMode = value);
341
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.AutoValidate = value);
1215
Assert.
Throws
<InvalidEnumArgumentException>("validationConstraints", () => control.ValidateChildren(validationConstraints));
System\Windows\Forms\ControlBindingsCollectionTests.cs (18)
228
Assert.
Throws
<ArgumentNullException>("dataSource", () => collection.Add("propertyName", null, "dataMember"));
229
Assert.
Throws
<ArgumentNullException>("dataSource", () => collection.Add("propertyName", null, "dataMember", true));
230
Assert.
Throws
<ArgumentNullException>("dataSource", () => collection.Add("propertyName", null, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged));
231
Assert.
Throws
<ArgumentNullException>("dataSource", () => collection.Add("propertyName", null, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null"));
232
Assert.
Throws
<ArgumentNullException>("dataSource", () => collection.Add("propertyName", null, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString"));
233
Assert.
Throws
<ArgumentNullException>("dataSource", () => collection.Add("propertyName", null, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString", CultureInfo.CurrentCulture));
242
Assert.
Throws
<ArgumentException>("PropertyName", () => collection.Add("NoSuchProperty", new object(), "dataMember"));
243
Assert.
Throws
<ArgumentException>("PropertyName", () => collection.Add("NoSuchProperty", new object(), "dataMember", true));
244
Assert.
Throws
<ArgumentException>("PropertyName", () => collection.Add("NoSuchProperty", new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged));
245
Assert.
Throws
<ArgumentException>("PropertyName", () => collection.Add("NoSuchProperty", new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null"));
246
Assert.
Throws
<ArgumentException>("PropertyName", () => collection.Add("NoSuchProperty", new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString"));
247
Assert.
Throws
<ArgumentException>("PropertyName", () => collection.Add("NoSuchProperty", new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString", CultureInfo.CurrentCulture));
259
Assert.
Throws
<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember"));
260
Assert.
Throws
<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true));
261
Assert.
Throws
<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged));
262
Assert.
Throws
<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null"));
263
Assert.
Throws
<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString"));
264
Assert.
Throws
<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString", CultureInfo.CurrentCulture));
System\Windows\Forms\ControlPaintTests.cs (1)
261
Assert.
Throws
<ArgumentNullException>("bitmap", () => ControlPaint.CreateHBitmapTransparencyMask(null));
System\Windows\Forms\ControlTests.ControlCollection.cs (10)
28
Assert.
Throws
<ArgumentNullException>("owner", () => new Control.ControlCollection(null));
1516
Assert.
Throws
<ArgumentNullException>("key", () => collection.Find(key, searchAllChildren: true));
1517
Assert.
Throws
<ArgumentNullException>("key", () => collection.Find(key, searchAllChildren: false));
1728
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => enumerator.Current);
1731
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => enumerator.Current);
1735
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => enumerator.Current);
1892
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
1907
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
3507
Assert.
Throws
<ArgumentException>("control", () => collection.Add(new object()));
3508
Assert.
Throws
<ArgumentException>("control", () => collection.Add(null));
System\Windows\Forms\ControlTests.Methods.cs (1)
2095
Assert.
Throws
<InvalidEnumArgumentException>("skipValue", () => control.GetChildAtPoint(new Point(5, 5), skipValue));
System\Windows\Forms\ControlTests.Properties.cs (7)
176
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.AccessibleRole = value);
2135
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value);
4423
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.Dock = value);
6445
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.ImeMode = value);
6552
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.ImeModeBase = value);
10436
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.RightToLeft = value);
11859
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.TabIndex = -1);
System\Windows\Forms\CursorConverterTests.cs (2)
59
Assert.
Throws
<ArgumentException>("stream", () => converter.ConvertFrom(Array.Empty<byte>()));
169
Assert.
Throws
<ArgumentNullException>("destinationType", () => converter.ConvertTo(new object(), null));
System\Windows\Forms\CursorTests.cs (9)
53
Assert.
Throws
<ArgumentException>("handle", () => new Cursor(IntPtr.Zero));
86
Assert.
Throws
<ArgumentException>("stream", () => new Cursor(new MemoryStream()));
92
Assert.
Throws
<ArgumentNullException>("stream", () => new Cursor((Stream)null));
111
Assert.
Throws
<ArgumentException>("stream", () => new Cursor(stream));
128
Assert.
Throws
<ArgumentNullException>("path", () => new Cursor((string)null));
136
Assert.
Throws
<ArgumentException>("path", () => new Cursor(fileName));
149
Assert.
Throws
<ArgumentException>("fileName", () => new Cursor(fileName));
165
Assert.
Throws
<ArgumentNullException>("type", () => new Cursor((Type)null, "resource"));
174
Assert.
Throws
<ArgumentNullException>("stream", () => new Cursor(type, resource));
System\Windows\Forms\DataFormatsTests.cs (2)
108
Assert.
Throws
<ArgumentException>("format", () => DataFormats.GetFormat(""));
109
Assert.
Throws
<ArgumentNullException>("format", () => DataFormats.GetFormat(null));
System\Windows\Forms\DataGridView.DataGridViewControlCollectionTests.cs (1)
22
Assert.
Throws
<ArgumentNullException>("owner", () => new DataGridView.DataGridViewControlCollection(null));
System\Windows\Forms\DataGridViewCellCancelEventArgsTests.cs (2)
24
Assert.
Throws
<ArgumentOutOfRangeException>("columnIndex", () => new DataGridViewCellCancelEventArgs(-2, 0));
30
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => new DataGridViewCellCancelEventArgs(0, -2));
System\Windows\Forms\DataGridViewCellContextMenuStripNeededEventArgsTests.cs (2)
24
Assert.
Throws
<ArgumentOutOfRangeException>("columnIndex", () => new DataGridViewCellContextMenuStripNeededEventArgs(-2, 0));
30
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => new DataGridViewCellContextMenuStripNeededEventArgs(0, -2));
System\Windows\Forms\DataGridViewCellEventArgsTests.cs (2)
23
Assert.
Throws
<ArgumentOutOfRangeException>("columnIndex", () => new DataGridViewCellEventArgs(-2, 0));
29
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => new DataGridViewCellEventArgs(0, -2));
System\Windows\Forms\DataGridViewCellFormattingEventArgsTests.cs (2)
32
Assert.
Throws
<ArgumentOutOfRangeException>("columnIndex", () => new DataGridViewCellFormattingEventArgs(-2, 0, "value", typeof(string), null));
38
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => new DataGridViewCellFormattingEventArgs(0, -2, "value", typeof(string), null));
System\Windows\Forms\DataGridViewCellMouseEventArgsTests.cs (5)
33
Assert.
Throws
<ArgumentOutOfRangeException>("columnIndex", () => new DataGridViewCellMouseEventArgs(-2, 0, 1, 2, null));
34
Assert.
Throws
<ArgumentOutOfRangeException>("columnIndex", () => new DataGridViewCellMouseEventArgs(-2, 0, 1, 2, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4)));
40
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => new DataGridViewCellMouseEventArgs(0, -2, 1, 2, null));
41
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => new DataGridViewCellMouseEventArgs(0, -2, 1, 2, new MouseEventArgs(MouseButtons.Left, 1, 2, 3, 4)));
47
Assert.
Throws
<ArgumentNullException>("e", () => new DataGridViewCellMouseEventArgs(1, 2, 1, 2, null));
System\Windows\Forms\DataGridViewCellPaintingEventArgsTests.cs (4)
46
Assert.
Throws
<ArgumentNullException>("dataGridView", () => new DataGridViewCellPaintingEventArgs(null, graphics, Rectangle.Empty, Rectangle.Empty, -2, -2, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), null, DataGridViewPaintParts.All));
53
Assert.
Throws
<ArgumentNullException>("graphics", () => new DataGridViewCellPaintingEventArgs(dataGridView, null, Rectangle.Empty, Rectangle.Empty, -2, -2, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), null, DataGridViewPaintParts.All));
62
Assert.
Throws
<ArgumentNullException>("cellStyle", () => new DataGridViewCellPaintingEventArgs(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, -2, DataGridViewElementStates.Displayed, null, null, null, null, null, DataGridViewPaintParts.All));
72
Assert.
Throws
<ArgumentException>("paintParts", () => new DataGridViewCellPaintingEventArgs(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, -2, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), null, paintParts));
System\Windows\Forms\DataGridViewCellStateChangedEventArgsTests.cs (1)
23
Assert.
Throws
<ArgumentNullException>("dataGridViewCell", () => new DataGridViewCellStateChangedEventArgs(null, DataGridViewElementStates.None));
System\Windows\Forms\DataGridViewCellStyleTests.cs (3)
105
Assert.
Throws
<ArgumentNullException>("dataGridViewCellStyle", () => new DataGridViewCellStyle(null));
128
Assert.
Throws
<InvalidEnumArgumentException>("value", () => style.Alignment = value);
610
Assert.
Throws
<InvalidEnumArgumentException>("value", () => style.WrapMode = value);
System\Windows\Forms\DataGridViewCellTests.cs (46)
103
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.ContentBounds);
675
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.EditedFormattedValue);
728
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.ErrorIconBounds);
1323
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.FormattedValue);
1503
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.InheritedState);
3109
Assert.
Throws
<ArgumentNullException>("dataGridViewAdvancedBorderStyleInput", () => cell.AdjustCellBorderStyle(null, controlAdvancedBorderStylePlaceholder, true, true, true, true));
3141
Assert.
Throws
<ArgumentNullException>("dataGridViewAdvancedBorderStylePlaceholder", () => cell.AdjustCellBorderStyle(controlAdvancedBorderStyleInput, null, true, true, true, true));
3303
Assert.
Throws
<ArgumentNullException>("advancedBorderStyle", () => cell.BorderWidths(null));
3649
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetContentBounds(rowIndex));
3801
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetEditedFormattedValue(rowIndex, DataGridViewDataErrorContexts.Formatting));
4131
Assert.
Throws
<ArgumentOutOfRangeException>("e.RowIndex", () => cell.GetErrorText(1));
4394
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetInheritedContextMenuStrip(rowIndex));
4411
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetInheritedContextMenuStrip(rowIndex));
4627
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetInheritedState(-1));
4658
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetInheritedState(rowIndex));
4675
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetInheritedState(rowIndex));
4692
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetInheritedState(rowIndex));
4741
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetInheritedStyle(new DataGridViewCellStyle(), rowIndex, true));
4905
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetSize(rowIndex));
5050
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.Value = value);
5186
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetValue(rowIndex));
5203
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetValue(rowIndex));
5281
Assert.
Throws
<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextHeight(null, "text", SystemFonts.DefaultFont, 10, TextFormatFlags.Default));
5282
Assert.
Throws
<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextHeight(null, "text", SystemFonts.DefaultFont, 10, TextFormatFlags.Default, out widthTruncated));
5292
Assert.
Throws
<ArgumentNullException>("font", () => DataGridViewCell.MeasureTextHeight(graphics, "text", null, 10, TextFormatFlags.Default));
5293
Assert.
Throws
<ArgumentNullException>("font", () => DataGridViewCell.MeasureTextHeight(graphics, "text", null, 10, TextFormatFlags.Default, out widthTruncated));
5305
Assert.
Throws
<ArgumentOutOfRangeException>("maxWidth", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.DefaultFont, maxWidth, TextFormatFlags.Default));
5306
Assert.
Throws
<ArgumentOutOfRangeException>("maxWidth", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.DefaultFont, maxWidth, TextFormatFlags.Default, out widthTruncated));
5317
Assert.
Throws
<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.DefaultFont, 10, flags));
5318
Assert.
Throws
<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.DefaultFont, 10, flags, out widthTruncated));
5348
Assert.
Throws
<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextPreferredSize(null, "text", SystemFonts.DefaultFont, 0.2f, TextFormatFlags.Default));
5356
Assert.
Throws
<ArgumentNullException>("font", () => DataGridViewCell.MeasureTextPreferredSize(graphics, "text", null, 0.2f, TextFormatFlags.Default));
5366
Assert.
Throws
<ArgumentOutOfRangeException>("maxRatio", () => DataGridViewCell.MeasureTextPreferredSize(graphics, "text", SystemFonts.DefaultFont, maxRatio, TextFormatFlags.Default));
5375
Assert.
Throws
<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextPreferredSize(graphics, "text", SystemFonts.DefaultFont, 0.2f, flags));
5404
Assert.
Throws
<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextSize(null, "text", SystemFonts.DefaultFont, TextFormatFlags.Default));
5412
Assert.
Throws
<ArgumentNullException>("font", () => DataGridViewCell.MeasureTextSize(graphics, "text", null, TextFormatFlags.Default));
5421
Assert.
Throws
<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextSize(graphics, "text", SystemFonts.DefaultFont, flags));
5450
Assert.
Throws
<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextWidth(null, "text", SystemFonts.DefaultFont, 10, TextFormatFlags.Default));
5458
Assert.
Throws
<ArgumentNullException>("font", () => DataGridViewCell.MeasureTextWidth(graphics, "text", null, 10, TextFormatFlags.Default));
5468
Assert.
Throws
<ArgumentOutOfRangeException>("maxHeight", () => DataGridViewCell.MeasureTextWidth(graphics, "text", SystemFonts.DefaultFont, maxHeight, TextFormatFlags.Default));
5477
Assert.
Throws
<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextWidth(graphics, "text", SystemFonts.DefaultFont, 10, flags));
6162
Assert.
Throws
<ArgumentNullException>("cellStyle", () => cell.ParseFormattedValue(1, null, new Int32Converter(), new Int32Converter()));
6215
Assert.
Throws
<ArgumentException>("formattedValue", () => cell.ParseFormattedValue(formattedValue, new DataGridViewCellStyle(), new Int32Converter(), new Int32Converter()));
6347
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.SetValue(rowIndex, "value"));
6364
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.SetValue(rowIndex, "value"));
6381
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.SetValue(rowIndex, "value"));
System\Windows\Forms\DataGridViewCellValueEventArgsTests.cs (2)
25
Assert.
Throws
<ArgumentOutOfRangeException>("columnIndex", () => new DataGridViewCellValueEventArgs(columnIndex, 0));
33
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => new DataGridViewCellValueEventArgs(0, rowIndex));
System\Windows\Forms\DataGridViewColumnCollectionTests.cs (1)
330
Assert.
Throws
<ArgumentNullException>("dataGridViewColumn", () => collection.Add(null));
System\Windows\Forms\DataGridViewColumnDividerDoubleClickEventArgsTests.cs (3)
33
Assert.
Throws
<ArgumentOutOfRangeException>("columnIndex", () => new DataGridViewColumnDividerDoubleClickEventArgs(-2, null));
34
Assert.
Throws
<ArgumentOutOfRangeException>("columnIndex", () => new DataGridViewColumnDividerDoubleClickEventArgs(-2, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4, true)));
40
Assert.
Throws
<ArgumentNullException>("e", () => new DataGridViewColumnDividerDoubleClickEventArgs(1, null));
System\Windows\Forms\DataGridViewColumnEventArgsTests.cs (1)
20
Assert.
Throws
<ArgumentNullException>("dataGridViewColumn", () => new DataGridViewColumnEventArgs(null));
System\Windows\Forms\DataGridViewColumnTests.cs (6)
491
Assert.
Throws
<InvalidEnumArgumentException>("value", () => column.AutoSizeMode = value);
1000
Assert.
Throws
<ArgumentException>("value", () => column.DefaultHeaderCellType = value);
1011
Assert.
Throws
<ArgumentException>("value", () => column.DefaultHeaderCellType = value);
1118
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => column.DividerWidth = value);
1781
Assert.
Throws
<InvalidEnumArgumentException>("autoSizeColumnMode", () => column.GetPreferredWidth(autoSizeColumnMode, fixedHeight: true));
1782
Assert.
Throws
<InvalidEnumArgumentException>("autoSizeColumnMode", () => column.GetPreferredWidth(autoSizeColumnMode, fixedHeight: false));
System\Windows\Forms\DataGridViewDataErrorEventArgsTests.cs (2)
32
Assert.
Throws
<ArgumentOutOfRangeException>("columnIndex", () => new DataGridViewDataErrorEventArgs(null, -2, 0, DataGridViewDataErrorContexts.Formatting));
38
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => new DataGridViewDataErrorEventArgs(null, 0, -2, DataGridViewDataErrorContexts.Formatting));
System\Windows\Forms\DataGridViewEditingControlShowingEventArgsTests.cs (1)
37
Assert.
Throws
<ArgumentNullException>("value", () => e.CellStyle = null);
System\Windows\Forms\DataGridViewHeaderCellTests.cs (26)
3003
Assert.
Throws
<ArgumentException>("rowIndex", () => cell.GetInheritedState(-1));
3014
Assert.
Throws
<ArgumentException>("rowIndex", () => cell.GetInheritedState(rowIndex));
3025
Assert.
Throws
<ArgumentException>("rowIndex", () => cell.GetInheritedState(rowIndex));
3036
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetInheritedState(rowIndex));
3053
Assert.
Throws
<ArgumentException>("rowIndex", () => cell.GetInheritedState(rowIndex));
3073
Assert.
Throws
<ArgumentException>("rowIndex", () => cell.GetInheritedState(rowIndex));
3091
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetInheritedState(rowIndex));
3102
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetInheritedState(rowIndex));
3119
Assert.
Throws
<ArgumentException>("rowIndex", () => cell.GetInheritedState(rowIndex));
3271
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetSize(rowIndex));
3283
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetSize(rowIndex));
3295
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetSize(rowIndex));
3307
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetSize(rowIndex));
3324
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetSize(rowIndex));
3341
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetSize(rowIndex));
3464
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.Value = value);
3605
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.Value = value1);
3643
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.Value = value1);
3684
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.Value = value1);
3713
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetValue(rowIndex));
3725
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetValue(rowIndex));
3737
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetValue(rowIndex));
3754
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetValue(rowIndex));
3772
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetValue(rowIndex));
3786
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetValue(rowIndex));
3803
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => cell.GetValue(rowIndex));
System\Windows\Forms\DataGridViewRowContextMenuStripNeededEventArgsTests.cs (1)
23
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => new DataGridViewRowContextMenuStripNeededEventArgs(-2));
System\Windows\Forms\DataGridViewRowDividerDoubleClickEventArgsTests.cs (3)
33
Assert.
Throws
<ArgumentNullException>("e", () => new DataGridViewRowDividerDoubleClickEventArgs(-2, null));
34
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => new DataGridViewRowDividerDoubleClickEventArgs(-2, new HandledMouseEventArgs(MouseButtons.Left, 1, 2, 3, 4, true)));
40
Assert.
Throws
<ArgumentNullException>("e", () => new DataGridViewRowDividerDoubleClickEventArgs(1, null));
System\Windows\Forms\DataGridViewRowEventArgsTests.cs (1)
20
Assert.
Throws
<ArgumentNullException>("dataGridViewRow", () => new DataGridViewRowEventArgs(null));
System\Windows\Forms\DataGridViewRowHeightInfoNeededEventArgsTests.cs (2)
50
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => e.Height = value);
106
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => e.MinimumHeight = value);
System\Windows\Forms\DataGridViewRowPostPaintEventArgsTests.cs (3)
42
Assert.
Throws
<ArgumentNullException>("dataGridView", () => new DataGridViewRowPostPaintEventArgs(null, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false));
49
Assert.
Throws
<ArgumentNullException>("graphics", () => new DataGridViewRowPostPaintEventArgs(dataGridView, null, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false));
58
Assert.
Throws
<ArgumentNullException>("inheritedRowStyle", () => new DataGridViewRowPostPaintEventArgs(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, null, false, false));
System\Windows\Forms\DataGridViewRowPrePaintEventArgsTests.cs (4)
43
Assert.
Throws
<ArgumentNullException>("dataGridView", () => new DataGridViewRowPrePaintEventArgs(null, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false));
50
Assert.
Throws
<ArgumentNullException>("graphics", () => new DataGridViewRowPrePaintEventArgs(dataGridView, null, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false));
59
Assert.
Throws
<ArgumentNullException>("inheritedRowStyle", () => new DataGridViewRowPrePaintEventArgs(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, null, false, false));
106
Assert.
Throws
<ArgumentException>("value", () => e.PaintParts = value);
System\Windows\Forms\DataGridViewRowsRemovedEventArgsTests.cs (2)
24
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => new DataGridViewRowsRemovedEventArgs(rowIndex, 1));
33
Assert.
Throws
<ArgumentOutOfRangeException>("rowCount", () => new DataGridViewRowsRemovedEventArgs(1, rowCount));
System\Windows\Forms\DataGridViewRowTests.cs (13)
722
Assert.
Throws
<ArgumentException>("value", () => row.DefaultHeaderCellType = value);
733
Assert.
Throws
<ArgumentException>("value", () => row.DefaultHeaderCellType = value);
874
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => row.DividerHeight = value);
1109
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => row.ErrorText = "value");
1776
Assert.
Throws
<ArgumentException>("value", () => row.HeaderCellCore = value);
2015
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => row.Height = value);
2485
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => row.MinimumHeight = value);
2900
Assert.
Throws
<InvalidEnumArgumentException>("value", () => row.Resizable = value);
4369
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => row.GetContextMenuStrip(rowIndex));
4493
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => row.GetErrorText(rowIndex));
4549
Assert.
Throws
<ArgumentException>("rowIndex", () => row.GetState(rowIndex));
4563
Assert.
Throws
<ArgumentOutOfRangeException>("rowIndex", () => row.GetState(rowIndex));
5725
Assert.
Throws
<ArgumentNullException>("values", () => row.SetValues(null));
System\Windows\Forms\DataGridViewSelectedCellCollectionTests.cs (4)
67
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
86
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
243
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => iList[index]);
263
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => iList[index]);
System\Windows\Forms\DataGridViewSelectedColumnCollectionTests.cs (4)
75
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
98
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
271
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => iList[index]);
295
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => iList[index]);
System\Windows\Forms\DataGridViewSelectedRowCollectionTests.cs (4)
65
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
83
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
236
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => iList[index]);
255
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => iList[index]);
System\Windows\Forms\DataGridViewTests.cs (4)
491
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.ColumnHeadersHeight = value);
784
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.ColumnHeadersHeightSizeMode = value);
1419
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.RowHeadersWidth = value);
1725
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.RowHeadersWidthSizeMode = value);
System\Windows\Forms\DateTimePickerTests.cs (1)
168
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.Format = value);
System\Windows\Forms\Design\WindowsFormsComponentEditorTests.cs (3)
85
Assert.
Throws
<ArgumentException>("component", () => editor.EditComponent(component, null));
86
Assert.
Throws
<ArgumentException>("component", () => editor.EditComponent(null, component));
87
Assert.
Throws
<ArgumentException>("component", () => editor.EditComponent(null, component, null));
System\Windows\Forms\DrawItemEventArgsTests.cs (2)
65
Assert.
Throws
<ArgumentNullException>("graphics", () => new DrawItemEventArgs(null, SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 0, DrawItemState.None));
66
Assert.
Throws
<ArgumentNullException>("graphics", () => new DrawItemEventArgs(null, SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 0, DrawItemState.None, Color.Red, Color.Blue));
System\Windows\Forms\DrawListViewColumnHeaderEventArgsTests.cs (1)
40
Assert.
Throws
<ArgumentNullException>("graphics", () => new DrawListViewColumnHeaderEventArgs(null, new Rectangle(1, 2, 3, 4), 0, new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.DefaultFont));
System\Windows\Forms\DrawListViewItemEventArgsTests.cs (2)
38
Assert.
Throws
<ArgumentNullException>("graphics", () => new DrawListViewItemEventArgs(null, new ListViewItem(), new Rectangle(1, 2, 3, 4), 0, ListViewItemStates.Default));
46
Assert.
Throws
<ArgumentNullException>("item", () => new DrawListViewItemEventArgs(graphics, null, new Rectangle(1, 2, 3, 4), 0, ListViewItemStates.Default));
System\Windows\Forms\DrawListViewSubItemEventArgsTests.cs (3)
41
Assert.
Throws
<ArgumentNullException>("graphics", () => new DrawListViewSubItemEventArgs(null, new Rectangle(1, 2, 3, 4), new ListViewItem(), new ListViewItem.ListViewSubItem(), -1, 0, new ColumnHeader(), ListViewItemStates.Default));
49
Assert.
Throws
<ArgumentNullException>("item", () => new DrawListViewSubItemEventArgs(graphics, new Rectangle(1, 2, 3, 4), null, new ListViewItem.ListViewSubItem(), -1, 0, new ColumnHeader(), ListViewItemStates.Default));
59
Assert.
Throws
<ArgumentNullException>("subItem", () => new DrawListViewSubItemEventArgs(graphics, new Rectangle(1, 2, 3, 4), new ListViewItem(), null, itemIndex, 0, new ColumnHeader(), ListViewItemStates.Default));
System\Windows\Forms\ErrorProviderTests.cs (8)
59
Assert.
Throws
<ArgumentNullException>("parentControl", () => new ErrorProvider((ContainerControl)null));
86
Assert.
Throws
<ArgumentNullException>("container", () => new ErrorProvider((IContainer)null));
117
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => provider.BlinkRate = -1);
179
Assert.
Throws
<InvalidEnumArgumentException>("value", () => provider.BlinkStyle = value);
585
Assert.
Throws
<ArgumentNullException>("value", () => provider.Icon = null);
964
Assert.
Throws
<ArgumentNullException>("control", () => provider.GetError(null));
982
Assert.
Throws
<ArgumentNullException>("control", () => provider.GetIconAlignment(null));
1000
Assert.
Throws
<ArgumentNullException>("control", () => provider.GetIconPadding(null));
System\Windows\Forms\FileDialogTests.cs (1)
332
Assert.
Throws
<ArgumentException>("value", () => dialog.Filter = value);
System\Windows\Forms\FlowLayoutPanelTests.cs (2)
175
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.FlowDirection = value);
259
Assert.
Throws
<ArgumentNullException>("control", () => control.GetFlowBreak(null));
System\Windows\Forms\FlowLayoutSettingsTests.cs (2)
52
Assert.
Throws
<InvalidEnumArgumentException>("value", () => settings.FlowDirection = value);
111
Assert.
Throws
<ArgumentNullException>("child", () => settings.GetFlowBreak(null));
System\Windows\Forms\Form.ControlCollectionTests.cs (1)
22
Assert.
Throws
<ArgumentNullException>("owner", () => new Form.ControlCollection(null));
System\Windows\Forms\FormTests.cs (1)
1221
Assert.
Throws
<ArgumentException>("value", () => control.Parent = parent);
System\Windows\Forms\GroupBoxTests.cs (1)
561
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.AutoSizeMode = value);
System\Windows\Forms\HelpProviderTests.cs (4)
97
Assert.
Throws
<ArgumentNullException>("ctl", () => provider.GetHelpKeyword(null));
111
Assert.
Throws
<ArgumentNullException>("ctl", () => provider.GetHelpNavigator(null));
125
Assert.
Throws
<ArgumentNullException>("ctl", () => provider.GetHelpString(null));
139
Assert.
Throws
<ArgumentNullException>("ctl", () => provider.GetShowHelp(null));
System\Windows\Forms\HScrollBarTests.cs (1)
197
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.RightToLeft = value);
System\Windows\Forms\ImageList.ImageCollectionTests.cs (12)
223
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
235
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
305
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index] = null);
317
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index] = null);
328
Assert.
Throws
<ArgumentNullException>("value", () => collection[0] = null);
794
Assert.
Throws
<ArgumentNullException>("value", () => collection.Add(null, Color.Transparent));
941
Assert.
Throws
<ArgumentNullException>("value", () => collection.AddStrip(null));
953
Assert.
Throws
<ArgumentException>("value", () => collection.AddStrip(image));
965
Assert.
Throws
<ArgumentException>("value", () => collection.AddStrip(image));
1680
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index] = value);
1694
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index] = image);
1712
Assert.
Throws
<ArgumentException>("value", () => collection[0] = value);
System\Windows\Forms\ImageListTests.cs (5)
51
Assert.
Throws
<ArgumentNullException>("container", () => new ImageList(null));
223
Assert.
Throws
<InvalidEnumArgumentException>("value", () => list.ColorDepth = value);
402
Assert.
Throws
<ArgumentException>("value", () => list.ImageSize = Size.Empty);
417
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => list.ImageSize = new Size(width, 1));
425
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => list.ImageSize = new Size(1, height));
System\Windows\Forms\InputLanguageChangedEventArgsTests.cs (3)
30
Assert.
Throws
<ArgumentNullException>("culture", () => new InputLanguageChangedEventArgs((CultureInfo)null, 0));
43
Assert.
Throws
<ArgumentException>("culture", () => new InputLanguageChangedEventArgs(culture, 0));
71
Assert.
Throws
<ArgumentNullException>("inputLanguage", () => new InputLanguageChangedEventArgs((InputLanguage)null, 0));
System\Windows\Forms\InputLanguageChangingEventArgsTests.cs (3)
31
Assert.
Throws
<ArgumentNullException>("culture", () => new InputLanguageChangingEventArgs((CultureInfo)null, true));
44
Assert.
Throws
<ArgumentException>("culture", () => new InputLanguageChangingEventArgs(culture, true));
72
Assert.
Throws
<ArgumentNullException>("inputLanguage", () => new InputLanguageChangingEventArgs((InputLanguage)null, true));
System\Windows\Forms\InputLanguageTests.cs (2)
66
Assert.
Throws
<ArgumentException>("value", () => InputLanguage.CurrentInputLanguage = language);
103
Assert.
Throws
<ArgumentNullException>("culture", () => InputLanguage.FromCulture(null));
System\Windows\Forms\LabelTests.cs (1)
246
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.ImageAlign = value);
System\Windows\Forms\Layout\FlowLayoutTests.cs (1)
289
Assert.
Throws
<ArgumentNullException>("container", () => engine.Layout(null, new LayoutEventArgs(control, "affectedProperty")));
System\Windows\Forms\Layout\LayoutEngineTests.cs (1)
49
Assert.
Throws
<ArgumentNullException>("container", () => engine.Layout(null, new LayoutEventArgs(new Component(), "affectedProperty")));
System\Windows\Forms\Layout\TableLayoutSettingsTests.cs (18)
79
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => settings.ColumnCount = -1);
117
Assert.
Throws
<InvalidEnumArgumentException>("value", () => settings.GrowStyle = value);
153
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => settings.RowCount = -1);
179
Assert.
Throws
<ArgumentNullException>("control", () => settings.GetCellPosition(null));
187
Assert.
Throws
<ArgumentNullException>("control", () => settings.GetCellPosition(null));
213
Assert.
Throws
<ArgumentOutOfRangeException>("column", () => settings.GetCellPosition(child));
223
Assert.
Throws
<ArgumentOutOfRangeException>("column", () => settings.GetCellPosition(child));
233
Assert.
Throws
<ArgumentOutOfRangeException>("row", () => settings.GetCellPosition(child));
243
Assert.
Throws
<ArgumentOutOfRangeException>("row", () => settings.GetCellPosition(child));
269
Assert.
Throws
<ArgumentNullException>("control", () => settings.GetColumn(null));
277
Assert.
Throws
<ArgumentNullException>("control", () => settings.GetColumn(null));
320
Assert.
Throws
<ArgumentNullException>("control", () => settings.GetColumnSpan(null));
328
Assert.
Throws
<ArgumentNullException>("control", () => settings.GetColumnSpan(null));
370
Assert.
Throws
<ArgumentNullException>("control", () => settings.GetRow(null));
378
Assert.
Throws
<ArgumentNullException>("control", () => settings.GetRow(null));
420
Assert.
Throws
<ArgumentNullException>("control", () => settings.GetRowSpan(null));
428
Assert.
Throws
<ArgumentNullException>("control", () => settings.GetRowSpan(null));
1112
Assert.
Throws
<ArgumentNullException>("control", () => settings.GetColumnSpan(null));
System\Windows\Forms\Layout\TableLayoutSettingsTypeConverterTests.cs (1)
288
Assert.
Throws
<ArgumentNullException>("destinationType", () => converter.ConvertTo(new object(), null));
System\Windows\Forms\LinkAreaConverterTests.cs (3)
94
Assert.
Throws
<ArgumentNullException>("destinationType", () => converter.ConvertTo(new object(), null));
130
Assert.
Throws
<ArgumentNullException>("propertyValues", () => converter.CreateInstance(null, null));
189
Assert.
Throws
<ArgumentException>("propertyValues", () => converter.CreateInstance(null, propertyValues));
System\Windows\Forms\LinkConverterTests.cs (1)
103
Assert.
Throws
<ArgumentNullException>("destinationType", () => converter.ConvertTo(new object(), null));
System\Windows\Forms\ListBox.IntegerCollectionTests.cs (9)
22
Assert.
Throws
<ArgumentNullException>("owner", () => new ListBox.IntegerCollection(null));
67
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
81
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
228
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index] = 2);
242
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index] = 2);
1535
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
1549
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
1712
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index] = 2);
1726
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index] = 2);
System\Windows\Forms\ListBox.ObjectCollectionTests.cs (23)
49
Assert.
Throws
<ArgumentNullException>("owner", () => new ListBox.ObjectCollection(null));
50
Assert.
Throws
<ArgumentNullException>("owner", () => new ListBox.ObjectCollection(null, new ListBox.ObjectCollection(owner)));
51
Assert.
Throws
<ArgumentNullException>("owner", () => new ListBox.ObjectCollection(null, Array.Empty<object>()));
78
Assert.
Throws
<ArgumentNullException>("value", () => new ListBox.ObjectCollection(owner, (object[])null));
79
Assert.
Throws
<ArgumentNullException>("value", () => new ListBox.ObjectCollection(owner, (ListBox.ObjectCollection)null));
141
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
155
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
1253
Assert.
Throws
<ArgumentNullException>("value", () => collection[index] = null);
1268
Assert.
Throws
<ArgumentNullException>("value", () => collection[index] = null);
1279
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index] = 2);
1293
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index] = 2);
2184
Assert.
Throws
<ArgumentNullException>("item", () => collection.Add(null));
3978
Assert.
Throws
<ArgumentNullException>("value", () => collection.Contains(null));
4116
Assert.
Throws
<ArgumentNullException>("value", () => collection.IndexOf(null));
6926
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
6940
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
8058
Assert.
Throws
<ArgumentNullException>("value", () => collection[index] = null);
8073
Assert.
Throws
<ArgumentNullException>("value", () => collection[index] = null);
8084
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index] = 2);
8098
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index] = 2);
8989
Assert.
Throws
<ArgumentNullException>("item", () => collection.Add(null));
9300
Assert.
Throws
<ArgumentNullException>("value", () => collection.Contains(null));
9438
Assert.
Throws
<ArgumentNullException>("value", () => collection.IndexOf(null));
System\Windows\Forms\ListBox.SelectedIndexCollectionTests.cs (1)
23
Assert.
Throws
<ArgumentNullException>("owner", () => new ListBox.SelectedIndexCollection(null));
System\Windows\Forms\ListBox.SelectedObjectCollectionTests.cs (1)
23
Assert.
Throws
<ArgumentNullException>("owner", () => new ListBox.SelectedObjectCollection(null));
System\Windows\Forms\ListBoxTests.cs (28)
588
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value);
648
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BorderStyle = value);
777
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.ColumnWidth = -1);
1027
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.DrawMode = value);
1037
Assert.
Throws
<ArgumentException>("value", () => control.DrawMode = DrawMode.OwnerDrawVariable);
1810
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.ItemHeight = value);
1961
Assert.
Throws
<ArgumentException>("value", () => control.MultiColumn = true);
2230
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.RightToLeft = value);
2733
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.SelectedIndex = value);
2743
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.SelectedIndex = value);
2753
Assert.
Throws
<ArgumentException>("value", () => control.SelectedIndex = -1);
3905
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.SelectionMode = value);
5034
Assert.
Throws
<ArgumentOutOfRangeException>("startIndex", () => control.FindString("s", startIndex));
5138
Assert.
Throws
<ArgumentOutOfRangeException>("startIndex", () => control.FindStringExact("s", startIndex));
5309
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemHeight(index));
5320
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemHeight(index));
5453
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRectangle(-1));
5454
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRectangle(0));
5455
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRectangle(1));
5464
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRectangle(-1));
5465
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRectangle(1));
5466
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRectangle(2));
5473
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRectangle(-1));
5474
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRectangle(0));
5475
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRectangle(1));
5485
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRectangle(-1));
5486
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRectangle(1));
5487
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRectangle(2));
System\Windows\Forms\ListControlTests.cs (4)
1065
Assert.
Throws
<ArgumentException>("value", () => control.DataSource = new object());
1796
Assert.
Throws
<ArgumentException>("newDisplayMember", (() => control.ValueMember = "NoSuchValue"));
1845
Assert.
Throws
<ArgumentException>("value", (() => control.ValueMember = "NoSuchValue"));
2067
Assert.
Throws
<ArgumentNullException>("key", () => control.SelectedValue = null);
System\Windows\Forms\ListView.ListViewItemCollectionTests.cs (2)
98
Assert.
Throws
<ArgumentNullException>("key", () => collection.Find(key, searchAllSubItems: true));
99
Assert.
Throws
<ArgumentNullException>("key", () => collection.Find(key, searchAllSubItems: false));
System\Windows\Forms\ListViewGroupCollectionTests.cs (8)
41
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
175
Assert.
Throws
<ArgumentNullException>("value", () => collection[0] = null);
186
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index] = new ListViewGroup());
208
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
246
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index] = new ListViewGroup());
364
Assert.
Throws
<ArgumentNullException>("value", () => collection["key"] = null);
480
Assert.
Throws
<ArgumentNullException>("group", () => collection.Add(null));
532
Assert.
Throws
<ArgumentException>("value", () => collection.Add(value));
System\Windows\Forms\ListViewGroupConverterTests.cs (1)
221
Assert.
Throws
<ArgumentNullException>("destinationType", () => converter.ConvertTo(new object(), null));
System\Windows\Forms\ListViewGroupTests.cs (4)
251
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => group.TitleImageIndex = value);
783
Assert.
Throws
<InvalidEnumArgumentException>("value", () => group.FooterAlignment = value);
1035
Assert.
Throws
<InvalidEnumArgumentException>("value", () => group.HeaderAlignment = value);
1171
Assert.
Throws
<InvalidEnumArgumentException>("value", () => group.CollapsedState = value);
System\Windows\Forms\ListViewItemConverterTests.cs (1)
276
Assert.
Throws
<ArgumentNullException>("destinationType", () => converter.ConvertTo(new object(), null));
System\Windows\Forms\ListViewItemTests.cs (8)
831
Assert.
Throws
<ArgumentNullException>("subItems", () => new ListViewItem((ListViewItem.ListViewSubItem[])null, "imageKey"));
832
Assert.
Throws
<ArgumentNullException>("subItems", () => new ListViewItem((ListViewItem.ListViewSubItem[])null, 1));
833
Assert.
Throws
<ArgumentNullException>("subItems", () => new ListViewItem((ListViewItem.ListViewSubItem[])null, "imageKey", new ListViewGroup()));
834
Assert.
Throws
<ArgumentNullException>("subItems", () => new ListViewItem((ListViewItem.ListViewSubItem[])null, 0, new ListViewGroup()));
841
Assert.
Throws
<ArgumentNullException>("subItems", () => new ListViewItem(subItems, "imageKey"));
842
Assert.
Throws
<ArgumentNullException>("subItems", () => new ListViewItem(subItems, 1));
843
Assert.
Throws
<ArgumentNullException>("subItems", () => new ListViewItem(subItems, "imageKey", new ListViewGroup()));
844
Assert.
Throws
<ArgumentNullException>("subItems", () => new ListViewItem(subItems, 1, new ListViewGroup()));
System\Windows\Forms\ListViewSubItemCollectionTests.cs (9)
23
Assert.
Throws
<ArgumentNullException>("owner", () => new ListViewItem.ListViewSubItemCollection(null));
59
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
86
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index] = new ListViewItem.ListViewSubItem());
97
Assert.
Throws
<ArgumentNullException>("value", () => collection[0] = null);
121
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
148
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
158
Assert.
Throws
<ArgumentException>("value", () => collection[0] = value);
284
Assert.
Throws
<ArgumentNullException>("item", () => collection.Add((ListViewItem.ListViewSubItem)null));
305
Assert.
Throws
<ArgumentException>("item", () => collection.Add(value));
System\Windows\Forms\ListViewSubItemConverterTests.cs (1)
89
Assert.
Throws
<ArgumentNullException>("destinationType", () => converter.ConvertTo(new object(), null));
System\Windows\Forms\ListViewTests.cs (21)
246
Assert.
Throws
<InvalidEnumArgumentException>("value", () => listView.Activation = value);
257
Assert.
Throws
<InvalidEnumArgumentException>("value", () => listView.Activation = value);
269
Assert.
Throws
<ArgumentException>("value", () => listView.Activation = value);
327
Assert.
Throws
<InvalidEnumArgumentException>("value", () => listView.Alignment = value);
612
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value);
790
Assert.
Throws
<InvalidEnumArgumentException>("value", () => listView.BorderStyle = value);
2122
Assert.
Throws
<InvalidEnumArgumentException>("value", () => listView.HeaderStyle = value);
2356
Assert.
Throws
<ArgumentException>("value", () => listView.HoverSelection = false);
4189
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRect(0));
4214
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRect(-1));
4215
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRect(0));
4216
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRect(1));
4226
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRect(-1));
4227
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRect(1));
4228
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRect(2));
4235
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRect(-1));
4236
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRect(0));
4237
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRect(1));
4248
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRect(-1));
4249
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRect(1));
4250
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetItemRect(2));
System\Windows\Forms\MdiClient.ControlCollectionTests.cs (1)
22
Assert.
Throws
<ArgumentNullException>("owner", () => new MdiClient.ControlCollection(null));
System\Windows\Forms\MonthCalendarTests.cs (25)
490
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value);
730
Assert.
Throws
<ArgumentOutOfRangeException>("x", () => calendar.CalendarDimensions = new Size(x, 1));
739
Assert.
Throws
<ArgumentOutOfRangeException>("y", () => calendar.CalendarDimensions = new Size(1, y));
916
Assert.
Throws
<InvalidEnumArgumentException>("FirstDayOfWeek", () => calendar.FirstDayOfWeek = value);
1306
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.ImeMode = value);
1376
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => calendar.MaxDate = calendar.MinDate.AddTicks(-1));
1440
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => calendar.MaxSelectionCount = value);
1509
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => calendar.MinDate = calendar.MaxDate.AddTicks(1));
1516
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => calendar.MinDate = calendar.MinDate.AddTicks(-1));
1938
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => calendar.ScrollChange = value);
2011
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => calendar.SelectionStart = calendar.MinDate.AddTicks(-1));
2022
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => calendar.SelectionStart = calendar.MaxDate.AddTicks(1));
2089
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => calendar.SelectionEnd = calendar.MinDate.AddTicks(-1));
2092
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => calendar.SelectionEnd = calendar.MinDate.AddTicks(-1));
2099
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => calendar.SelectionEnd = calendar.MaxDate.AddTicks(1));
2102
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => calendar.SelectionEnd = calendar.MaxDate.AddTicks(1));
2207
Assert.
Throws
<ArgumentOutOfRangeException>("date1", () => calendar.SelectionRange = new SelectionRange(calendar.MinDate.AddTicks(-1), calendar.MinDate));
2208
Assert.
Throws
<ArgumentOutOfRangeException>("date1", () => calendar.SelectionRange = new SelectionRange(calendar.MinDate, calendar.MinDate.AddTicks(-1)));
2224
Assert.
Throws
<ArgumentOutOfRangeException>("date2", () => calendar.SelectionRange = new SelectionRange(calendar.MaxDate.AddDays(1), calendar.MaxDate));
2225
Assert.
Throws
<ArgumentOutOfRangeException>("date2", () => calendar.SelectionRange = new SelectionRange(calendar.MaxDate, calendar.MaxDate.AddDays(1)));
2768
Assert.
Throws
<ArgumentException>("value", () => calendar.TitleBackColor = Color.Empty);
2827
Assert.
Throws
<ArgumentException>("value", () => calendar.TitleForeColor = Color.Empty);
2911
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => calendar.TodayDate = calendar.MinDate.AddTicks(-1));
2922
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => calendar.TodayDate = calendar.MaxDate.AddDays(1));
2981
Assert.
Throws
<ArgumentException>("value", () => calendar.TrailingForeColor = Color.Empty);
System\Windows\Forms\NotifyIconTests.cs (2)
48
Assert.
Throws
<ArgumentNullException>("container", () => new NotifyIcon(null));
71
Assert.
Throws
<InvalidEnumArgumentException>("value", () => notifyIcon.BalloonTipIcon = value);
System\Windows\Forms\OpacityConverterTests.cs (1)
96
Assert.
Throws
<ArgumentNullException>("destinationType", () => converter.ConvertTo(new object(), null));
System\Windows\Forms\PaddingConverterTests.cs (4)
59
Assert.
Throws
<ArgumentException>("value", () => converter.ConvertFrom(value));
106
Assert.
Throws
<ArgumentNullException>("destinationType", () => converter.ConvertTo(new object(), null));
178
Assert.
Throws
<ArgumentNullException>("propertyValues", () => converter.CreateInstance(new Mock<ITypeDescriptorContext>(MockBehavior.Strict).Object, null));
362
Assert.
Throws
<ArgumentException>("propertyValues", () => converter.CreateInstance(mockContext.Object, propertyValues));
System\Windows\Forms\PaintEventArgsTests.cs (1)
33
Assert.
Throws
<ArgumentNullException>("graphics", () => new PaintEventArgs((Graphics)null, new Rectangle(1, 2, 3, 4)));
System\Windows\Forms\PanelTests.cs (2)
549
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.AutoSizeMode = value);
605
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BorderStyle = value);
System\Windows\Forms\PictureBoxTests.cs (5)
174
Assert.
Throws
<InvalidEnumArgumentException>("value", () => pictureBox.BorderStyle = value);
1004
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.ImeMode = value);
1274
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.RightToLeft = value);
1389
Assert.
Throws
<InvalidEnumArgumentException>("value", () => pictureBox.SizeMode = value);
1453
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.TabIndex = -1);
System\Windows\Forms\ProgressBarTests.cs (7)
335
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value);
757
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.ImeMode = value);
897
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.MarqueeAnimationSpeed = -1);
996
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.Maximum = -1);
1095
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.Minimum = -1);
1505
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.Style = value);
1755
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.Value = value);
System\Windows\Forms\PropertyGridTests.cs (2)
527
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value);
2387
Assert.
Throws
<ArgumentNullException>("items", () => control.SelectedGridItem = null);
System\Windows\Forms\RadioButtonTests.cs (2)
172
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.CheckAlign = value);
393
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.TextAlign = value);
System\Windows\Forms\RichTextBoxTests.cs (50)
952
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.BulletIndent = value);
2054
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.MaxLength = -1);
2595
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.RightMargin = -1);
3152
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.ScrollBars = value);
3790
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.SelectionAlignment = value);
4442
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.SelectionCharOffset = value);
5560
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.SelectionLength = -1);
5939
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.SelectionRightIndent = -1);
6394
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.SelectionTabs = new int[33]);
7836
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.ZoomFactor = value);
8431
Assert.
Throws
<ArgumentNullException>("str", () => control.Find((string)null));
8432
Assert.
Throws
<ArgumentNullException>("str", () => control.Find(null, RichTextBoxFinds.None));
8433
Assert.
Throws
<ArgumentNullException>("str", () => control.Find(null, 0, RichTextBoxFinds.None));
8434
Assert.
Throws
<ArgumentNullException>("str", () => control.Find(null, -1, RichTextBoxFinds.None));
8435
Assert.
Throws
<ArgumentNullException>("str", () => control.Find(null, 1, RichTextBoxFinds.None));
8436
Assert.
Throws
<ArgumentNullException>("str", () => control.Find(null, 0, 0, RichTextBoxFinds.None));
8437
Assert.
Throws
<ArgumentNullException>("str", () => control.Find(null, -1, 0, RichTextBoxFinds.None));
8438
Assert.
Throws
<ArgumentNullException>("str", () => control.Find(null, 1, 0, RichTextBoxFinds.None));
8439
Assert.
Throws
<ArgumentNullException>("str", () => control.Find(null, 0, -2, RichTextBoxFinds.None));
8449
Assert.
Throws
<ArgumentNullException>("str", () => control.Find((string)null));
8450
Assert.
Throws
<ArgumentNullException>("str", () => control.Find(null, RichTextBoxFinds.None));
8451
Assert.
Throws
<ArgumentNullException>("str", () => control.Find(null, 0, RichTextBoxFinds.None));
8452
Assert.
Throws
<ArgumentNullException>("str", () => control.Find(null, -1, RichTextBoxFinds.None));
8453
Assert.
Throws
<ArgumentNullException>("str", () => control.Find(null, 2, RichTextBoxFinds.None));
8454
Assert.
Throws
<ArgumentNullException>("str", () => control.Find(null, 0, 0, RichTextBoxFinds.None));
8455
Assert.
Throws
<ArgumentNullException>("str", () => control.Find(null, -1, 0, RichTextBoxFinds.None));
8456
Assert.
Throws
<ArgumentNullException>("str", () => control.Find(null, 2, 0, RichTextBoxFinds.None));
8457
Assert.
Throws
<ArgumentNullException>("str", () => control.Find(null, 0, -2, RichTextBoxFinds.None));
8464
Assert.
Throws
<ArgumentNullException>("characterSet", () => control.Find((char[])null));
8465
Assert.
Throws
<ArgumentNullException>("characterSet", () => control.Find(null, 0));
8466
Assert.
Throws
<ArgumentNullException>("characterSet", () => control.Find(null, -1));
8467
Assert.
Throws
<ArgumentNullException>("characterSet", () => control.Find(null, 1));
8468
Assert.
Throws
<ArgumentNullException>("characterSet", () => control.Find(null, 0, 0));
8469
Assert.
Throws
<ArgumentNullException>("characterSet", () => control.Find(null, -1, 0));
8470
Assert.
Throws
<ArgumentNullException>("characterSet", () => control.Find(null, 1, 0));
8471
Assert.
Throws
<ArgumentNullException>("characterSet", () => control.Find(null, 0, -2));
8481
Assert.
Throws
<ArgumentNullException>("characterSet", () => control.Find((char[])null));
8482
Assert.
Throws
<ArgumentNullException>("characterSet", () => control.Find(null, 0));
8483
Assert.
Throws
<ArgumentNullException>("characterSet", () => control.Find(null, -1));
8484
Assert.
Throws
<ArgumentNullException>("characterSet", () => control.Find(null, 2));
8485
Assert.
Throws
<ArgumentNullException>("characterSet", () => control.Find(null, 0, 0));
8486
Assert.
Throws
<ArgumentNullException>("characterSet", () => control.Find(null, -1, 0));
8487
Assert.
Throws
<ArgumentNullException>("characterSet", () => control.Find(null, 2, 0));
8488
Assert.
Throws
<ArgumentNullException>("characterSet", () => control.Find(null, 0, -2));
8497
Assert.
Throws
<ArgumentOutOfRangeException>("start", () => control.Find("s", start, RichTextBoxFinds.NoHighlight));
8498
Assert.
Throws
<ArgumentOutOfRangeException>("start", () => control.Find("s", start, 0, RichTextBoxFinds.NoHighlight));
8512
Assert.
Throws
<ArgumentOutOfRangeException>("start", () => control.Find("s", start, RichTextBoxFinds.NoHighlight));
8513
Assert.
Throws
<ArgumentOutOfRangeException>("start", () => control.Find("s", start, 0, RichTextBoxFinds.NoHighlight));
8522
Assert.
Throws
<ArgumentOutOfRangeException>("end", () => control.Find("s", 0, -2, RichTextBoxFinds.NoHighlight));
8533
Assert.
Throws
<ArgumentOutOfRangeException>("end", () => control.Find("s", 0, -2, RichTextBoxFinds.NoHighlight));
System\Windows\Forms\RowStyleTests.cs (2)
42
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => new RowStyle(SizeType.AutoSize, -1));
139
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => style.Height = -1);
System\Windows\Forms\ScreenTests.cs (3)
85
Assert.
Throws
<ArgumentNullException>("control", () => Screen.FromControl(null));
166
Assert.
Throws
<ArgumentNullException>("control", () => Screen.GetBounds(null));
196
Assert.
Throws
<ArgumentNullException>("control", () => Screen.GetWorkingArea(null));
System\Windows\Forms\ScrollableControlTests.cs (1)
468
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.AutoScrollMargin = new Size(x, y));
System\Windows\Forms\ScrollBarTests.cs (6)
360
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value);
679
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.ImeMode = value);
822
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.LargeChange = -1);
1237
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.RightToLeft = value);
1373
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.SmallChange = -1);
1751
ArgumentOutOfRangeException ex = Assert.
Throws
<ArgumentOutOfRangeException>(paramName, () => control.Value = value);
System\Windows\Forms\ScrollPropertiesTests.cs (4)
152
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => properties.LargeChange = -1);
219
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => properties.SmallChange = -1);
427
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => properties.Minimum = -1);
513
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => properties.Value = value);
System\Windows\Forms\SplitterPanelTests.cs (3)
379
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BorderStyle = value);
442
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.Dock = value);
926
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.TabIndex = -1);
System\Windows\Forms\SplitterTests.cs (2)
369
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BorderStyle = value);
985
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.ImeMode = value);
System\Windows\Forms\StatusStripTests.cs (1)
607
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.RenderMode = value);
System\Windows\Forms\TabControl.ControlCollectionTests.cs (1)
26
Assert.
Throws
<ArgumentNullException>("owner", () => new TabControl.ControlCollection(null));
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (13)
1181
Assert.
Throws
<ArgumentNullException>("owner", () => new TabControl.TabPageCollection(null));
1571
Assert.
Throws
<ArgumentNullException>("page", () => collection.Contains(null));
1876
Assert.
Throws
<ArgumentNullException>("page", () => collection.IndexOf(null));
3336
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
3351
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
3671
Assert.
Throws
<ArgumentNullException>("value", () => collection[0] = null);
3683
Assert.
Throws
<ArgumentNullException>("value", () => collection[0] = null);
3695
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index] = page);
3711
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index] = page2);
3737
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => iList[index]);
3751
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => iList[index]);
3955
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => iList[index] = page);
3970
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => iList[index] = page2);
System\Windows\Forms\TabControlTests.cs (27)
446
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.Alignment = value);
523
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.Appearance = value);
735
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value);
917
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.DrawMode = value);
1606
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.ItemSize = new Size(-1, 1));
1613
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.ItemSize = new Size(1, -1));
1815
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.Padding = new Point(-1, 1));
1822
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.Padding = new Point(1, -1));
2507
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.SelectedIndex = -2);
2845
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.SizeMode = value);
3633
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetControl(index));
3647
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetControl(index));
3783
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetTabRect(-1));
3784
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetTabRect(0));
3785
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetTabRect(1));
3795
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetTabRect(-1));
3796
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetTabRect(1));
3797
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetTabRect(2));
3804
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetTabRect(-1));
3805
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetTabRect(0));
3806
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetTabRect(1));
3817
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetTabRect(-1));
3818
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetTabRect(1));
3819
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => control.GetTabRect(2));
3895
Assert.
Throws
<ArgumentNullException>("elementType", () => control.GetItems(null));
3980
Assert.
Throws
<ArgumentNullException>("item", () => control.GetToolTipText(null));
3987
Assert.
Throws
<ArgumentException>("item", () => control.GetToolTipText(new object()));
System\Windows\Forms\TableLayoutCellPaintEventArgsTests.cs (1)
37
Assert.
Throws
<ArgumentNullException>("graphics", () => new TableLayoutCellPaintEventArgs(
System\Windows\Forms\TableLayoutControlCollectionTests.cs (1)
21
Assert.
Throws
<ArgumentNullException>("container", () => new TableLayoutControlCollection(null));
System\Windows\Forms\TableLayoutPanelCellPositionTests.cs (10)
35
Assert.
Throws
<ArgumentOutOfRangeException>("column", () => new TableLayoutPanelCellPosition(-2, 0));
41
Assert.
Throws
<ArgumentOutOfRangeException>("row", () => new TableLayoutPanelCellPosition(0, -2));
142
Assert.
Throws
<ArgumentException>("value", () => converter.ConvertFrom(value));
149
Assert.
Throws
<ArgumentOutOfRangeException>("column", () => converter.ConvertFrom("-2,2"));
156
Assert.
Throws
<ArgumentOutOfRangeException>("row", () => converter.ConvertFrom("1,-2"));
185
Assert.
Throws
<ArgumentNullException>("destinationType", () => converter.ConvertTo(new object(), null));
220
Assert.
Throws
<ArgumentNullException>("propertyValues", () => converter.CreateInstance(null, null));
279
Assert.
Throws
<ArgumentException>("propertyValues", () => converter.CreateInstance(null, propertyValues));
286
Assert.
Throws
<ArgumentOutOfRangeException>("column", () => converter.CreateInstance(null, new Dictionary<string, object>
297
Assert.
Throws
<ArgumentOutOfRangeException>("row", () => converter.CreateInstance(null, new Dictionary<string, object>
System\Windows\Forms\TableLayoutPanelTests.cs (14)
203
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BorderStyle = value);
296
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.CellBorderStyle = value);
330
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.ColumnCount = -1);
406
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.GrowStyle = value);
622
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.RowCount = -1);
655
Assert.
Throws
<ArgumentNullException>("control", () => control.GetCellPosition(null));
664
Assert.
Throws
<ArgumentOutOfRangeException>("column", () => control.GetCellPosition(child));
673
Assert.
Throws
<ArgumentOutOfRangeException>("row", () => control.GetCellPosition(child));
688
Assert.
Throws
<ArgumentNullException>("control", () => control.GetColumn(null));
703
Assert.
Throws
<ArgumentNullException>("control", () => control.GetColumnSpan(null));
871
Assert.
Throws
<ArgumentOutOfRangeException>("column", () => control.GetControlFromPosition(column, 0));
880
Assert.
Throws
<ArgumentOutOfRangeException>("row", () => control.GetControlFromPosition(0, row));
941
Assert.
Throws
<ArgumentNullException>("control", () => control.GetRow(null));
1149
Assert.
Throws
<ArgumentNullException>("control", () => control.GetRowSpan(null));
System\Windows\Forms\TableLayoutStyleCollectionTests.cs (8)
53
Assert.
Throws
<ArgumentNullException>("style", () => collection.Add(null));
54
Assert.
Throws
<ArgumentNullException>("style", () => ((IList)collection).Add(null));
74
Assert.
Throws
<ArgumentException>("style", () => collection.Add(style));
75
Assert.
Throws
<ArgumentException>("style", () => ((IList)collection).Add(style));
158
Assert.
Throws
<ArgumentNullException>("value", () => collection[index] = null);
159
Assert.
Throws
<ArgumentNullException>("value", () => ((IList)collection)[index] = null);
180
Assert.
Throws
<ArgumentException>("style", () => collection[0] = style);
181
Assert.
Throws
<ArgumentException>("style", () => ((IList)collection)[0] = style);
System\Windows\Forms\TableLayoutStyleTests.cs (1)
156
Assert.
Throws
<ArgumentNullException>("destinationType", () => converter.ConvertTo(new object(), null));
System\Windows\Forms\TabPageTests.cs (3)
992
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.Dock = value);
1490
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.ImageIndex = -2);
2680
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.TabIndex = -1);
System\Windows\Forms\TabPageTests.TabPageControlCollection.cs (1)
21
Assert.
Throws
<ArgumentNullException>("owner", () => new TabPage.TabPageControlCollection(null));
System\Windows\Forms\TextRendererTests.cs (3)
564
Assert.
Throws
<ArgumentNullException>("dc", () => TextRenderer.MeasureText(null, string.Empty, SystemFonts.MenuFont));
565
Assert.
Throws
<ArgumentNullException>("dc", () => TextRenderer.MeasureText(null, string.Empty, SystemFonts.MenuFont, new Size(300, 400)));
566
Assert.
Throws
<ArgumentNullException>("dc", () => TextRenderer.MeasureText(null, string.Empty, SystemFonts.MenuFont, new Size(300, 400), TextFormatFlags.Default));
System\Windows\Forms\TimerTests.cs (2)
39
Assert.
Throws
<ArgumentNullException>("container", () => new Timer(null));
226
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => timer.Interval = value);
System\Windows\Forms\ToolStripButtonTests.cs (1)
996
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.CheckState = value);
System\Windows\Forms\ToolStripContentPanelTests.cs (4)
773
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BorderStyle = value);
896
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.Dock = value);
1422
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.RenderMode = value);
1549
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.TabIndex = -1);
System\Windows\Forms\ToolStripControlHostTests.cs (12)
129
Assert.
Throws
<ArgumentNullException>("c", () => new SubToolStripControlHost(null));
130
Assert.
Throws
<ArgumentNullException>("c", () => new SubToolStripControlHost(null, "name"));
249
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.AccessibleRole = value);
745
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.ControlAlign = value);
817
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.DisplayStyle = value);
1264
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.ImageAlign = value);
1635
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.RightToLeft = value);
2018
Assert.
Throws
<ArgumentNullException>("service", () => c.Site.GetService(null));
2121
Assert.
Throws
<ArgumentNullException>("key", () => iDictionaryService.GetValue(null));
2325
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.TextAlign = value);
2358
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.TextDirection = value);
2387
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.TextImageRelation = value);
System\Windows\Forms\ToolStripDropDownTests.cs (6)
1469
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.DefaultDropDownDirection = value);
1806
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.GripStyle = value);
1913
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.ImeMode = value);
2443
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.RightToLeft = value);
2566
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.TabIndex = -1);
2916
Assert.
Throws
<ArgumentException>("value", () => control.TopLevel = true);
System\Windows\Forms\ToolStripItemCollectionTests.cs (2)
101
Assert.
Throws
<ArgumentNullException>("key", () => collection.Find(key, searchAllChildren: true));
102
Assert.
Throws
<ArgumentNullException>("key", () => collection.Find(key, searchAllChildren: false));
System\Windows\Forms\ToolStripItemTests.cs (15)
373
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.AccessibleRole = value);
559
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.Alignment = value);
2032
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.BackgroundImageLayout = value);
2323
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.DisplayStyle = value);
2444
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.Dock = value);
4376
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.ImageAlign = value);
4730
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => item.ImageIndex = -2);
5594
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.ImageScaling = value);
6146
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.MergeAction = value);
6435
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.Overflow = value);
7408
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.RightToLeft = value);
8492
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.TextAlign = value);
8766
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.TextDirection = value);
9017
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.TextImageRelation = value);
10235
Assert.
Throws
<ArgumentNullException>("data", () => item.DoDragDrop(null, DragDropEffects.All));
System\Windows\Forms\ToolStripItemTextRenderEventArgsTests.cs (2)
66
Assert.
Throws
<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, TextFormatFlags.Top));
67
Assert.
Throws
<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, ContentAlignment.TopLeft));
System\Windows\Forms\ToolStripPanelTests.cs (1)
199
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => panel.AutoScrollMargin = value);
System\Windows\Forms\ToolStripRendererTests.cs (1)
23
Assert.
Throws
<ArgumentNullException>("normalImage", () => ToolStripRenderer.CreateDisabledImage(null));
System\Windows\Forms\ToolStripSeparatorTests.cs (5)
222
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.DisplayStyle = value);
467
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.ImageAlign = value);
644
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.TextAlign = value);
675
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.TextDirection = value);
702
Assert.
Throws
<InvalidEnumArgumentException>("value", () => item.TextImageRelation = value);
System\Windows\Forms\ToolStripTests.cs (9)
326
Assert.
Throws
<ArgumentNullException>("toolStripItems", () => new ToolStrip(null));
2242
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.DefaultDropDownDirection = value);
2667
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.Dock = value);
2864
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.GripStyle = value);
3433
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.RenderMode = value);
3565
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.RightToLeft = value);
4094
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.TextDirection = value);
4788
Assert.
Throws
<InvalidEnumArgumentException>("direction", () => toolStrip.GetNextItem(new SubToolStripItem(), direction));
4789
Assert.
Throws
<InvalidEnumArgumentException>("direction", () => toolStrip.GetNextItem(null, direction));
System\Windows\Forms\ToolTipTests.cs (7)
76
Assert.
Throws
<ArgumentNullException>("cont", () => new ToolTip(null));
228
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => toolTip.AutomaticDelay = -1);
275
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => toolTip.AutoPopDelay = -1);
353
Assert.
Throws
<ArgumentException>("value", () => toolTip.ForeColor = Color.Empty);
400
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => toolTip.InitialDelay = -1);
485
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => toolTip.ReshowDelay = -1);
561
Assert.
Throws
<InvalidEnumArgumentException>("value", () => toolTip.ToolTipIcon = value);
System\Windows\Forms\TreeNodeCollectionTests.cs (4)
65
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index]);
76
Assert.
Throws
<ArgumentOutOfRangeException>("index", () => collection[index] = new TreeNode());
338
Assert.
Throws
<ArgumentNullException>("key", () => collection.Find(key, searchAllChildren: true));
339
Assert.
Throws
<ArgumentNullException>("key", () => collection.Find(key, searchAllChildren: false));
System\Windows\Forms\TreeNodeTests.cs (9)
234
Assert.
Throws
<ArgumentNullException>("nodes", () => new TreeNode("text", null));
235
Assert.
Throws
<ArgumentNullException>("nodes", () => new TreeNode("text", 0, 0, null));
249
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => new TreeNode("text", imageIndex, 0));
250
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => new TreeNode("text", imageIndex, 0, Array.Empty<TreeNode>()));
257
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => new TreeNode("text", 0, selectedImageIndex));
258
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => new TreeNode("text", 0, selectedImageIndex, Array.Empty<TreeNode>()));
1304
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => node.ImageIndex = value);
3288
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => node.SelectedImageIndex = value);
3979
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => node.StateImageIndex = value);
System\Windows\Forms\TreeViewImageIndexConverterTests.cs (1)
22
Assert.
Throws
<ArgumentNullException>("destinationType", () => converter.ConvertTo(context: null, culture: null, new object(), destinationType: null));
System\Windows\Forms\TreeViewTests.cs (9)
905
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value);
1031
Assert.
Throws
<InvalidEnumArgumentException>("value", () => treeView.BorderStyle = value);
1454
Assert.
Throws
<InvalidEnumArgumentException>("value", () => treeView.DrawMode = value);
2216
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => treeView.ImageIndex = -2);
2684
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => treeView.Indent = value);
2697
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => treeView.Indent = indent);
2796
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.ItemHeight = value);
2810
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.ItemHeight = indent);
3576
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => treeView.SelectedImageIndex = -2);
System\Windows\Forms\UpDownBaseTests.cs (3)
806
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BorderStyle = value);
1424
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.TextAlign = value);
1508
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.UpDownAlign = value);
System\Windows\Forms\UserControlTests.cs (4)
664
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.AutoSizeMode = value);
732
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.AutoValidate = value);
788
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BorderStyle = value);
1681
Assert.
Throws
<InvalidEnumArgumentException>("validationConstraints", () => control.ValidateChildren(validationConstraints));
System\Windows\Forms\VisualStyles\VisualStyleElementTests.cs (1)
28
Assert.
Throws
<ArgumentNullException>("className", () => VisualStyleElement.CreateElement(null, 1, 2));
System\Windows\Forms\VisualStyles\VisualStyleRendererTests.cs (7)
39
Assert.
Throws
<ArgumentNullException>("className", () => new VisualStyleRenderer(null, 0, 0));
114
Assert.
Throws
<ArgumentNullException>("element", () => VisualStyleRenderer.IsElementDefined(null));
215
Assert.
Throws
<ArgumentNullException>("dc", () => renderer.DrawEdge(null, new Rectangle(1, 2, 3, 4), Edges.Top, EdgeStyle.Bump, EdgeEffects.FillInterior));
225
Assert.
Throws
<InvalidEnumArgumentException>("edges", () => renderer.DrawEdge(graphics, new Rectangle(1, 2, 3, 4), edges, EdgeStyle.Bump, EdgeEffects.FillInterior));
235
Assert.
Throws
<InvalidEnumArgumentException>("style", () => renderer.DrawEdge(graphics, new Rectangle(1, 2, 3, 4), Edges.Bottom, style, EdgeEffects.FillInterior));
245
Assert.
Throws
<InvalidEnumArgumentException>("effects", () => renderer.DrawEdge(graphics, new Rectangle(1, 2, 3, 4), Edges.Bottom, EdgeStyle.Bump, effects));
586
Assert.
Throws
<InvalidEnumArgumentException>("prop", () => renderer.GetFont(graphics, value));
System\Windows\Forms\WebBrowserTests.cs (1)
1311
Assert.
Throws
<ArgumentException>("value", () => control.ObjectForScripting = new PrivateClass());
TextBoxBaseTests.cs (6)
688
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.BorderStyle = value);
1588
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.ImeModeBase = value);
1788
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.MaxLength = -1);
2929
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.SelectionLength = -1);
3106
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.SelectionStart = -1);
4611
Assert.
Throws
<ArgumentOutOfRangeException>("lineNumber", () => control.GetFirstCharIndexFromLine(-1));
TrackBarTests.cs (6)
972
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.ImeMode = value);
1033
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.LargeChange = -1);
1461
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.Orientation = value);
1767
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.SmallChange = -1);
1960
Assert.
Throws
<InvalidEnumArgumentException>("value", () => control.TickStyle = value);
2193
Assert.
Throws
<ArgumentOutOfRangeException>("value", () => control.Value = value);
System.Xaml.Tests (32)
System\Windows\Markup\ArrayExtensionTests.cs (2)
36
Assert.
Throws
<ArgumentNullException>("arrayType", () => new ArrayExtension((Type)null!));
64
Assert.
Throws
<ArgumentNullException>("elements", () => new ArrayExtension((Array)null!));
System\Windows\Markup\NameReferenceConverterTests.cs (2)
70
Assert.
Throws
<ArgumentNullException>("context", () => converter.ConvertFrom(null, CultureInfo.CurrentCulture, "name"));
162
Assert.
Throws
<ArgumentNullException>("context", () => converter.ConvertTo(null, CultureInfo.CurrentCulture, "value", typeof(string)));
System\Windows\Markup\ReferenceTests.cs (1)
66
Assert.
Throws
<ArgumentNullException>("serviceProvider", () => reference.ProvideValue(null));
System\Windows\Markup\StaticExtensionTests.cs (4)
35
Assert.
Throws
<ArgumentNullException>("member", () => new StaticExtension(null));
119
Assert.
Throws
<ArgumentNullException>("serviceProvider", () => extension.ProvideValue(null));
181
Assert.
Throws
<ArgumentNullException>("value", () => extension.Member = null);
196
Assert.
Throws
<ArgumentNullException>("value", () => extension.MemberType = null);
System\Windows\Markup\TypeExtensionTests.cs (5)
35
Assert.
Throws
<ArgumentNullException>("typeName", () => new TypeExtension((string)null!));
50
Assert.
Throws
<ArgumentNullException>("type", () => new TypeExtension((Type)null!));
90
Assert.
Throws
<ArgumentNullException>("serviceProvider", () => extension.ProvideValue(null));
141
Assert.
Throws
<ArgumentNullException>("value", () => extension.TypeName = null);
157
Assert.
Throws
<ArgumentNullException>("value", () => extension.Type = null);
System\Windows\Markup\ValueSerializerTests.cs (6)
206
Assert.
Throws
<ArgumentNullException>("typeName", () => ValueSerializer.GetSerializerFor(typeof(ClassWithNullStringTypeConverterAttribute)));
207
Assert.
Throws
<ArgumentNullException>("typeName", () => ValueSerializer.GetSerializerFor(typeof(ClassWithNullStringTypeConverterAttribute), null!));
228
Assert.
Throws
<ArgumentNullException>("type", () => ValueSerializer.GetSerializerFor((Type)null!));
229
Assert.
Throws
<ArgumentNullException>("type", () => ValueSerializer.GetSerializerFor((Type)null!, null));
293
Assert.
Throws
<ArgumentNullException>("descriptor", () => ValueSerializer.GetSerializerFor((PropertyDescriptor)null!));
294
Assert.
Throws
<ArgumentNullException>("descriptor", () => ValueSerializer.GetSerializerFor((PropertyDescriptor)null!, null));
System\Windows\Markup\XamlDeferLoadAttributeTests.cs (4)
26
Assert.
Throws
<ArgumentNullException>("loaderType", () => new XamlDeferLoadAttribute(null!, typeof(int)));
32
Assert.
Throws
<ArgumentNullException>("contentType", () => new XamlDeferLoadAttribute(typeof(int), null!));
50
Assert.
Throws
<ArgumentNullException>("loaderType", () => new XamlDeferLoadAttribute(null!, "contentType"));
56
Assert.
Throws
<ArgumentNullException>("contentType", () => new XamlDeferLoadAttribute("loaderType", null!));
System\Windows\Markup\XDataTests.cs (2)
43
Assert.
Throws
<ArgumentNullException>("s", () => data.XmlReader);
68
Assert.
Throws
<ArgumentNullException>("s", () => data.XmlReader);
System\Windows\Markup\XmlnsCompatibleWithAttributeTests.cs (2)
23
Assert.
Throws
<ArgumentNullException>("oldNamespace", () => new XmlnsCompatibleWithAttribute(null!, "newNamespace"));
29
Assert.
Throws
<ArgumentNullException>("newNamespace", () => new XmlnsCompatibleWithAttribute("oldNamespace", null!));
System\Windows\Markup\XmlnsDefinitionAttributeTests.cs (2)
24
Assert.
Throws
<ArgumentNullException>("xmlNamespace", () => new XmlnsDefinitionAttribute(null!, "clrNamespace"));
30
Assert.
Throws
<ArgumentNullException>("clrNamespace", () => new XmlnsDefinitionAttribute("xmlNamespace", null!));
System\Windows\Markup\XmlnsPrefixAttributeTests.cs (2)
23
Assert.
Throws
<ArgumentNullException>("xmlNamespace", () => new XmlnsPrefixAttribute(null!, "prefix"));
29
Assert.
Throws
<ArgumentNullException>("prefix", () => new XmlnsPrefixAttribute("xmlNamespace", null!));