43 references to ThrowsAny
Microsoft.AspNetCore.DataProtection.Tests (2)
EphemeralDataProtectionProviderTests.cs (2)
24Assert.ThrowsAny<CryptographicException>(() => 41Assert.ThrowsAny<CryptographicException>(() =>
Microsoft.AspNetCore.InternalTesting.Tests (3)
EventSourceValidatorTests.cs (3)
26Assert.ThrowsAny<Exception>( 34var ex = Assert.ThrowsAny<Exception>( 46var ex = Assert.ThrowsAny<Exception>(
Microsoft.AspNetCore.OutputCaching.Tests (1)
OutputCacheMiddlewareTests.cs (1)
896Assert.ThrowsAny<InvalidOperationException>(() => OutputCacheMiddleware.AddOutputCacheFeature(context));
Microsoft.AspNetCore.ResponseCaching.Tests (1)
ResponseCachingMiddlewareTests.cs (1)
885Assert.ThrowsAny<InvalidOperationException>(() => ResponseCachingMiddleware.AddResponseCachingFeature(httpContext));
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
Http1\Http1ConnectionTests.cs (2)
1026var ex = Assert.ThrowsAny<Http.BadHttpRequestException>(() => _http1Connection.EnsureHostHeaderExists()); 1035var ex = Assert.ThrowsAny<Http.BadHttpRequestException>(() => _http1Connection.EnsureHostHeaderExists());
Microsoft.AspNetCore.Shared.Tests (2)
WebEncodersTests.cs (2)
21Assert.ThrowsAny<ArgumentException>(() => 107Assert.ThrowsAny<ArgumentException>(() =>
Microsoft.AspNetCore.WebUtilities.Tests (2)
WebEncodersTests.cs (2)
18Assert.ThrowsAny<ArgumentException>(() => 36Assert.ThrowsAny<ArgumentException>(() =>
Microsoft.CodeAnalysis.UnitTests (5)
Collections\List\ICollection.Generic.Tests.cs (2)
503Assert.ThrowsAny<ArgumentException>(() => collection.CopyTo(array, count)); 525Assert.ThrowsAny<ArgumentException>(() => collection.CopyTo(array, 1));
Text\SourceTextTests.cs (2)
469var ex = Assert.ThrowsAny<ArgumentOutOfRangeException>(() => 478var ex = Assert.ThrowsAny<ArgumentOutOfRangeException>(() =>
Text\TextChangeTests.cs (1)
153Assert.ThrowsAny<ArgumentException>(() =>
Microsoft.DotNet.RemoteExecutor.Tests (5)
RemoteExecutorTests.cs (5)
76Assert.ThrowsAny<RemoteExecutionException>(() => 99Assert.ThrowsAny<RemoteExecutionException>(() => 115Assert.ThrowsAny<RemoteExecutionException>(() => 128Assert.ThrowsAny<RemoteExecutionException>(() => 140Assert.ThrowsAny<RemoteExecutionException>(() =>
Microsoft.DotNet.XUnitAssert.Tests (6)
Asserts\ExceptionAssertsTests.cs (6)
1043 Assert.Throws<ArgumentNullException>("testCode", () => Assert.ThrowsAny<ArgumentException>(default(Action)!)); 1051 var ex = Record.Exception(() => Assert.ThrowsAny<ArgumentException>(testCode)); 1067 Assert.ThrowsAny<ArgumentException>(testCode); 1076 var ex = Record.Exception(() => Assert.ThrowsAny<ArgumentException>(testCode)); 1093 Assert.ThrowsAny<ArgumentException>(testCode); 1103 Assert.ThrowsAny<Exception>(testCode);
Microsoft.JSInterop.Tests (4)
Infrastructure\DotNetDispatcherTest.cs (4)
346Assert.ThrowsAny<JsonException>(() => DotNetDispatcher.EndInvokeJS(jsRuntime, "")); 357Assert.ThrowsAny<JsonException>(() => DotNetDispatcher.EndInvokeJS(jsRuntime, $"{{\"key\": \"{jsRuntime.LastInvocationAsyncHandle}\"}}")); 368Assert.ThrowsAny<JsonException>(() => DotNetDispatcher.EndInvokeJS(jsRuntime, $"[{jsRuntime.LastInvocationAsyncHandle}, false")); 379Assert.ThrowsAny<JsonException>(() => DotNetDispatcher.EndInvokeJS(jsRuntime, $"[{jsRuntime.LastInvocationAsyncHandle}, false, \"Hello\", 5]"));
Microsoft.ML.Core.Tests (7)
UnitTests\DataTypes.cs (7)
95var ex = Assert.ThrowsAny<Exception>(() => mapper(in src, ref dst)); 101ex = Assert.ThrowsAny<Exception>(() => mapper(in src, ref dst)); 135var ex = Assert.ThrowsAny<Exception>(() => mapper(in src, ref dst)); 141ex = Assert.ThrowsAny<Exception>(() => mapper(in src, ref dst)); 175var ex = Assert.ThrowsAny<Exception>(() => mapper(in src, ref dst)); 181ex = Assert.ThrowsAny<Exception>(() => mapper(in src, ref dst)); 221var ex = Assert.ThrowsAny<Exception>(() => mapper(in src, ref dst));
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
GlyphExtensionsTests.cs (2)
107Assert.ThrowsAny<ArgumentException>(() => 141Assert.ThrowsAny<Exception>(() =>
Roslyn.VisualStudio.Next.UnitTests (1)
Remote\SnapshotSerializationTests.cs (1)
274Assert.ThrowsAny<Exception>(() => validator.SolutionStateEqual(solutionId1, solutionId2));