42 references to ThrowsAny
Microsoft.AspNetCore.DataProtection.Tests (2)
EphemeralDataProtectionProviderTests.cs (2)
23Assert.ThrowsAny<CryptographicException>(() => 40Assert.ThrowsAny<CryptographicException>(() =>
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.Build.Engine.OM.UnitTests (5)
ObjectModelRemoting\LinkedConstructionModify_Tests.cs (4)
197Assert.ThrowsAny<ArgumentException>(() => newTarget1.Real.RemoveChild(newTask2.Real)); 200Assert.ThrowsAny<ArgumentException>(() => newTarget1.View.RemoveChild(newTask1.View)); 296Assert.ThrowsAny<ArgumentException>(() => newTask.Real.RemoveChild(newOutputItem2.Real)); 299Assert.ThrowsAny<ArgumentException>(() => newTask.View.RemoveChild(newOutputItem2.View));
ObjectModelRemoting\LinkedSpecialCasesScenarios.cs (1)
119Assert.ThrowsAny<InvalidOperationException>(() => xmlPair.View.AppendChild(cloned));
Microsoft.Build.Engine.UnitTests (1)
BackEnd\IntrinsicTask_Tests.cs (1)
2093Assert.ThrowsAny<InvalidProjectFileException>(() => ExecuteTask(task, lookup))
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)
455var ex = Assert.ThrowsAny<ArgumentOutOfRangeException>(() => 464var ex = Assert.ThrowsAny<ArgumentOutOfRangeException>(() =>
Text\TextChangeTests.cs (1)
130Assert.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 (5)
ExceptionAssertsTests.cs (5)
502 Assert.Throws<ArgumentNullException>("testCode", () => Assert.ThrowsAny<ArgumentException>(default(Action)!)); 510 var ex = Record.Exception(() => Assert.ThrowsAny<ArgumentException>(testCode)); 526 Assert.ThrowsAny<ArgumentException>(testCode); 535 var ex = Record.Exception(() => Assert.ThrowsAny<ArgumentException>(testCode)); 552 Assert.ThrowsAny<ArgumentException>(testCode);
Microsoft.JSInterop.Tests (4)
Infrastructure\DotNetDispatcherTest.cs (4)
345Assert.ThrowsAny<JsonException>(() => DotNetDispatcher.EndInvokeJS(jsRuntime, "")); 356Assert.ThrowsAny<JsonException>(() => DotNetDispatcher.EndInvokeJS(jsRuntime, $"{{\"key\": \"{jsRuntime.LastInvocationAsyncHandle}\"}}")); 367Assert.ThrowsAny<JsonException>(() => DotNetDispatcher.EndInvokeJS(jsRuntime, $"[{jsRuntime.LastInvocationAsyncHandle}, false")); 378Assert.ThrowsAny<JsonException>(() => DotNetDispatcher.EndInvokeJS(jsRuntime, $"[{jsRuntime.LastInvocationAsyncHandle}, false, \"Hello\", 5]"));
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
GlyphExtensionsTests.cs (2)
107Assert.ThrowsAny<ArgumentException>(() => 141Assert.ThrowsAny<Exception>(() =>
System.Drawing.Common.Tests (1)
System\Drawing\GraphicsTests.cs (1)
1648Assert.ThrowsAny<ArgumentException>(() => graphics.CopyFromScreen(1, 2, 3, 4, Size.Empty, copyPixelOperation));
System.Windows.Forms.Primitives.Tests (1)
System\Windows\Forms\Automation\UiaTextRangeTests.cs (1)
1299Assert.ThrowsAny<Exception>(() => textRange.TestAccessor().MoveTo(start, end));
System.Windows.Forms.Primitives.TestUtilities (1)
Extensions\AssertExtensions.cs (1)
258OperationCanceledException oce = Assert.ThrowsAny<OperationCanceledException>(testCode);
System.Windows.Forms.Tests (6)
System\Windows\Forms\PictureBoxTests.cs (6)
1911Assert.ThrowsAny<Exception>(() => pictureBox.Load(value)); 1916Assert.ThrowsAny<Exception>(() => pictureBox.Load(value)); 1932Assert.ThrowsAny<Exception>(() => pictureBox.Load(value)); 1937Assert.ThrowsAny<Exception>(() => pictureBox.Load(value)); 1951Assert.ThrowsAny<Exception>(() => pictureBox.Load("Location")); 1957Assert.ThrowsAny<Exception>(() => pictureBox.Load("Location"));