1014 references to Throws
Binding.Http.IntegrationTests (3)
Binding.UDS.IntegrationTests (1)
Client.ClientBase.IntegrationTests (6)
Client.ExpectedExceptions.IntegrationTests (12)
Contract.Fault.IntegrationTests (6)
Contract.Message.IntegrationTests (1)
Contract.Service.IntegrationTests (2)
Encoding.Encoders.IntegrationTests (1)
InMemory.FunctionalTests (40)
Http2\Http2StreamTests.cs (12)
1519ex = Assert.Throws<InvalidOperationException>(() => context.Response.OnStarting(_ => Task.CompletedTask, null));
2144Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value"));
2146Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom 你好 Value"));
2147Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value"));
2185Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value"));
2186Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value"));
2469Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("Custom你好Name", "Custom Value"));
2470Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("CustomName", "Custom 你好 Value"));
2471Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("CustomName", "Custom \r Value"));
2512Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("Custom你好Name", "Custom Value"));
2513Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("CustomName", "Custom \r Value"));
5386var ex = Assert.Throws<InvalidOperationException>(() => context.Response.BodyWriter.Complete());
Http3\Http3StreamTests.cs (11)
864Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value"));
866Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom 你好 Value"));
867Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value"));
898Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value"));
899Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value"));
1015Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("Custom你好Name", "Custom Value"));
1016Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("CustomName", "Custom 你好 Value"));
1017Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("CustomName", "Custom \r Value"));
1046Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("Custom你好Name", "Custom Value"));
1047Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("CustomName", "Custom \r Value"));
1664var ex = Assert.Throws<InvalidOperationException>(() => context.Response.BodyWriter.Complete());
InProcessWebSite (1)
Interop.FunctionalTests (2)
Microsoft.Analyzers.Local.Tests (1)
Microsoft.AspNetCore.Antiforgery.Test (1)
Microsoft.AspNetCore.AsyncState.Tests (1)
Microsoft.AspNetCore.Authentication.Negotiate.Test (2)
Microsoft.AspNetCore.Authorization.Test (1)
Microsoft.AspNetCore.Components.Authorization.Tests (3)
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
Microsoft.AspNetCore.Components.Server.Tests (6)
Microsoft.AspNetCore.Components.Tests (72)
Microsoft.AspNetCore.Components.Web.Tests (6)
Microsoft.AspNetCore.Components.WebAssembly.Tests (1)
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (2)
Microsoft.AspNetCore.CookiePolicy.Test (5)
Microsoft.AspNetCore.Cors.Test (2)
Microsoft.AspNetCore.Cryptography.Internal.Tests (1)
Microsoft.AspNetCore.Cryptography.KeyDerivation.Tests (1)
Microsoft.AspNetCore.DataProtection.Abstractions.Tests (3)
Microsoft.AspNetCore.DataProtection.Extensions.Tests (1)
Microsoft.AspNetCore.DataProtection.Tests (18)
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (2)
Microsoft.AspNetCore.Diagnostics.Tests (1)
Microsoft.AspNetCore.Hosting.Tests (9)
Microsoft.AspNetCore.Http.Abstractions.Tests (7)
Microsoft.AspNetCore.Http.Extensions.Tests (2)
Microsoft.AspNetCore.Http.Tests (7)
Microsoft.AspNetCore.HttpsPolicy.Tests (2)
Microsoft.AspNetCore.Identity.Test (2)
Microsoft.AspNetCore.InternalTesting.Tests (2)
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (19)
Microsoft.AspNetCore.JsonPatch.Tests (27)
Microsoft.AspNetCore.Mvc.Abstractions.Test (5)
Microsoft.AspNetCore.Mvc.Core.Test (20)
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (3)
Microsoft.AspNetCore.Mvc.Localization.Test (1)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (2)
Microsoft.AspNetCore.Mvc.Razor.Test (5)
Microsoft.AspNetCore.Mvc.RazorPages.Test (6)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (4)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (12)
Microsoft.AspNetCore.OutputCaching.Tests (1)
Microsoft.AspNetCore.Owin.Tests (3)
Microsoft.AspNetCore.Razor.Runtime.Test (1)
Microsoft.AspNetCore.RequestDecompression.Tests (9)
Microsoft.AspNetCore.Rewrite.Tests (1)
Microsoft.AspNetCore.Routing.Tests (12)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (19)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (92)
src\Shared\test\Shared.Tests\runtime\Http2\HPackDecoderTest.cs (15)
176HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() =>
253HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(new byte[] { 0x7e }, endHeaders: true, handler: _handler));
277HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler));
301HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler));
325HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler));
371HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler));
403HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(new byte[] { 0x0f, 0x2f }, endHeaders: true, handler: _handler));
498HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(new byte[] { 0x1f, 0x2f }, endHeaders: true, handler: _handler));
621HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(data, endHeaders: true, handler: _handler));
636HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(data, endHeaders: true, handler: _handler));
663HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() =>
676HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler));
727var ex = Assert.Throws<HPackDecodingException>(() => decoder.Decode(encoded, endHeaders: true, handler: _handler));
867HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler));
901HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler));
Microsoft.AspNetCore.Server.Kestrel.Tests (14)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (2)
Microsoft.AspNetCore.Shared.Tests (17)
runtime\Http2\HPackDecoderTest.cs (15)
176HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() =>
253HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(new byte[] { 0x7e }, endHeaders: true, handler: _handler));
277HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler));
301HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler));
325HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler));
371HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler));
403HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(new byte[] { 0x0f, 0x2f }, endHeaders: true, handler: _handler));
498HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(new byte[] { 0x1f, 0x2f }, endHeaders: true, handler: _handler));
621HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(data, endHeaders: true, handler: _handler));
636HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(data, endHeaders: true, handler: _handler));
663HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() =>
676HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler));
727var ex = Assert.Throws<HPackDecodingException>(() => decoder.Decode(encoded, endHeaders: true, handler: _handler));
867HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler));
901HPackDecodingException exception = Assert.Throws<HPackDecodingException>(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler));
Microsoft.AspNetCore.SignalR.Common.Tests (2)
Microsoft.AspNetCore.SignalR.Tests (3)
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
Microsoft.AspNetCore.TestHost.Tests (1)
Microsoft.AspNetCore.Tests (2)
Microsoft.AspNetCore.WebUtilities.Tests (18)
FormPipeReaderTests.cs (7)
226var exception = Assert.Throws<InvalidDataException>(
455var exception = Assert.Throws<InvalidDataException>(() => formReader.ParseFormValues(ref readOnlySequence, ref accumulator, isFinalBlock: true));
469var exception = Assert.Throws<InvalidDataException>(() => formReader.ParseFormValues(ref readOnlySequence, ref accumulator, isFinalBlock: true));
483var exception = Assert.Throws<InvalidDataException>(() => formReader.ParseFormValues(ref readOnlySequence, ref accumulator, isFinalBlock: true));
497var exception = Assert.Throws<InvalidDataException>(() => formReader.ParseFormValues(ref readOnlySequence, ref accumulator, isFinalBlock: true));
511var exception = Assert.Throws<InvalidDataException>(() => formReader.ParseFormValues(ref readOnlySequence, ref accumulator, isFinalBlock: true));
525var exception = Assert.Throws<InvalidDataException>(() => formReader.ParseFormValues(ref readOnlySequence, ref accumulator, isFinalBlock: true));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (5)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (18)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (33)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (5)
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Microsoft.CodeAnalysis.Features.UnitTests (6)
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (6)
Microsoft.CodeAnalysis.UnitTests (149)
MetadataReferences\ModuleMetadataTests.cs (4)
24Assert.Throws<ArgumentOutOfRangeException>(() => { fixed (byte* ptr = new byte[] { 1, 2, 3 }) ModuleMetadata.CreateFromMetadata((IntPtr)ptr, 0); });
25Assert.Throws<ArgumentOutOfRangeException>(() => { fixed (byte* ptr = new byte[] { 1, 2, 3 }) ModuleMetadata.CreateFromMetadata((IntPtr)ptr, -1); });
90Assert.Throws<ArgumentOutOfRangeException>(() => { fixed (byte* ptr = new byte[] { 1, 2, 3 }) ModuleMetadata.CreateFromImage((IntPtr)ptr, 0); });
91Assert.Throws<ArgumentOutOfRangeException>(() => { fixed (byte* ptr = new byte[] { 1, 2, 3 }) ModuleMetadata.CreateFromImage((IntPtr)ptr, -1); });
Text\TextChangeTests.cs (6)
243Assert.Throws<ArgumentOutOfRangeException>(() => newText.CopyTo(-1, destination, 0, 2));
244Assert.Throws<ArgumentOutOfRangeException>(() => newText.CopyTo(0, destination, -1, 2));
245Assert.Throws<ArgumentOutOfRangeException>(() => newText.CopyTo(0, destination, 0, -1));
246Assert.Throws<ArgumentNullException>(() => newText.CopyTo(0, null, 0, 2));
247Assert.Throws<ArgumentOutOfRangeException>(() => newText.CopyTo(newText.Length - 1, destination, 0, 2));
248Assert.Throws<ArgumentOutOfRangeException>(() => newText.CopyTo(0, destination, destination.Length - 1, 2));
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
Microsoft.CodeAnalysis.Workspaces.UnitTests (16)
Microsoft.Data.Analysis.Tests (9)
Microsoft.DotNet.Build.Tasks.Workloads.Tests (1)
Microsoft.DotNet.RemoteExecutor.Tests (3)
Microsoft.DotNet.XUnitAssert.Tests (95)
CollectionAssertsTests.cs (36)
20 Assert.Throws<ArgumentNullException>(() => Assert.All<object>(null!, _ => { }));
26 Assert.Throws<ArgumentNullException>(() => Assert.All(new object[0], (Action<object>)null!));
27 Assert.Throws<ArgumentNullException>(() => Assert.All(new object[0], (Action<object, int>)null!));
35 var ex = Assert.Throws<AllException>(() => Assert.All(items, x => Assert.Equal(1, x)));
56 var ex = Assert.Throws<AllException>(() => Assert.All(items, x => Assert.Equal(0, x)));
82 var ex = Assert.Throws<AllException>(() => Assert.All(collection, Assert.NotNull));
370 var ex = Assert.Throws<ContainsException>(() => Assert.Contains(42, list));
493 var ex = Assert.Throws<ContainsException>(() => Assert.Contains("HI THERE", set, StringComparer.Ordinal));
533 Assert.Throws<ContainsException>(() => Assert.Contains(list, item => item.StartsWith("q")));
559 var ex = Assert.Throws<ContainsDuplicateException>(() => Assert.Distinct(list));
572 var ex = Assert.Throws<ContainsDuplicateException>(() => Assert.Distinct(list));
594 var ex = Assert.Throws<ContainsDuplicateException>(() => Assert.Distinct(list, StringComparer.OrdinalIgnoreCase));
625 Assert.Throws<DoesNotContainException>(() => Assert.DoesNotContain(42, list));
659 var ex = Assert.Throws<DoesNotContainException>(() => Assert.DoesNotContain("HI THERE", set));
680 var ex = Assert.Throws<DoesNotContainException>(() => Assert.DoesNotContain(new[] { 1, 2, 3, 4 }, collections));
797 Assert.Throws<DoesNotContainException>(() => Assert.DoesNotContain(list, item => item.StartsWith("w")));
814 Assert.Throws<ArgumentNullException>(() => Assert.Empty(null!));
830 EmptyException ex = Assert.Throws<EmptyException>(() => Assert.Empty(list));
854 EmptyException ex = Assert.Throws<EmptyException>(() => Assert.Empty("Foo"));
869 Assert.Throws<NotEqualException>(() => Assert.NotEqual(expected, actual));
879 Assert.Throws<NotEqualException>(() => Assert.NotEqual(expected, actual));
888 Assert.Throws<EqualException>(() => Assert.Equal(expected, actual));
898 Assert.Throws<EqualException>(() => Assert.Equal(expected, actual));
929 Assert.Throws<NotEqualException>(() => Assert.NotEqual(expected, actual));
939 Assert.Throws<NotEqualException>(() => Assert.NotEqual(expected, actual));
949 Assert.Throws<EqualException>(() => Assert.Equal(expected, actual));
959 Assert.Throws<EqualException>(() => Assert.Equal(expected, actual));
985 var ex = Assert.Throws<EqualException>(() => Assert.Equal(expected, actual));
1004 Assert.Throws<NotEqualException>(() => Assert.NotEqual(expected, actual));
1014 Assert.Throws<NotEqualException>(() => Assert.NotEqual(expected, actual));
1024 Assert.Throws<EqualException>(() => Assert.Equal(expected, actual));
1034 Assert.Throws<EqualException>(() => Assert.Equal(expected, actual));
1071 var ex = Assert.Throws<NotEmptyException>(() => Assert.NotEmpty(list));
1112 Assert.Throws<NotEqualException>(() => Assert.NotEqual(expected, actual));
1133 Assert.Throws<NotEqualException>(() => Assert.NotEqual(expected, actual, new IntComparer(true)));
1208 Assert.Throws<ArgumentNullException>(() => Assert.Single(null!, null));
EqualityAssertsTests.cs (9)
22 var ex = Assert.Throws<EqualException>(() => Assert.Equal(42, 2112));
743 var ex = Assert.Throws<EqualException>(() => Assert.Equal(42, 42, new Comparer<int>(false)));
874 var ex = Assert.Throws<EqualException>(() => Assert.StrictEqual(42, 2112));
885 var ex = Assert.Throws<EqualException>(() => Assert.StrictEqual(expected, actual));
922 Assert.Throws<NotEqualException>(() => Assert.NotEqual(expected, actual));
923 Assert.Throws<NotEqualException>(() => Assert.NotEqual(expected, (object)actual));
942 Assert.Throws<NotEqualException>(() => Assert.NotEqual(expected, actual));
943 Assert.Throws<NotEqualException>(() => Assert.NotEqual(expected, (object)actual));
1079 var ex = Assert.Throws<NotEqualException>(() => Assert.NotStrictEqual(new DerivedClass(), new BaseClass()));
RangeAssertsTests.cs (9)
12 Assert.Throws<InRangeException>(() => Assert.InRange(1.50, .75, 1.25));
24 Assert.Throws<InRangeException>(() => Assert.InRange(0, 1, 2));
30 Assert.Throws<InRangeException>(() => Assert.InRange(2, 0, 1));
42 Assert.Throws<InRangeException>(() => Assert.InRange("adam", "bob", "scott"));
63 Assert.Throws<InRangeException>(() => Assert.InRange(1.0, .75, 1.25, new DoubleComparer(1)));
78 Assert.Throws<NotInRangeException>(() => Assert.NotInRange(1.0, .75, 1.25));
90 Assert.Throws<NotInRangeException>(() => Assert.NotInRange(2, 1, 3));
102 Assert.Throws<NotInRangeException>(() => Assert.NotInRange("bob", "adam", "scott"));
111 Assert.Throws<NotInRangeException>(() => Assert.NotInRange(400.0, .75, 1.25, new DoubleComparer(-1)));
SetAssertsTests.cs (14)
13 Assert.Throws<ArgumentNullException>(() => Assert.Subset(null!, new HashSet<int>()));
14 Assert.Throws<SubsetException>(() => Assert.Subset(new HashSet<int>(), null));
41 var ex = Assert.Throws<SubsetException>(() => Assert.Subset(expectedSuperset, actual));
57 Assert.Throws<ArgumentNullException>(() => Assert.ProperSubset(null!, new HashSet<int>()));
58 Assert.Throws<ProperSubsetException>(() => Assert.ProperSubset(new HashSet<int>(), null));
67 var ex = Assert.Throws<ProperSubsetException>(() => Assert.ProperSubset(expectedSuperset, actual));
92 Assert.Throws<ProperSubsetException>(() => Assert.ProperSubset(expectedSuperset, actual));
101 Assert.Throws<ArgumentNullException>(() => Assert.Superset(null!, new HashSet<int>()));
102 Assert.Throws<SupersetException>(() => Assert.Superset(new HashSet<int>(), null));
129 var ex = Assert.Throws<SupersetException>(() => Assert.Superset(expectedSubset, actual));
145 Assert.Throws<ArgumentNullException>(() => Assert.ProperSuperset(null!, new HashSet<int>()));
146 Assert.Throws<ProperSupersetException>(() => Assert.ProperSuperset(new HashSet<int>(), null));
155 var ex = Assert.Throws<ProperSupersetException>(() => Assert.ProperSuperset(expectedSubset, actual));
180 Assert.Throws<ProperSupersetException>(() => Assert.ProperSuperset(expectedSubset, actual));
StringAssertsTests.cs (13)
33 Assert.Throws<ContainsException>(() => Assert.Contains("hey", "Hello, world!"));
39 Assert.Throws<ContainsException>(() => Assert.Contains("foo", (string?)null));
92 Assert.Throws<DoesNotContainException>(() => Assert.DoesNotContain("WORLD", "Hello, world!", StringComparison.OrdinalIgnoreCase));
210 Assert.Throws<StartsWithException>(() => Assert.StartsWith("hey", "Hello, world!"));
216 Assert.Throws<StartsWithException>(() => Assert.StartsWith("foo", null));
254 Assert.Throws<EndsWithException>(() => Assert.EndsWith("hey", "Hello, world!"));
260 Assert.Throws<EndsWithException>(() => Assert.EndsWith("foo", null));
278 Assert.Throws<ArgumentNullException>(() => Assert.Matches((string?)null!, "Hello, world!"));
279 Assert.Throws<MatchesException>(() => Assert.Matches(@"\w+", null));
308 Assert.Throws<ArgumentNullException>(() => Assert.Matches((Regex?)null!, "Hello, world!"));
309 Assert.Throws<MatchesException>(() => Assert.Matches(new Regex(@"\w+"), null));
344 Assert.Throws<ArgumentNullException>(() => Assert.DoesNotMatch((string?)null!, "Hello, world!"));
374 Assert.Throws<ArgumentNullException>(() => Assert.DoesNotMatch((Regex?)null!, "Hello, world!"));
Microsoft.Extensions.AI.Abstractions.Tests (3)
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (1)
Microsoft.Extensions.Diagnostics.Probes.Tests (1)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (2)
Microsoft.Extensions.Diagnostics.Testing.Tests (3)
Microsoft.Extensions.Http.Resilience.Tests (10)
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (4)
107Assert.Throws<ArgumentNullException>(() => AddStandardResilienceHandler(mode, builder, _validConfigurationSection, options => { }));
117Assert.Throws<ArgumentNullException>(() => AddStandardResilienceHandler(mode, builder, _validConfigurationSection, null!));
128Assert.Throws<ArgumentNullException>(() => AddStandardResilienceHandler(mode, builder, null!, options => { }));
138Assert.Throws<ArgumentException>(() => AddStandardResilienceHandler(mode, builder, _emptyConfigurationSection, options => { }));
Microsoft.Extensions.Localization.Tests (1)
Microsoft.Extensions.SecretManager.Tools.Tests (1)
Microsoft.Extensions.Telemetry.Tests (2)
Microsoft.Extensions.TimeProvider.Testing.Tests (2)
Microsoft.JSInterop.Tests (5)
Microsoft.ML.AutoML.Tests (1)
Microsoft.ML.Tests (9)
Microsoft.Net.Http.Headers.Tests (17)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (19)
ProjectSystemShim\CPS\SourceFileHandlingTests.cs (17)
312Assert.Throws<ArgumentException>(() => project.ReorderSourceFiles([sourceFileFullPath4, sourceFileFullPath5]));
315Assert.Throws<InvalidOperationException>(() => project.ReorderSourceFiles([@"C:\invalid source file", sourceFileFullPath2, sourceFileFullPath3, sourceFileFullPath4, sourceFileFullPath5]));
317Assert.Throws<ArgumentOutOfRangeException>(() => project.ReorderSourceFiles([]));
318Assert.Throws<ArgumentOutOfRangeException>(() => project.ReorderSourceFiles(null));
337Assert.Throws<ArgumentException>(() => project.ReorderSourceFiles([sourceFileFullPath4, sourceFileFullPath5]));
338Assert.Throws<ArgumentException>(() => project.ReorderSourceFiles([@"C:\invalid source file"])); // no files were added, therefore we should get an argument exception
339Assert.Throws<ArgumentOutOfRangeException>(() => project.ReorderSourceFiles([]));
340Assert.Throws<ArgumentOutOfRangeException>(() => project.ReorderSourceFiles(null));
345Assert.Throws<ArgumentException>(() => project.ReorderSourceFiles([sourceFileFullPath4, sourceFileFullPath5]));
346Assert.Throws<InvalidOperationException>(() => project.ReorderSourceFiles([@"C:\invalid source file"]));
347Assert.Throws<ArgumentOutOfRangeException>(() => project.ReorderSourceFiles([]));
348Assert.Throws<ArgumentOutOfRangeException>(() => project.ReorderSourceFiles(null));
361Assert.Throws<ArgumentException>(() => project.ReorderSourceFiles([sourceFileFullPath4, sourceFileFullPath5]));
362Assert.Throws<InvalidOperationException>(() => project.ReorderSourceFiles([@"C:\invalid source file", sourceFileFullPath2, sourceFileFullPath3, sourceFileFullPath4, sourceFileFullPath5]));
363Assert.Throws<ArgumentOutOfRangeException>(() => project.ReorderSourceFiles([]));
364Assert.Throws<ArgumentOutOfRangeException>(() => project.ReorderSourceFiles(null));
386Assert.Throws<InvalidOperationException>(() => project.ReorderSourceFiles([sourceFileFullPath2]));
Security.TransportSecurity.IntegrationTests (6)
Shared.Tests (4)
Sockets.BindTests (5)
System.ServiceModel.Http.Tests (1)
System.ServiceModel.NetTcp.Tests (2)
System.ServiceModel.Primitives.Tests (28)
xunit.assert (1)