4413 references to IsType
Aspire.Azure.AI.OpenAI.Tests (7)
AspireConfigurableOpenAIExtensionsTests.cs (7)
62Assert.IsType<AzureOpenAIClient>(openAiClient); 89Assert.IsType<OpenAIClient>(openAiClient); 116Assert.IsType<AzureOpenAIClient>(openAiClient); 135Assert.IsType<AzureOpenAIClient>(openAiClient); 162Assert.IsType<OpenAIClient>(openAiClient); 189Assert.IsType<OpenAIClient>(openAiClient); 216Assert.IsType<OpenAIClient>(openAiClient);
Aspire.Hosting.Nats.Tests (1)
NatsFunctionalTests.cs (1)
150Assert.IsType<NatsServerException>(exception.InnerException);
Aspire.Hosting.Tests (5)
AddParameterTests.cs (2)
286Assert.IsType<UserSecretsParameterDefault>(parameter1.Resource.Default); 290Assert.IsType<GenerateParameterDefault>(parameter2.Resource.Default);
DistributedApplicationBuilderTests.cs (1)
61Assert.IsType<TestResource>(resource);
DistributedApplicationTests.cs (1)
125Assert.IsType<DistributedApplicationException>(ex.InnerExceptions.First());
ProjectResourceTests.cs (1)
76Assert.IsType<TestProject>(serviceMetadata);
Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests (7)
AspireSqlServerEFCoreSqlClientExtensionsTests.cs (1)
111var retryStrategy = Assert.IsType<SqlServerRetryingExecutionStrategy>(executionStrategy);
EnrichSqlServerTests.cs (6)
87var retryStrategy = Assert.IsType<SqlServerRetryingExecutionStrategy>(executionStrategy); 139var retryStrategy = Assert.IsType<SqlServerRetryingExecutionStrategy>(executionStrategy); 182var retryStrategy = Assert.IsType<SqlServerRetryingExecutionStrategy>(executionStrategy); 220var retryStrategy = Assert.IsType<SqlServerRetryingExecutionStrategy>(executionStrategy); 286Assert.IsType<CustomExecutionStrategy>(executionStrategy); 331Assert.IsType<CustomRetryExecutionStrategy>(executionStrategy);
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (7)
AspireEFPostgreSqlExtensionsTests.cs (1)
121var retryStrategy = Assert.IsType<NpgsqlRetryingExecutionStrategy>(executionStrategy);
EnrichNpgsqlTests.cs (6)
89var retryStrategy = Assert.IsType<NpgsqlRetryingExecutionStrategy>(executionStrategy); 143var retryStrategy = Assert.IsType<NpgsqlRetryingExecutionStrategy>(executionStrategy); 187var retryStrategy = Assert.IsType<NpgsqlRetryingExecutionStrategy>(executionStrategy); 226var retryStrategy = Assert.IsType<NpgsqlRetryingExecutionStrategy>(executionStrategy); 296Assert.IsType<CustomExecutionStrategy>(executionStrategy); 343Assert.IsType<CustomRetryExecutionStrategy>(executionStrategy);
Aspire.OpenAI.Tests (1)
AspireOpenAIExtensionsTests.cs (1)
42Assert.IsType<OpenAIClient>(client);
Aspire.Oracle.EntityFrameworkCore.Tests (7)
AspireOracleEFCoreDatabaseExtensionsTests.cs (1)
112var retryStrategy = Assert.IsType<OracleRetryingExecutionStrategy>(executionStrategy);
EnrichOracleDatabaseTests.cs (6)
88var retryStrategy = Assert.IsType<OracleRetryingExecutionStrategy>(executionStrategy); 140var retryStrategy = Assert.IsType<OracleRetryingExecutionStrategy>(executionStrategy); 183var retryStrategy = Assert.IsType<OracleRetryingExecutionStrategy>(executionStrategy); 221var retryStrategy = Assert.IsType<OracleRetryingExecutionStrategy>(executionStrategy); 287Assert.IsType<CustomExecutionStrategy>(executionStrategy); 332Assert.IsType<CustomRetryExecutionStrategy>(executionStrategy);
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (7)
AspireEFMySqlExtensionsTests.cs (1)
131var retryStrategy = Assert.IsType<MySqlRetryingExecutionStrategy>(executionStrategy);
EnrichMySqlTests.cs (6)
101var retryStrategy = Assert.IsType<MySqlRetryingExecutionStrategy>(executionStrategy); 153var retryStrategy = Assert.IsType<MySqlRetryingExecutionStrategy>(executionStrategy); 196var retryStrategy = Assert.IsType<MySqlRetryingExecutionStrategy>(executionStrategy); 234var retryStrategy = Assert.IsType<MySqlRetryingExecutionStrategy>(executionStrategy); 300Assert.IsType<CustomExecutionStrategy>(executionStrategy); 345Assert.IsType<CustomRetryExecutionStrategy>(executionStrategy);
Client.ChannelLayer.IntegrationTests (2)
DuplexChannelWithSynchronizationContext.cs (2)
164Assert.IsType<TestTypes.SingleThreadSynchronizationContext>(SynchronizationContext.Current); 229Assert.IsType<TestTypes.SingleThreadSynchronizationContext>(SynchronizationContext.Current);
IIS.FunctionalTests (4)
Http3Tests.cs (4)
124var qex = Assert.IsType<QuicException>(ex.InnerException); 140var qex = Assert.IsType<QuicException>(ex.InnerException?.InnerException?.InnerException); 157var qex = Assert.IsType<QuicException>(ex.InnerException?.InnerException?.InnerException); 171var qex = Assert.IsType<QuicException>(ex.InnerException);
IIS.Tests (8)
ClientDisconnectTests.cs (5)
95Assert.IsType<OperationCanceledException>(exception); 134Assert.IsType<ConnectionResetException>(exception); 177Assert.IsType<OperationCanceledException>(exception); 218Assert.IsType<OperationCanceledException>(exception); 275Assert.IsType<ConnectionResetException>(exception);
HttpBodyControlFeatureTests.cs (2)
52Assert.IsType<InvalidOperationException>(readException); 53Assert.IsType<InvalidOperationException>(writeException);
ResponseAbortTests.cs (1)
93Assert.IsType<ConnectionAbortedException>(exception);
InMemory.FunctionalTests (8)
Http2\Http2StreamTests.cs (7)
1166Assert.IsType<Http2StreamErrorException>(thrownEx.InnerException); 1201Assert.IsType<Http2StreamErrorException>(thrownEx.InnerException); 1237Assert.IsType<Http2StreamErrorException>(thrownEx.InnerException); 1273Assert.IsType<Http2StreamErrorException>(thrownEx.InnerException); 3442Assert.IsType<ConnectionAbortedException>(thrownEx); 3469Assert.IsType<TaskCanceledException>(thrownEx); 3471Assert.IsType<ConnectionAbortedException>(thrownEx.InnerException);
HttpsTests.cs (1)
104Assert.IsType<NotSupportedException>(errorException);
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (1)
1082Assert.IsType<WindowsPrincipal>(context.User);
Interop.FunctionalTests (3)
Http3\Http3RequestTests.cs (3)
576var innerEx = Assert.IsType<HttpProtocolException>(ex.InnerException); 685var innerEx = Assert.IsType<HttpProtocolException>(ex.InnerException); 2082Assert.IsType<ConnectionAbortedException>(rootException);
Microsoft.Analyzers.Local.Tests (7)
Json\JsonObjectTest.cs (1)
79Assert.IsType<KeyValuePair<string, JsonValue>>(value);
Json\JsonValueTest.cs (6)
43Assert.IsType<JsonObject>(new JsonValue(new JsonObject()).AsJsonObject); 50Assert.IsType<JsonArray>(new JsonValue(new JsonArray()).AsJsonArray); 142Assert.IsType<JsonObject>(new JsonValue(new JsonObject()).AsJsonObject); 150Assert.IsType<JsonArray>(new JsonValue(new JsonArray()).AsJsonArray); 171Assert.IsType<JsonObject>(new JsonValue(new JsonObject()).AsObject); 172Assert.IsType<JsonArray>(new JsonValue(new JsonArray()).AsObject);
Microsoft.AspNetCore.App.UnitTests (4)
SharedFxTests.cs (4)
120var prop = Assert.IsType<JProperty>(item); 121var lib = Assert.IsType<JObject>(prop.Value); 135var obj = Assert.IsType<JProperty>(item); 148var obj = Assert.IsType<JProperty>(item);
Microsoft.AspNetCore.Authentication.Negotiate.Test (4)
EventTests.cs (4)
80Assert.IsType<InvalidOperationException>(context.Exception); 128Assert.IsType<Exception>(context.Exception); 179Assert.IsType<Exception>(context.Exception); 229Assert.IsType<Exception>(context.Exception);
Microsoft.AspNetCore.Authorization.Test (2)
AuthorizationBuilderTests.cs (1)
103Assert.IsType<AssertionRequirement>(policy.Requirements.First());
DefaultAuthorizationServiceTests.cs (1)
218Assert.IsType<ClaimsAuthorizationRequirement>(allowed.Failure.FailedRequirements.First());
Microsoft.AspNetCore.Components.Authorization.Tests (18)
AuthorizeRouteViewTest.cs (8)
292component => Assert.IsType<CascadingAuthenticationState>(component), 293component => Assert.IsType<CascadingValue<Task<AuthenticationState>>>(component), 295component => Assert.IsType<LayoutView>(component), 296component => Assert.IsType<TestPageWithNoAuthorization>(component)); 320component => Assert.IsType<CascadingValue<Task<AuthenticationState>>>(component), 321component => Assert.IsType<AuthorizeRouteView>(component), 326component => Assert.IsType<LayoutView>(component), 327component => Assert.IsType<TestPageWithNoAuthorization>(component));
AuthorizeViewTest.cs (9)
46req => Assert.IsType<DenyAnonymousAuthorizationRequirement>(req)); 81req => Assert.IsType<DenyAnonymousAuthorizationRequirement>(req)); 109req => Assert.IsType<DenyAnonymousAuthorizationRequirement>(req)); 145req => Assert.IsType<DenyAnonymousAuthorizationRequirement>(req)); 181req => Assert.IsType<DenyAnonymousAuthorizationRequirement>(req)); 228req => Assert.IsType<DenyAnonymousAuthorizationRequirement>(req)); 345req => Assert.IsType<DenyAnonymousAuthorizationRequirement>(req)); 403req => Assert.IsType<DenyAnonymousAuthorizationRequirement>(req)); 474Assert.IsType<DenyAnonymousAuthorizationRequirement>(req));
src\Components\Shared\test\AssertFrame.cs (1)
98Assert.IsType<T>(frame.Component);
Microsoft.AspNetCore.Components.Endpoints.Tests (18)
Binding\FormDataMapperTests.cs (2)
1246var dictionary = Assert.IsType<TImplementation>(result); 1274var list = Assert.IsType<TImplementation>(result);
EndpointHtmlRendererTest.cs (7)
106var invoked = Assert.IsType<InvokedRenderModes>(mode); 143var rawValue = Assert.IsType<JsonElement>(value); 215var rawValue = Assert.IsType<JsonElement>(value); 480var rawValue = Assert.IsType<JsonElement>(value); 560var rawValue = Assert.IsType<JsonElement>(value); 1093var rawValue = Assert.IsType<JsonElement>(value); 1122var rawValue = Assert.IsType<JsonElement>(value);
HotReloadServiceTests.cs (7)
49var endpoint = Assert.IsType<RouteEndpoint>( 84var endpoint = Assert.IsType<RouteEndpoint>(Assert.Single(endpointDataSource.Endpoints, 108var endpoint = Assert.IsType<RouteEndpoint>(Assert.Single(endpointDataSource.Endpoints, e => e.Metadata.GetMetadata<RootComponentMetadata>() != null)); 118var updatedEndpoint = Assert.IsType<RouteEndpoint>(Assert.Single(endpointDataSource.Endpoints, e => e.Metadata.GetMetadata<RootComponentMetadata>() != null)); 134var endpoint = Assert.IsType<RouteEndpoint>(Assert.Single(endpointDataSource.Endpoints, e => e.Metadata.GetMetadata<RootComponentMetadata>() != null)); 136var compositeEndpoint = Assert.IsType<RouteEndpoint>(Assert.Single(compositeEndpointDataSource.Endpoints, e => e.Metadata.GetMetadata<RootComponentMetadata>() != null)); 183var endpoint = Assert.IsType<RouteEndpoint>(Assert.Single(endpointDataSource.Endpoints, e => e.Metadata.GetMetadata<RootComponentMetadata>() != null));
RazorComponentEndpointFactoryTest.cs (2)
36var routeEndpoint = Assert.IsType<RouteEndpoint>(endpoint); 133var routeEndpoint = Assert.IsType<RouteEndpoint>(endpoint);
Microsoft.AspNetCore.Components.Forms.Tests (2)
FieldIdentifierTest.cs (1)
154result[i] = Assert.IsType<TestModel>(value);
src\Components\Shared\test\AssertFrame.cs (1)
98Assert.IsType<T>(frame.Component);
Microsoft.AspNetCore.Components.Server.Tests (9)
Circuits\CircuitHostTest.cs (7)
149var componentException = Assert.IsType<JSDisconnectedException>(component.ExceptionDuringDisposeAsync); 284var aex = Assert.IsType<AggregateException>(reportedErrors.Single().ExceptionObject); 432var component = Assert.IsType<DynamicallyAddedComponent>(componentState.Component); 458var component = Assert.IsType<DynamicallyAddedComponent>(componentState.Component); 485var component = Assert.IsType<DynamicallyAddedComponent>(componentState.Component); 519var component = Assert.IsType<DynamicallyAddedComponent>(componentState.Component); 556var component = Assert.IsType<DynamicallyAddedComponent>(componentState.Component);
ProtectedBrowserStorageTest.cs (1)
233Assert.IsType<ArgumentException>(innerException);
src\SignalR\common\SignalR.Common\test\Internal\Protocol\MessagePackHubProtocolTestBase.cs (1)
398var bindingFailure = Assert.IsType<InvocationBindingFailureMessage>(message);
Microsoft.AspNetCore.Components.Tests (30)
ComponentFactoryTest.cs (7)
26Assert.IsType<EmptyComponent>(instance); 54var component = Assert.IsType<ComponentWithInjectProperties>(instance); // Custom activator returns a different type 87var component = Assert.IsType<DerivedComponent>(instance); 112var component = Assert.IsType<ComponentWithNonInjectableProperties>(instance); 132Assert.IsType<ComponentWithInjectProperties>(instance); 157Assert.IsType<TestRenderMode>(renderer.SuppliedRenderMode); 247var component = Assert.IsType<ComponentWithConstructorInjection>(instance);
DynamicComponentTest.cs (1)
124Assert.IsType<TestComponent>(instance.Instance);
RendererTest.cs (11)
83Assert.IsType<MessageComponent>(componentFrame.Component); 2248Assert.IsType<FakeComponent>(childComponent3); 2301var aex = Assert.IsType<AggregateException>(Assert.Single(renderer.HandledExceptions)); 2460var aex = Assert.IsType<InvalidOperationException>(Assert.Single(renderer.HandledExceptions)); 2495Assert.IsType<TaskCanceledException>(Assert.Single(renderer.HandledExceptions)); 2539var aex = Assert.IsType<TaskCanceledException>(Assert.Single(renderer.HandledExceptions)); 2603var ex = Assert.IsType<Exception>(Assert.Single(renderer.HandledExceptions)); 4221var nestedComponent = Assert.IsType<DisposableComponent>(componentFrame.Component); 4257var aex = Assert.IsType<AggregateException>(Assert.Single(renderer.HandledExceptions)); 4502Assert.IsType<MessageComponent>(suppliedComponent); 4520Assert.IsType<MessageComponent>(suppliedComponent);
RenderTreeDiffBuilderTest.cs (3)
1922Assert.IsType<FakeComponent>(capturedInstance1); 1923Assert.IsType<FakeComponent>(capturedInstance2); 1962Assert.IsType<FakeComponent>(capturedInstance);
RenderTreeUpdaterTest.cs (7)
33frame => AssertFrame.Attribute(frame, "eventname", v => Assert.IsType<Action>(v), 1), 61frame => AssertFrame.Attribute(frame, "eventname", v => Assert.IsType<Action>(v), 1), 94frame => AssertFrame.Attribute(frame, "eventname", v => Assert.IsType<Action>(v), 1), 97frame => AssertFrame.Attribute(frame, "eventname", v => Assert.IsType<Action>(v), 4), 125frame => AssertFrame.Attribute(frame, "eventname", v => Assert.IsType<Action>(v), 1)); 149frame => AssertFrame.Attribute(frame, "eventname", v => Assert.IsType<Action>(v), 1)); 183frame => AssertFrame.Attribute(frame, "eventname", v => Assert.IsType<Action>(v), 4));
src\Components\Shared\test\AssertFrame.cs (1)
98Assert.IsType<T>(frame.Component);
Microsoft.AspNetCore.Components.Web.Tests (1)
src\Components\Shared\test\AssertFrame.cs (1)
98Assert.IsType<T>(frame.Component);
Microsoft.AspNetCore.DataProtection.Tests (16)
AuthenticatedEncryption\CngCbcAuthenticatedEncryptorFactoryTest.cs (1)
48Assert.IsType<CbcAuthenticatedEncryptor>(encryptor);
AuthenticatedEncryption\CngGcmAuthenticatedEncryptorFactoryTest.cs (1)
48Assert.IsType<CngGcmAuthenticatedEncryptor>(encryptor);
AuthenticatedEncryption\ManagedAuthenticatedEncryptorFactoryTest.cs (1)
45Assert.IsType<ManagedAuthenticatedEncryptor>(encryptor);
Internal\KeyManagementOptionsSetupTest.cs (12)
33Assert.IsType<AuthenticatedEncryptorConfiguration>(options.AuthenticatedEncryptorConfiguration); 36f => Assert.IsType<CngGcmAuthenticatedEncryptorFactory>(f), 37f => Assert.IsType<CngCbcAuthenticatedEncryptorFactory>(f), 38f => Assert.IsType<ManagedAuthenticatedEncryptorFactory>(f), 39f => Assert.IsType<AuthenticatedEncryptorFactory>(f)); 64k => Assert.IsType<MyKeyEscrowSink1>(k), 65k => Assert.IsType<MyKeyEscrowSink2>(k)); 68Assert.IsType<ManagedAuthenticatedEncryptorConfiguration>(options.AuthenticatedEncryptorConfiguration); 71f => Assert.IsType<CngGcmAuthenticatedEncryptorFactory>(f), 72f => Assert.IsType<CngCbcAuthenticatedEncryptorFactory>(f), 73f => Assert.IsType<ManagedAuthenticatedEncryptorFactory>(f), 74f => Assert.IsType<AuthenticatedEncryptorFactory>(f));
TypeForwardingActivatorTests.cs (1)
117Assert.IsType<ClassWithParameterlessCtor>(activator.CreateInstance(typeof(object), newName, out var forwarded));
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
Logging\AcceptanceTests.cs (1)
751Assert.IsType<InvalidOperationException>(logCollector.GetSnapshot()[0].Exception);
Microsoft.AspNetCore.Diagnostics.Tests (1)
ExceptionHandlerTest.cs (1)
569Assert.IsType<ApplicationException>(exception.InnerException);
Microsoft.AspNetCore.HeaderParsing.Tests (1)
HeaderRegistryTests.cs (1)
98Assert.IsType<DateTimeOffsetParser>(key.Parser);
Microsoft.AspNetCore.HeaderPropagation.Tests (1)
HeaderPropagationIntegrationTest.cs (1)
68Assert.IsType<InvalidOperationException>(captured);
Microsoft.AspNetCore.Hosting.Tests (3)
StartupManagerTests.cs (3)
558Assert.IsType<MyContainer>(app.ApplicationServices); 574Assert.IsType<MyContainer>(app.ApplicationServices); 590Assert.IsType<MyContainer>(app.ApplicationServices);
Microsoft.AspNetCore.Html.Abstractions.Tests (18)
HtmlContentBuilderExtensionsTest.cs (4)
40entry => Assert.Equal("Hi", Assert.IsType<UnencodedString>(entry).Value), 73entry => Assert.Equal("Hi", Assert.IsType<EncodedString>(entry).Value), 90entry => Assert.Equal("Hi", Assert.IsType<UnencodedString>(entry).Value)); 124entry => Assert.Equal("Hi", Assert.IsType<EncodedString>(entry).Value));
HtmlContentBuilderTest.cs (14)
24Assert.IsType<string>(result); 72var testHtmlContent = Assert.IsType<TestHtmlContent>(result); 130entry => Assert.Equal("some-content", Assert.IsType<string>(entry)), 131entry => Assert.Equal(new TestHtmlContent("hello"), Assert.IsType<TestHtmlContent>(entry)), 132entry => Assert.Equal("Test", Assert.IsType<string>(entry))); 158entry => Assert.Equal("some-content", Assert.IsType<string>(entry)), 159entry => Assert.Equal(new TestHtmlContent("hello"), Assert.IsType<TestHtmlContent>(entry)), 160entry => Assert.Equal("Test", Assert.IsType<string>(entry))); 182entry => Assert.Equal("some-content", Assert.IsType<string>(entry)), 183entry => Assert.Equal(new TestHtmlContent("hello"), Assert.IsType<TestHtmlContent>(entry)), 184entry => Assert.Equal("Test", Assert.IsType<string>(entry))); 210entry => Assert.Equal("some-content", Assert.IsType<string>(entry)), 211entry => Assert.Equal(new TestHtmlContent("hello"), Assert.IsType<TestHtmlContent>(entry)), 212entry => Assert.Equal("Test", Assert.IsType<string>(entry)));
Microsoft.AspNetCore.Http.Abstractions.Tests (72)
EndpointFilterInvocationContextOfTTests.cs (1)
28Assert.IsType<Todo>(todo);
RouteValueDictionaryTests.cs (67)
53var storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 54var otherStorage = Assert.IsType<KeyValuePair<string, object?>[]>(other._arrayStorage); 122Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 128var address = Assert.IsType<Address>(kvp.Value); 144Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 224var value = Assert.IsType<bool>(kvp.Value); 245var value = Assert.IsType<bool>(kvp.Value); 297var value = Assert.IsType<bool>(kvp.Value); 303var value = Assert.IsType<bool>(kvp.Value); 520Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 537Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 554Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 581Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 598Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 612Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 626Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 646Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 663Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 680Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 724Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 738Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 752Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 769Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 783Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 797Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 814Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 828Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 858Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 886Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 907Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 928Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 948Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1008Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1028Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1047Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1066Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1086Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1255Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1272Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1289Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1314Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1334Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1354Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1374Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1395Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1451Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1466Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1481Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1499Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1517Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1535Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1595Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1612Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1629Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1648Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1668Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1688Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1713Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1738Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1763Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1997Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 2015Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 2033Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 2046var storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 2056storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 2070var storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 2077storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage);
UseMiddlewareTest.cs (4)
273Assert.True(Assert.IsType<bool>(context.Items["before"])); 274Assert.True(Assert.IsType<bool>(context.Items["after"])); 277Assert.IsType<Middleware>(middlewareFactory.Created); 278Assert.IsType<Middleware>(middlewareFactory.Released);
Microsoft.AspNetCore.Http.Connections.Tests (3)
HttpConnectionDispatcherTests.cs (2)
1868Assert.IsType<WindowsPrincipal>(currentUser); 3556var feature = Assert.IsType<HttpRequestTimeoutFeature>(context.Features.Get<IHttpContextFeature>()?.HttpContext.Features.Get<IHttpRequestTimeoutFeature>());
WebSocketsTests.cs (1)
137Assert.IsType<WebSocketError>(ex);
Microsoft.AspNetCore.Http.Extensions.Tests (39)
JsonOptionsTests.cs (1)
45Assert.IsType<DefaultJsonTypeInfoResolver>(options.TypeInfoResolver);
ParameterBindingMethodCacheTests.cs (3)
395Assert.IsType<BindAsyncFromImplicitStaticAbstractInterface>(result); 413Assert.IsType<BindAsyncFromExplicitStaticAbstractInterface>(result); 463Assert.IsType<BindAsyncFromStaticAbstractInterfaceAndBindAsync>(result);
ProblemDetailsDefaultWriterTest.cs (1)
534var value = Assert.IsType<JsonElement>(extension.Value);
ProblemDetailsServiceCollectionExtensionsTest.cs (2)
235Assert.IsType<CustomProblemDetailsTypeInfoResolver>(jsonOptions.Value.SerializerOptions.TypeInfoResolverChain[0]); 237Assert.IsType<DefaultJsonTypeInfoResolver>(jsonOptions.Value.SerializerOptions.TypeInfoResolverChain[2]);
PropertyAsParameterInfoTests.cs (2)
159Assert.IsType<int>(parameterInfo.DefaultValue); 161Assert.IsType<int>(parameterInfo.RawDefaultValue);
RequestDelegateFactoryTests.cs (3)
113Assert.IsType<EmptyHttpResult>(response); 2225var invokedInContext = Assert.IsType<bool>(httpContext.Items["invoked"]); 3099Assert.IsType<EmptyHttpResult>(response);
RequestDelegateGenerator\CompileTimeCreationTests.AsParameters.cs (3)
31var result = Assert.IsType<GeneratorRunResult>(generatorRunResult); 82var result = Assert.IsType<GeneratorRunResult>(generatorRunResult); 101var result = Assert.IsType<GeneratorRunResult>(generatorRunResult);
RequestDelegateGenerator\CompileTimeCreationTests.cs (8)
27var results = Assert.IsType<GeneratorRunResult>(generatorRunResult); 199var result = Assert.IsType<GeneratorRunResult>(generatorRunResult); 247var result = Assert.IsType<GeneratorRunResult>(Assert.Single(generatorRunResult.Results)); 301var result = Assert.IsType<GeneratorRunResult>(Assert.Single(generatorRunResult.Results)); 348var result = Assert.IsType<GeneratorRunResult>(Assert.Single(generatorRunResult.Results)); 684var result = Assert.IsType<GeneratorRunResult>(Assert.Single(generatorRunResult.Results)); 754var result = Assert.IsType<GeneratorRunResult>(generatorRunResult); 774var results = Assert.IsType<GeneratorRunResult>(generatorRunResult);
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (2)
91.Select(output => Assert.IsType<RequestDelegateGenerator.StaticRouteHandlerModel.Endpoint>(output.Value)) 184var generatedCode = Assert.IsType<GeneratedCodeAttribute>(generatedCodeAttribute);
RequestDelegateGenerator\RequestDelegateCreationTests.AsParameters.cs (3)
287var input = Assert.IsType<ParameterListWithReadOnlyProperties>(httpContext.Items["input"]); 344var value = Assert.IsType<InheritBindAsync>(httpContext.Items["value"]); 345var anotherValue = Assert.IsType<MyBindAsyncRecord>(httpContext.Items["anotherValue"]);
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (6)
307var traceIdArgument = Assert.IsType<TraceIdentifier>(httpContext.Items["traceId"]); 409var formFilesArgument = Assert.IsType<FormFileCollection>(httpContext.Items["formFiles"]); 775var traceIdArgument = Assert.IsType<TraceIdentifier>(httpContext.Items["traceId"]); 904var content = Assert.IsType<MyTryParseRecord>(httpContext.Items["tryParsable"]); 978Assert.IsType<InvalidDataException>(logMessage.Exception); 1018Assert.IsType<InvalidDataException>(badHttpRequestException.InnerException);
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBody.cs (1)
436var resultStruct = Assert.IsType<BodyStruct>(httpContext.Items["targetStruct"]);
RequestDelegateGenerator\RequestDelegateCreationTests.KeyServices.cs (2)
172Assert.IsType<TestService>(httpContext.Items["arg2"]); 201Assert.IsType<TestService>(httpContext.Items["arg2"]);
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (2)
613Assert.IsType<JsonException>(logMessage.Exception); 655Assert.IsType<JsonException>(badHttpRequestException.InnerException);
Microsoft.AspNetCore.Http.Microbenchmarks (2)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (2)
91.Select(output => Assert.IsType<RequestDelegateGenerator.StaticRouteHandlerModel.Endpoint>(output.Value)) 184var generatedCode = Assert.IsType<GeneratedCodeAttribute>(generatedCodeAttribute);
Microsoft.AspNetCore.Http.Results.Tests (32)
AcceptedAtRouteOfTResultTests.cs (2)
186Assert.IsType<string>(result.Value); 203Assert.IsType<string>(result.Value);
AcceptedOfTResultTests.cs (2)
115Assert.IsType<string>(result.Value); 127Assert.IsType<string>(result.Value);
BadRequestOfTResultTests.cs (2)
158Assert.IsType<string>(result.Value); 170Assert.IsType<string>(result.Value);
ConflictOfTResultTests.cs (2)
136Assert.IsType<string>(result.Value); 148Assert.IsType<string>(result.Value);
CreatedAtRouteOfTResultTests.cs (2)
154Assert.IsType<string>(result.Value); 170Assert.IsType<string>(result.Value);
CreatedOfTResultTests.cs (2)
154Assert.IsType<string>(result.Value); 167Assert.IsType<string>(result.Value);
HttpResultsHelperTests.cs (3)
204var one = Assert.IsType<JsonTodo>(body[0]); 209var two = Assert.IsType<JsonTodo>(body[1]); 214var three = Assert.IsType<TodoJsonChild>(body[2]);
InternalServerErrorOfTResultTests.cs (2)
158Assert.IsType<string>(result.Value); 170Assert.IsType<string>(result.Value);
JsonResultTests.cs (2)
296Assert.IsType<string>(result.Value); 309Assert.IsType<string>(result.Value);
NotFoundOfTResultTests.cs (2)
118Assert.IsType<string>(result.Value); 130Assert.IsType<string>(result.Value);
OkOfTResultTests.cs (2)
135Assert.IsType<string>(result.Value); 147Assert.IsType<string>(result.Value);
ProblemResultTests.cs (2)
226Assert.IsType<ProblemDetails>(result.Value); 238Assert.IsType<ProblemDetails>(result.Value);
ResultsTests.cs (2)
1414Assert.IsType<HttpValidationProblemDetails>(result.ProblemDetails); 1445Assert.IsType<HttpValidationProblemDetails>(result.ProblemDetails);
TestLinkGenerator.cs (1)
31RouteValuesAddress = Assert.IsType<RouteValuesAddress>(address);
UnprocessableEntityOfTResultTests.cs (2)
135Assert.IsType<string>(result.Value); 147Assert.IsType<string>(result.Value);
ValidationProblemResultTests.cs (2)
146Assert.IsType<HttpValidationProblemDetails>(result.Value); 158Assert.IsType<HttpValidationProblemDetails>(result.Value);
Microsoft.AspNetCore.Identity.Test (11)
IdentityBuilderTest.cs (11)
23Assert.IsType<NoopRoleStore>(sp.GetRequiredService<IRoleStore<PocoRole>>()); 24Assert.IsType<RoleManager<PocoRole>>(sp.GetRequiredService<RoleManager<PocoRole>>()); 26Assert.IsType<UserClaimsPrincipalFactory<PocoUser, PocoRole>>(sp.GetRequiredService<IUserClaimsPrincipalFactory<PocoUser>>()); 195Assert.IsType<RoleManager<PocoRole>>(provider.GetRequiredService<RoleManager<PocoRole>>()); 196Assert.IsType<UserManager<PocoUser>>(provider.GetRequiredService<UserManager<PocoUser>>()); 212Assert.IsType<MySignInManager>(provider.GetRequiredService<SignInManager<PocoUser>>()); 213Assert.IsType<SecurityStampValidator<PocoUser>>(provider.GetRequiredService<ISecurityStampValidator>()); 214Assert.IsType<TwoFactorSecurityStampValidator<PocoUser>>(provider.GetRequiredService<ITwoFactorSecurityStampValidator>()); 232Assert.IsType<MySignInManager>(provider.GetRequiredService<SignInManager<PocoUser>>()); 233Assert.IsType<SecurityStampValidator<PocoUser>>(provider.GetRequiredService<ISecurityStampValidator>()); 234Assert.IsType<TwoFactorSecurityStampValidator<PocoUser>>(provider.GetRequiredService<ITwoFactorSecurityStampValidator>());
Microsoft.AspNetCore.InternalTesting.Tests (6)
AspNetTestAssemblyRunnerTest.cs (6)
25var fixture = Assert.IsType<TestAssemblyFixtureWithAll>(fixtureObject); 40var fixture = Assert.IsType<TestAssemblyFixtureWithMessageSink>(fixtureObject); 59var fixture = Assert.IsType<TextAssemblyFixtureWithDispose>(fixtureObject); 80var fixture = Assert.IsType<TextAssemblyFixtureWithDispose>(fixtureObject); 99var fixture = Assert.IsType<TestAssemblyFixtureWithAsyncDispose>(fixtureObject); 121var fixture = Assert.IsType<TestAssemblyFixtureWithAsyncDispose>(fixtureObject);
Microsoft.AspNetCore.JsonPatch.Tests (4)
Internal\ObjectVisitorTest.cs (3)
57Assert.IsType<ListAdapter>(adapter); 152Assert.IsType<PocoAdapter>(adapter); 205Assert.IsType<PocoAdapter>(adapter);
JsonPatchDocumentTest.cs (1)
125Assert.IsType<JsonPatchDocument<SimpleObject>>(deserialized);
Microsoft.AspNetCore.Mvc.Abstractions.Test (6)
ModelBinding\ModelStateDictionaryTest.cs (6)
770Assert.IsType<TooManyModelErrorsException>(error.Exception); 799Assert.IsType<TooManyModelErrorsException>(error.Exception); 840Assert.IsType<TooManyModelErrorsException>(error.Exception); 871Assert.IsType<TooManyModelErrorsException>(error.Exception); 904Assert.IsType<TooManyModelErrorsException>(error.Exception); 930Assert.IsType<TooManyModelErrorsException>(error.Exception);
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (8)
ApiResponseTypeProviderTest.cs (4)
47Assert.IsType<TestOutputFormatter>(format.Formatter); 112Assert.IsType<TestOutputFormatter>(format.Formatter); 125Assert.IsType<TestOutputFormatter>(format.Formatter); 170Assert.IsType<TestOutputFormatter>(format.Formatter);
DefaultApiDescriptionProviderTest.cs (1)
443Assert.IsType<IntRouteConstraint>(Assert.Single(id2.RouteInfo.Constraints));
EndpointMetadataApiDescriptionProviderTest.cs (3)
1421constraint => Assert.IsType<MinLengthRouteConstraint>(constraint), 1422constraint => Assert.IsType<GuidRouteConstraint>(constraint), 1423constraint => Assert.IsType<MaxLengthRouteConstraint>(constraint));
Microsoft.AspNetCore.Mvc.Core.Test (522)
ActionResultOfTTest.cs (3)
71var objectResult = Assert.IsType<ObjectResult>(result); 89var objectResult = Assert.IsType<ObjectResult>(result); 107var objectResult = Assert.IsType<ObjectResult>(result);
ApplicationModels\ApiBehaviorApplicationModelProviderTest.cs (6)
135c => Assert.IsType<ApiVisibilityConvention>(c), 136c => Assert.IsType<ClientErrorResultFilterConvention>(c), 137c => Assert.IsType<InvalidModelStateFilterConvention>(c), 138c => Assert.IsType<ConsumesConstraintForFormFileParameterConvention>(c), 141var convention = Assert.IsType<ApiConventionApplicationModelConvention>(c); 144c => Assert.IsType<InferParameterBindingInfoConvention>(c));
ApplicationModels\ApiConventionApplicationModelConventionTest.cs (1)
158return Assert.IsType<TValue>(action.Properties[typeof(TValue)]);
ApplicationModels\AuthorizationApplicationModelProviderTest.cs (2)
141var authorizationFilter = Assert.IsType<AuthorizeFilter>(Assert.Single(action.Filters)); 168var actionFilter = Assert.IsType<AuthorizeFilter>(Assert.Single(action.Filters));
ApplicationModels\ConsumesConstraintForFormFileParameterConventionTest.cs (2)
26var consumesAttribute = Assert.IsType<ConsumesAttribute>(attribute); 47var consumesAttribute = Assert.IsType<ConsumesAttribute>(attribute);
ApplicationModels\ControllerActionDescriptorBuilderTest.cs (1)
52var property = Assert.IsType<ControllerBoundPropertyDescriptor>(parameter);
ApplicationModels\ControllerActionDescriptorProviderTests.cs (13)
73Assert.Equal(2, Assert.IsType<MyFilterAttribute>(filter2.Filter).Value); 77Assert.Equal(3, Assert.IsType<MyFilterAttribute>(filter3.Filter).Value); 94var constraint = Assert.IsType<HttpMethodActionConstraint>(Assert.Single(descriptor.ActionConstraints)); 111var constraint = Assert.IsType<HttpMethodActionConstraint>(Assert.Single(descriptor.ActionConstraints)); 266metadata => Assert.IsType<AuthorizeAttribute>(metadata), 267metadata => Assert.IsType<AllowAnonymousAttribute>(metadata)); 274metadata => Assert.Equal("ControllerPolicy", Assert.IsType<AuthorizeAttribute>(metadata).Policy), 275metadata => Assert.Equal("ActionPolicy", Assert.IsType<AuthorizeAttribute>(metadata).Policy)); 291metadata => Assert.IsType<RouteAttribute>(metadata), 292metadata => Assert.IsType<HttpGetAttribute>(metadata), 295var httpMethodMetadata = Assert.IsType<HttpMethodMetadata>(metadata); 486var methodConstraint = Assert.IsType<HttpMethodActionConstraint>(Assert.Single(action.ActionConstraints)); 511var methodConstraint = Assert.IsType<HttpMethodActionConstraint>(Assert.Single(action.ActionConstraints));
ApplicationModels\DefaultApplicationModelProviderTest.cs (7)
85Assert.IsType<FromQueryAttribute>(attribute); 102Assert.IsType<FromServicesAttribute>(attribute); 137Assert.IsType<FromQueryAttribute>(attribute); 154Assert.IsType<FromServicesAttribute>(attribute); 190Assert.IsType<FromQueryAttribute>(attribute); 382Assert.IsType<ControllerActionFilter>(filter); 399Assert.IsType<MyFilterAttribute>(filter);
Authorization\AuthorizeFilterTest.cs (11)
49Assert.IsType<ChallengeResult>(authorizationContext.Result); 168Assert.IsType<ChallengeResult>(authorizationContext.Result); 272Assert.IsType<ForbidResult>(authorizationContext.Result); 298Assert.IsType<ForbidResult>(authorizationContext.Result); 306Assert.IsType<ForbidResult>(authorizationContext.Result); 326Assert.IsType<ForbidResult>(authorizationContext.Result); 364Assert.IsType<ForbidResult>(authorizationContext.Result); 399Assert.IsType<ForbidResult>(authorizationContext.Result); 416Assert.IsType<ForbidResult>(authorizationContext.Result); 485var actual = Assert.IsType<AuthorizeFilter>(result); 506var actual = Assert.IsType<AuthorizeFilter>(result);
BadRequestObjectResultTests.cs (1)
31var errors = Assert.IsType<SerializableError>(badRequestObjectResult.Value);
Builder\MvcAreaRouteBuilderExtensionsTest.cs (14)
24var route = Assert.IsType<Route>((Assert.Single(builder.Routes))); 33Assert.IsType<StringRouteConstraint>(kvp.Value); 59var route = Assert.IsType<Route>((Assert.Single(builder.Routes))); 68Assert.IsType<StringRouteConstraint>(kvp.Value); 100var route = Assert.IsType<Route>((Assert.Single(builder.Routes))); 109Assert.IsType<StringRouteConstraint>(kvp.Value); 114Assert.IsType<IntRouteConstraint>(kvp.Value); 147var route = Assert.IsType<Route>((Assert.Single(builder.Routes))); 156Assert.IsType<StringRouteConstraint>(kvp.Value); 161Assert.IsType<IntRouteConstraint>(kvp.Value); 200var route = Assert.IsType<Route>((Assert.Single(builder.Routes))); 209Assert.IsType<IntRouteConstraint>(kvp.Value); 238var route = Assert.IsType<Route>((Assert.Single(builder.Routes))); 247Assert.IsType<StringRouteConstraint>(kvp.Value);
ConflictObjectResultTest.cs (1)
31var errors = Assert.IsType<SerializableError>(conflictObjectResult.Value);
ConsumesAttributeTests.cs (1)
321Assert.IsType<UnsupportedMediaTypeResult>(resourceExecutingContext.Result);
ControllerBaseTest.cs (122)
51Assert.IsType<RedirectResult>(result); 68Assert.IsType<RedirectResult>(result); 85Assert.IsType<RedirectResult>(result); 102Assert.IsType<RedirectResult>(result); 149Assert.IsType<LocalRedirectResult>(result); 166Assert.IsType<LocalRedirectResult>(result); 183Assert.IsType<LocalRedirectResult>(result); 200Assert.IsType<LocalRedirectResult>(result); 291Assert.IsType<RedirectToActionResult>(resultTemporary); 307Assert.IsType<RedirectToActionResult>(resultTemporary); 323Assert.IsType<RedirectToActionResult>(resultPermanent); 339Assert.IsType<RedirectToActionResult>(resultPermanent); 358Assert.IsType<RedirectToActionResult>(resultTemporary); 378Assert.IsType<RedirectToActionResult>(resultTemporary); 398Assert.IsType<RedirectToActionResult>(resultPermanent); 418Assert.IsType<RedirectToActionResult>(resultPermanent); 438Assert.IsType<RedirectToActionResult>(resultTemporary); 462Assert.IsType<RedirectToActionResult>(resultTemporary); 486Assert.IsType<RedirectToActionResult>(resultPermanent); 510Assert.IsType<RedirectToActionResult>(resultPermanent); 531Assert.IsType<RedirectToActionResult>(resultTemporary); 551Assert.IsType<RedirectToActionResult>(resultTemporary); 574Assert.IsType<RedirectToActionResult>(result); 599Assert.IsType<RedirectToActionResult>(result); 621Assert.IsType<RedirectToActionResult>(resultPermanent); 641Assert.IsType<RedirectToActionResult>(resultPermanent); 664Assert.IsType<RedirectToActionResult>(result); 693Assert.IsType<RedirectToActionResult>(result); 715Assert.IsType<RedirectToRouteResult>(resultTemporary); 734Assert.IsType<RedirectToRouteResult>(resultTemporary); 755Assert.IsType<RedirectToRouteResult>(result); 778Assert.IsType<RedirectToRouteResult>(result); 799Assert.IsType<RedirectToRouteResult>(resultPermanent); 818Assert.IsType<RedirectToRouteResult>(resultPermanent); 839Assert.IsType<RedirectToRouteResult>(result); 862Assert.IsType<RedirectToRouteResult>(result); 881Assert.IsType<RedirectToRouteResult>(resultTemporary); 898Assert.IsType<RedirectToRouteResult>(resultTemporary); 915Assert.IsType<RedirectToRouteResult>(resultPermanent); 932Assert.IsType<RedirectToRouteResult>(resultPermanent); 952Assert.IsType<RedirectToRouteResult>(resultTemporary); 973Assert.IsType<RedirectToRouteResult>(resultTemporary); 994Assert.IsType<RedirectToRouteResult>(resultPermanent); 1012Assert.IsType<RedirectToPageResult>(result); 1028Assert.IsType<RedirectToPageResult>(result); 1045Assert.IsType<RedirectToPageResult>(result); 1069Assert.IsType<RedirectToPageResult>(result); 1089Assert.IsType<RedirectToPageResult>(result); 1113Assert.IsType<RedirectToPageResult>(result); 1130Assert.IsType<RedirectToPageResult>(result); 1148Assert.IsType<RedirectToPageResult>(result); 1173Assert.IsType<RedirectToPageResult>(result); 1194Assert.IsType<RedirectToPageResult>(result); 1219Assert.IsType<RedirectToPageResult>(result); 1239Assert.IsType<RedirectToPageResult>(resultPermanent); 1260Assert.IsType<RedirectToPageResult>(resultPermanent); 1281Assert.IsType<RedirectToRouteResult>(resultPermanent); 1299Assert.IsType<CreatedResult>(result); 1314Assert.IsType<CreatedResult>(result); 1330Assert.IsType<CreatedResult>(result); 1345Assert.IsType<CreatedResult>(result); 1361Assert.IsType<CreatedResult>(result); 1376Assert.IsType<CreatedAtActionResult>(result); 1395Assert.IsType<CreatedAtActionResult>(result); 1419Assert.IsType<CreatedAtActionResult>(result); 1437Assert.IsType<CreatedAtRouteResult>(result); 1456Assert.IsType<CreatedAtRouteResult>(result); 1477Assert.IsType<CreatedAtRouteResult>(result); 1493Assert.IsType<AcceptedResult>(result); 1508Assert.IsType<AcceptedResult>(result); 1524Assert.IsType<AcceptedResult>(result); 1540Assert.IsType<AcceptedResult>(result); 1556Assert.IsType<AcceptedResult>(result); 1571Assert.IsType<AcceptedAtActionResult>(result); 1589Assert.IsType<AcceptedAtActionResult>(result); 1613Assert.IsType<AcceptedAtActionResult>(result); 1635Assert.IsType<AcceptedAtRouteResult>(result); 1656Assert.IsType<AcceptedAtRouteResult>(result); 1972Assert.IsType<UnauthorizedResult>(result); 1986Assert.IsType<NotFoundResult>(result); 2000Assert.IsType<NotFoundObjectResult>(result); 2015Assert.IsType<OkResult>(result); 2029Assert.IsType<BadRequestResult>(result); 2044Assert.IsType<BadRequestObjectResult>(result); 2059Assert.IsType<BadRequestObjectResult>(result); 2061var errors = Assert.IsType<SerializableError>(result.Value); 2075Assert.IsType<UnprocessableEntityResult>(result); 2090Assert.IsType<UnprocessableEntityObjectResult>(result); 2105Assert.IsType<UnprocessableEntityObjectResult>(result); 2107var errors = Assert.IsType<SerializableError>(result.Value); 2122Assert.IsType<ConflictResult>(result); 2137Assert.IsType<ConflictObjectResult>(result); 2152Assert.IsType<ConflictObjectResult>(result); 2154var errors = Assert.IsType<SerializableError>(result.Value); 2189Assert.IsType<ContentResult>(actualContentResult); 2204Assert.IsType<ContentResult>(actualContentResult); 2220Assert.IsType<ContentResult>(actualContentResult); 2355var badRequestResult = Assert.IsType<BadRequestObjectResult>(actionResult); 2356var problemDetails = Assert.IsType<ValidationProblemDetails>(badRequestResult.Value); 2383var badRequestResult = Assert.IsType<BadRequestObjectResult>(actionResult); 2384var problemDetails = Assert.IsType<ValidationProblemDetails>(badRequestResult.Value); 2405var objectResult = Assert.IsType<ObjectResult>(actionResult); 2406var problemDetails = Assert.IsType<ValidationProblemDetails>(objectResult.Value); 2426var badRequestResult = Assert.IsType<BadRequestObjectResult>(actionResult); 2427var problemDetails = Assert.IsType<ValidationProblemDetails>(badRequestResult.Value); 2447var objectResult = Assert.IsType<BadRequestObjectResult>(actionResult); 2448var problemDetails = Assert.IsType<ValidationProblemDetails>(objectResult.Value); 2474var badRequestResult = Assert.IsType<ObjectResult>(actionResult); 2475var problemDetails = Assert.IsType<ProblemDetails>(badRequestResult.Value); 2500var badRequestResult = Assert.IsType<ObjectResult>(actionResult); 2501var problemDetails = Assert.IsType<ProblemDetails>(badRequestResult.Value); 2524var badRequestResult = Assert.IsType<ObjectResult>(actionResult); 2525var problemDetails = Assert.IsType<ProblemDetails>(badRequestResult.Value); 2545var badRequestResult = Assert.IsType<ObjectResult>(actionResult); 2546var problemDetails = Assert.IsType<ProblemDetails>(badRequestResult.Value); 2617Assert.Same(valueProvider, Assert.IsType<CompositeValueProvider>(context.ValueProvider)[0]); 2645Assert.Same(valueProvider, Assert.IsType<CompositeValueProvider>(context.ValueProvider)[0]); 2728Assert.Same(valueProvider, Assert.IsType<CompositeValueProvider>(context.ValueProvider)[0]); 2795Assert.IsType<CompositeValueProvider>(context.ValueProvider)[0]); 2859Assert.IsType<CompositeValueProvider>(context.ValueProvider)[0]); 2941Assert.Same(valueProvider, Assert.IsType<CompositeValueProvider>(context.ValueProvider)[0]); 2969Assert.Same(valueProvider, Assert.IsType<CompositeValueProvider>(context.ValueProvider)[0]);
Controllers\ControllerActivatorProviderTest.cs (1)
65var actual = Assert.IsType<TestController>(result);
Controllers\ControllerBinderDelegateProviderTest.cs (2)
1192var accountId = Assert.IsType<int>(value); 1195var transferInfo = Assert.IsType<TransferInfo>(value);
Controllers\ControllerFactoryProviderTest.cs (1)
138var actual = Assert.IsType<TestController>(controller);
Controllers\DefaultControllerFactoryTest.cs (5)
45var controller = Assert.IsType<MyController>(result); 73var controller = Assert.IsType<ControllerWithAttributes>(result); 100var controller = Assert.IsType<ControllerWithAttributes>(result); 127var controller = Assert.IsType<ControllerWithoutAttributes>(result); 154var controller = Assert.IsType<ControllerWithNonVisibleProperties>(result);
DependencyInjection\ApiBehaviorOptionsSetupTest.cs (10)
41var badRequest = Assert.IsType<BadRequestObjectResult>(result); 44var problemDetails = Assert.IsType<ValidationProblemDetails>(badRequest.Value); 63var badRequest = Assert.IsType<BadRequestObjectResult>(result); 66var problemDetails = Assert.IsType<ValidationProblemDetails>(badRequest.Value); 86var objectResult = Assert.IsType<ObjectResult>(result); 90var problemDetails = Assert.IsType<ValidationProblemDetails>(objectResult.Value); 108var badRequest = Assert.IsType<BadRequestObjectResult>(result); 109var problemDetails = Assert.IsType<ValidationProblemDetails>(badRequest.Value); 125var badRequest = Assert.IsType<BadRequestObjectResult>(result); 126var problemDetails = Assert.IsType<ValidationProblemDetails>(badRequest.Value);
DependencyInjection\ApplicationModelConventionExtensionsTest.cs (2)
185Assert.IsType<BarApplicationModelConvention>(convention); 378Assert.IsType<BarApplicationModelConvention>(convention);
Filters\FilterCollectionTest.cs (4)
20var typeFilter = Assert.IsType<TypeFilterAttribute>(added); 35var typeFilter = Assert.IsType<TypeFilterAttribute>(added); 91var serviceFilter = Assert.IsType<ServiceFilterAttribute>(added); 106var serviceFilter = Assert.IsType<ServiceFilterAttribute>(added);
Filters\FilterFactoryTest.cs (5)
162var cachedFactoryCreatedFilter = Assert.IsType<TestFilter>(filters[0]); // Created by factory 237var request1Filter1 = Assert.IsType<TestFilter>(filters[0]); // Created by factory 239var request1Filter3 = Assert.IsType<TestFilter>(filters[2]); // Created by custom filter provider 248var request2Filter1 = Assert.IsType<TestFilter>(filters[0]); 251var request2Filter3 = Assert.IsType<TestFilter>(filters[2]);
Filters\MiddlewareFilterAttributeTest.cs (1)
35var middlewareFilter = Assert.IsType<MiddlewareFilter>(filter);
Filters\RequestFormLimitsFilterTest.cs (1)
32Assert.IsType<FormFeature>(formFeature);
Formatters\FormatFilterTest.cs (8)
52var objectResult = Assert.IsType<ObjectResult>(resultExecutingContext.Result); 96var objectResult = Assert.IsType<ObjectResult>(resultExecutingContext.Result); 128var objectResult = Assert.IsType<ObjectResult>(resultExecutingContext.Result); 151Assert.IsType<NotFoundResult>(actionResult); 232Assert.IsType<NotFoundResult>(actionResult); 257var result = Assert.IsType<NotFoundResult>(resourceExecutingContext.Result); 351var result = Assert.IsType<ObjectResult>(resultExecutingContext.Result); 386var result = Assert.IsType<ObjectResult>(resultExecutingContext.Result);
Formatters\FormatterCollectionTest.cs (2)
26Assert.IsType<AnotherTestOutputFormatter>(formatter); 45Assert.IsType<AnotherTestOutputFormatter>(formatter);
Formatters\JsonInputFormatterTestBase.cs (10)
80var intValue = Assert.IsType<int>(result.Model); 101var stringValue = Assert.IsType<string>(result.Model); 122var stringValue = Assert.IsType<string>(result.Model); 228var dateValue = Assert.IsType<DateTime>(result.Model); 249var userModel = Assert.IsType<ComplexModel>(result.Model); 271var integers = Assert.IsType<int[]>(result.Model); 436Assert.IsType<TooManyModelErrorsException>(error.Exception); 555var userModel = Assert.IsType<ComplexModel>(result.Model); 577var userModel = Assert.IsType<ComplexModel>(result.Model); 603var userModel = Assert.IsType<ComplexModel>(result.Model);
Formatters\SystemTextJsonOutputFormatterTest.cs (1)
289Assert.IsType<DefaultJsonTypeInfoResolver>(stjOutputFormatter.SerializerOptions.TypeInfoResolver);
Formatters\TextInputFormatterTest.cs (1)
38Assert.IsType<UnsupportedContentTypeException>(error.Exception);
Infrastructure\ActionMethodExecutorTest.cs (21)
35Assert.IsType<EmptyResult>(await valueTask); 61Assert.IsType<ContentResult>(await valueTask); 86Assert.IsType<ContentResult>(await valueTask); 110var result = Assert.IsType<ObjectResult>(await valueTask); 114Assert.IsType<TestModel>(result.Value); 139var result = Assert.IsType<ObjectResult>(await valueTask); 143Assert.IsType<TestModel>(result.Value); 168var result = Assert.IsType<ObjectResult>(await valueTask); 172Assert.IsType<TestModel>(result.Value); 198Assert.IsType<ContentResult>(await valueTask); 224Assert.IsType<EmptyResult>(await valueTask); 250Assert.IsType<EmptyResult>(await valueTask); 275Assert.IsType<StatusCodeResult>(await valueTask); 301Assert.IsType<ViewResult>(await valueTask); 325var result = Assert.IsType<ObjectResult>(await valueTask); 329Assert.IsType<TestModel>(result.Value); 354var result = Assert.IsType<ObjectResult>(await valueTask); 358Assert.IsType<TestModel>(result.Value); 384Assert.IsType<OkResult>(await valueTask); 408var result = Assert.IsType<ObjectResult>(await valueTask); 412Assert.IsType<TestModel>(result.Value);
Infrastructure\ActionResultTypeMapperTest.cs (3)
39var httpResult = Assert.IsType<HttpActionResult>(result); 55Assert.IsType<EmptyResult>(result); 70var objectResult = Assert.IsType<ObjectResult>(result);
Infrastructure\ControllerActionInvokerProviderTest.cs (1)
38var invoker = Assert.IsType<ControllerActionInvoker>(context.Result);
Infrastructure\ControllerActionInvokerTest.cs (20)
221var controllerContext = Assert.IsType<ControllerActionInvoker>(invoker).ControllerContext; 253var controllerContext = Assert.IsType<ControllerActionInvoker>(invoker).ControllerContext; 874Assert.IsType<EmptyResult>(result); 899var contentResult = Assert.IsType<ObjectResult>(result); 994var contentResult = Assert.IsType<ObjectResult>(result); 1044var contentResult = Assert.IsType<ObjectResult>(result); 1071var contentResult = Assert.IsType<ObjectResult>(result); 1097var contentResult = Assert.IsType<ObjectResult>(result); 1124var contentResult = Assert.IsType<ObjectResult>(result); 1153Assert.IsType<EmptyResult>(result); 1181Assert.IsType<ObjectResult>(result); 1182Assert.IsType<int>(((ObjectResult)result).Value); 1208Assert.IsType<EmptyResult>(result); 1233var testResult = Assert.IsType<TestActionResult>(result); 1259var testResult = Assert.IsType<TestActionResult>(result); 1290var contentResult = Assert.IsType<ObjectResult>(result); 1320var contentResult = Assert.IsType<TestActionResult>(result); 1469var testActionResult = Assert.IsType<TestActionResult>(result); 1494var testActionResult = Assert.IsType<TestActionResult>(result); 1518Assert.IsType<TestActionResult>(result);
Infrastructure\JsonResultExecutorTestBase.cs (2)
223var expectedException = Assert.IsType<NotImplementedException>(serializerException.InnerException); 499return Assert.IsType<MemoryStream>(context.Response.Body).ToArray();
Infrastructure\ProblemDetalsClientErrorFactoryTest.cs (8)
30var objectResult = Assert.IsType<ObjectResult>(result); 32var problemDetails = Assert.IsType<ProblemDetails>(objectResult.Value); 57var objectResult = Assert.IsType<ObjectResult>(result); 59var problemDetails = Assert.IsType<ProblemDetails>(objectResult.Value); 87var objectResult = Assert.IsType<ObjectResult>(result); 89var problemDetails = Assert.IsType<ProblemDetails>(objectResult.Value); 113var objectResult = Assert.IsType<ObjectResult>(result); 115var problemDetails = Assert.IsType<ProblemDetails>(objectResult.Value);
JsonOptionsTest.cs (1)
44Assert.IsType<DefaultJsonTypeInfoResolver>(options.TypeInfoResolver);
ModelBinding\Binders\ArrayModelBinderProviderTest.cs (2)
68var binder = Assert.IsType<ArrayModelBinder<int>>(result); 98Assert.IsType<ArrayModelBinder<int>>(result);
ModelBinding\Binders\ArrayModelBinderTest.cs (3)
38var array = Assert.IsType<int[]>(bindingContext.Result.Model); 81Assert.Empty(Assert.IsType<string[]>(bindingContext.Result.Model)); 115Assert.Empty(Assert.IsType<string[]>(bindingContext.Result.Model));
ModelBinding\Binders\BinderTypeModelBinderProviderTest.cs (1)
36Assert.IsType<BinderTypeModelBinder>(result);
ModelBinding\Binders\BodyModelBinderProviderTest.cs (1)
68Assert.IsType<BodyModelBinder>(result);
ModelBinding\Binders\BodyModelBinderTests.cs (1)
504Assert.IsType<IOException>(entry.Value.Errors[0].Exception);
ModelBinding\Binders\ByteArrayModelBinderProviderTest.cs (1)
37Assert.IsType<ByteArrayModelBinder>(result);
ModelBinding\Binders\ByteArrayModelBinderTests.cs (1)
53var bytes = Assert.IsType<byte[]>(bindingContext.Result.Model);
ModelBinding\Binders\CancellationTokenModelBinderProviderTest.cs (1)
37Assert.IsType<CancellationTokenModelBinder>(result);
ModelBinding\Binders\CollectionModelBinderProviderTest.cs (2)
63Assert.IsType<CollectionModelBinder<int>>(result); 83var binder = Assert.IsType<CollectionModelBinder<int>>(result);
ModelBinding\Binders\CollectionModelBinderTest.cs (3)
190var model = Assert.IsType<List<int>>(bindingContext.Result.Model); 267Assert.Empty(Assert.IsType<List<string>>(bindingContext.Result.Model)); 301Assert.Empty(Assert.IsType<List<string>>(bindingContext.Result.Model));
ModelBinding\Binders\ComplexObjectModelBinderProviderTest.cs (2)
52Assert.IsType<ComplexObjectModelBinder>(result); 79Assert.IsType<ComplexObjectModelBinder>(result);
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (7)
314Assert.IsType<Person>(bindingContext.Result.Model); 358Assert.IsType<PersonWithNoProperties>(bindingContext.Result.Model); 402Assert.IsType<PersonWithAllPropertiesExcluded>(bindingContext.Result.Model); 729Assert.IsType<NullReferenceException>(modelError.Exception); 878var person = Assert.IsType<Person>(bindingContext.Model); 902var person = Assert.IsType<Person>(bindingContext.Model); 926var person = Assert.IsType<Person>(bindingContext.Model);
ModelBinding\Binders\ComplexTypeModelBinderProviderTest.cs (2)
52Assert.IsType<ComplexTypeModelBinder>(result); 79Assert.IsType<ComplexTypeModelBinder>(result);
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (10)
329var returnedPerson = Assert.IsType<Person>(bindingContext.Result.Model); 374Assert.IsType<Person>(bindingContext.Result.Model); 418Assert.IsType<PersonWithNoProperties>(bindingContext.Result.Model); 462Assert.IsType<PersonWithAllPropertiesExcluded>(bindingContext.Result.Model); 524Assert.IsType<Person>(model); 634Assert.IsType<Person>(bindingContext.Model); 873Assert.IsType<NullReferenceException>(modelError.Exception); 1040var person = Assert.IsType<Person>(bindingContext.Model); 1064var person = Assert.IsType<Person>(bindingContext.Model); 1088var person = Assert.IsType<Person>(bindingContext.Model);
ModelBinding\Binders\DateTimeModelBinderProviderTest.cs (2)
37Assert.IsType<DateTimeModelBinder>(result); 50Assert.IsType<DateTimeModelBinder>(result);
ModelBinding\Binders\DateTimeModelBinderTest.cs (2)
173var model = Assert.IsType<DateTime>(bindingContext.Result.Model); 196var model = Assert.IsType<DateTime>(bindingContext.Result.Model);
ModelBinding\Binders\DictionaryModelBinderProviderTest.cs (1)
57var binder = Assert.IsType<DictionaryModelBinder<string, int>>(result);
ModelBinding\Binders\DictionaryModelBinderTest.cs (3)
367var strategy = Assert.IsType<ShortFormDictionaryValidationStrategy<int, ModelWithProperties>>(entry.Strategy); 452Assert.Empty(Assert.IsType<Dictionary<string, string>>(bindingContext.Result.Model)); 487Assert.Empty(Assert.IsType<Dictionary<string, string>>(bindingContext.Result.Model));
ModelBinding\Binders\EnumTypeModelBinderProviderTest.cs (2)
23Assert.IsType<EnumTypeModelBinder>(result); 39Assert.IsType<EnumTypeModelBinder>(result);
ModelBinding\Binders\EnumTypeModelBinderTest.cs (5)
63var boundModel = Assert.IsType<IntEnum>(bindingContext.Result.Model); 87var boundModel = Assert.IsType<FlagsEnum>(bindingContext.Result.Model); 111var boundModel = Assert.IsType<FlagsEnum>(bindingContext.Result.Model); 173var boundModel = Assert.IsType<FlagsEnum>(bindingContext.Result.Model); 198var boundModel = Assert.IsType<FlagsEnum>(bindingContext.Result.Model);
ModelBinding\Binders\FloatingPointTypeModelBinderProviderTest.cs (3)
61Assert.IsType<DecimalModelBinder>(result); 77Assert.IsType<DoubleModelBinder>(result); 93Assert.IsType<FloatModelBinder>(result);
ModelBinding\Binders\FormCollectionModelBinderProviderTest.cs (1)
55Assert.IsType<FormCollectionModelBinder>(result);
ModelBinding\Binders\FormFileModelBinderProviderTest.cs (1)
45Assert.IsType<FormFileModelBinder>(result);
ModelBinding\Binders\HeaderModelBinderProviderTest.cs (4)
65var headerModelBinder = Assert.IsType<HeaderModelBinder>(result); 88var headerModelBinder = Assert.IsType<HeaderModelBinder>(result); 114var headerModelBinder = Assert.IsType<HeaderModelBinder>(result); 158var headerModelBinder = Assert.IsType<HeaderModelBinder>(result);
ModelBinding\Binders\KeyValuePairModelBinderProviderTest.cs (1)
53Assert.IsType<KeyValuePairModelBinder<string, int>>(result);
ModelBinding\Binders\KeyValuePairModelBinderTest.cs (1)
166var model = Assert.IsType<KeyValuePair<string, string>>(bindingContext.Result.Model);
ModelBinding\Binders\ServicesModelBinderProviderTest.cs (2)
53Assert.IsType<ServicesModelBinder>(result); 69var binder = Assert.IsType<ServicesModelBinder>(result);
ModelBinding\Binders\SimpleTypeModelBinderProviderTest.cs (1)
43Assert.IsType<SimpleTypeModelBinder>(result);
ModelBinding\Binders\SimpleTypeModelBinderTest.cs (4)
397var boundModel = Assert.IsType<IntEnum>(bindingContext.Result.Model); 418var boundModel = Assert.IsType<IntEnum>(bindingContext.Result.Model); 459var boundModel = Assert.IsType<IntEnum>(bindingContext.Result.Model); 482var boundModel = Assert.IsType<FlagsEnum>(bindingContext.Result.Model);
ModelBinding\Binders\TryParseTypeModelBinderProviderTest.cs (1)
36Assert.IsType<TryParseModelBinder>(result);
ModelBinding\Binders\TryParseTypeModelBinderTest.cs (5)
323var boundModel = Assert.IsType<IntEnum>(bindingContext.Result.Model); 344var boundModel = Assert.IsType<IntEnum>(bindingContext.Result.Model); 381var boundModel = Assert.IsType<IntEnum>(bindingContext.Result.Model); 431var boundModel = Assert.IsType<TestTryParseClass>(bindingContext.Result.Model); 480var boundModel = Assert.IsType<FlagsEnum>(bindingContext.Result.Model);
ModelBinding\CompositeValueProviderTest.cs (4)
31var newProvider = Assert.IsType<CompositeValueProvider>(result); 130var valueProvider = Assert.IsType<CompositeValueProvider>(result); 172var newProvider = Assert.IsType<CompositeValueProvider>(result); 224var newProvider = Assert.IsType<CompositeValueProvider>(result);
ModelBinding\DefaultModelBindingContextTest.cs (3)
81Assert.IsType<CompositeValueProvider>(context.ValueProvider), 109Assert.IsType<CompositeValueProvider>(context.ValueProvider), 138Assert.IsType<CompositeValueProvider>(context.ValueProvider),
ModelBinding\FormFileValueProviderFactoryTest.cs (1)
57v => Assert.IsType<FormFileValueProvider>(v));
ModelBinding\FormValueProviderFactoryTest.cs (1)
44var valueProvider = Assert.IsType<FormValueProvider>(Assert.Single(context.ValueProviders));
ModelBinding\JQueryFormValueProviderFactoryTest.cs (2)
68var valueProvider = Assert.IsType<JQueryFormValueProvider>(Assert.Single(context.ValueProviders)); 129var jqueryFormValueProvider = Assert.IsType<JQueryFormValueProvider>(valueProvider);
ModelBinding\JQueryQueryStringValueProviderFactoryTest.cs (1)
109var jqueryQueryStringValueProvider = Assert.IsType<JQueryQueryStringValueProvider>(valueProvider);
ModelBinding\Metadata\DefaultModelMetadataProviderTest.cs (32)
21var defaultMetadata = Assert.IsType<DefaultModelMetadata>(metadata); 23var attribute = Assert.IsType<ModelAttribute>(Assert.Single(defaultMetadata.Attributes.Attributes)); 34var metadata1 = Assert.IsType<DefaultModelMetadata>(provider.GetMetadataForType(typeof(ModelType))); 35var metadata2 = Assert.IsType<DefaultModelMetadata>(provider.GetMetadataForType(typeof(ModelType))); 144var metadata1 = Assert.IsType<DefaultModelMetadata>(provider.GetMetadataForType(typeof(ModelType))); 145var metadata2 = Assert.IsType<DefaultModelMetadata>(provider.GetMetadataForType(typeof(ModelType))); 161var defaultMetadata = Assert.IsType<DefaultModelMetadata>(metadata); 164Assert.Equal("OnProperty", Assert.IsType<ModelAttribute>(attributes[0]).Value); 165Assert.Equal("OnPropertyType", Assert.IsType<ModelAttribute>(attributes[1]).Value); 212var defaultMetadata = Assert.IsType<DefaultModelMetadata>(metadata); 215Assert.IsType<SerializableAttribute>(Assert.Single(defaultMetadata.Attributes.Attributes)); 231var defaultMetadata = Assert.IsType<DefaultModelMetadata>(metadata); 237var modelAttribute = Assert.IsType<ModelAttribute>(attribute); 242var modelAttribute = Assert.IsType<ModelAttribute>(attribute); 280var defaultModelMetadata = Assert.IsType<DefaultModelMetadata>(metadata); 284a => Assert.Equal("OnParameter", Assert.IsType<ModelAttribute>(a).Value), 285a => Assert.Equal("OnDerivedType", Assert.IsType<ModelAttribute>(a).Value), 286a => Assert.Equal("OnType", Assert.IsType<ModelAttribute>(a).Value)); 294var defaultPropertyMetadata = Assert.IsType<DefaultModelMetadata>(p); 297a => Assert.Equal("OnDerivedProperty", Assert.IsType<ModelAttribute>(a).Value)); 303var defaultPropertyMetadata = Assert.IsType<DefaultModelMetadata>(p); 306a => Assert.Equal("OnProperty", Assert.IsType<ModelAttribute>(a).Value), 307a => Assert.Equal("OnPropertyType", Assert.IsType<ModelAttribute>(a).Value)); 364var defaultModelMetadata = Assert.IsType<DefaultModelMetadata>(metadata); 368a => Assert.Equal("OnProperty", Assert.IsType<ModelAttribute>(a).Value), 369a => Assert.Equal("OnDerivedType", Assert.IsType<ModelAttribute>(a).Value), 370a => Assert.Equal("OnType", Assert.IsType<ModelAttribute>(a).Value)); 378var defaultPropertyMetadata = Assert.IsType<DefaultModelMetadata>(p); 381a => Assert.Equal("OnDerivedProperty", Assert.IsType<ModelAttribute>(a).Value)); 387var defaultPropertyMetadata = Assert.IsType<DefaultModelMetadata>(p); 390a => Assert.Equal("OnProperty", Assert.IsType<ModelAttribute>(a).Value), 391a => Assert.Equal("OnPropertyType", Assert.IsType<ModelAttribute>(a).Value));
ModelBinding\Metadata\MetadataDetailsProviderExtensionsTest.cs (2)
24Assert.IsType<BarMetadataDetailsProvider>(provider); 43Assert.IsType<BarMetadataDetailsProvider>(provider);
ModelBinding\Metadata\ModelAttributesTest.cs (28)
166Assert.IsType<RequiredAttribute>(attributes.Attributes[0]); 167Assert.IsType<RangeAttribute>(attributes.Attributes[1]); 168Assert.IsType<ClassValidator>(attributes.Attributes[2]); 171Assert.IsType<RequiredAttribute>(attributes.PropertyAttributes[0]); 172Assert.IsType<RangeAttribute>(attributes.PropertyAttributes[1]); 175Assert.IsType<ClassValidator>(attribute); 189Assert.IsType<SerializableAttribute>(Assert.Single(attributes.Attributes)); 208attribute => Assert.IsType<RequiredAttribute>(attribute), 209attribute => Assert.IsType<RangeAttribute>(attribute)); 212attribute => Assert.IsType<RequiredAttribute>(attribute), 213attribute => Assert.IsType<RangeAttribute>(attribute)); 218attribute => Assert.IsType<SerializableAttribute>(attribute)); 234attribute => Assert.IsType<BindRequiredAttribute>(attribute), 235attribute => Assert.IsType<ClassValidator>(attribute)); 236Assert.IsType<BindRequiredAttribute>(Assert.Single(attributes.ParameterAttributes)); 238Assert.IsType<ClassValidator>(Assert.Single(attributes.TypeAttributes)); 255attribute => Assert.IsType<BindRequiredAttribute>(attribute), 256attribute => Assert.IsType<ModelBinderAttribute>(attribute), 257attribute => Assert.IsType<ClassValidator>(attribute)); 258Assert.IsType<BindRequiredAttribute>(Assert.Single(attributes.ParameterAttributes)); 262attribute => Assert.IsType<ModelBinderAttribute>(attribute), 263attribute => Assert.IsType<ClassValidator>(attribute)); 279attribute => Assert.IsType<BindRequiredAttribute>(attribute), 280attribute => Assert.IsType<ModelBinderAttribute>(attribute), 281attribute => Assert.IsType<ClassValidator>(attribute)); 282Assert.IsType<BindRequiredAttribute>(Assert.Single(attributes.PropertyAttributes)); 286attribute => Assert.IsType<ModelBinderAttribute>(attribute), 287attribute => Assert.IsType<ClassValidator>(attribute));
ModelBinding\ModelBinderFactoryTest.cs (5)
135Assert.IsType<NoOpBinder>(result); 194Assert.IsType<PlaceholderBinder>(binder); 465Assert.IsType<NoOpBinder>(binder); 632var placeholder = Assert.IsType<PlaceholderBinder>(innerInner); 633Assert.IsType<NoOpBinder>(placeholder.Inner);
ModelBinding\ModelBinderProviderExtensionsTest.cs (2)
24Assert.IsType<BarModelBinderProvider>(provider); 43Assert.IsType<BarModelBinderProvider>(provider);
ModelBinding\QueryStringValueProviderFactoryTest.cs (1)
45var valueProvider = Assert.IsType<QueryStringValueProvider>(Assert.Single(factoryContext.ValueProviders));
ModelBinding\UnsupportedContentTypeFilterTest.cs (1)
43var status = Assert.IsType<UnsupportedMediaTypeResult>(context.Result);
ModelBinding\Validation\DefaultModelValidatorProviderTest.cs (7)
29Assert.IsType<ValidatableObjectAdapter>(validatorItem.Validator); 48var validator = Assert.IsType<CustomModelValidatorAttribute>(Assert.Single(validatorItems).Validator); 70var validator = Assert.IsType<CustomModelValidatorAttribute>(Assert.Single(validatorItems).Validator); 93Assert.Single(validatorItems, v => Assert.IsType<CustomModelValidatorAttribute>(v.Validator).Tag == "Class"); 94Assert.Single(validatorItems, v => Assert.IsType<CustomModelValidatorAttribute>(v.Validator).Tag == "Property"); 115var adapter = Assert.IsType<DataAnnotationsModelValidator>(Assert.Single(validatorItems).Validator); 116Assert.IsType<RangeAttribute>(adapter.Attribute);
ModelBinding\Validation\DefaultObjectValidatorTests.cs (2)
745Assert.IsType<TooManyModelErrorsException>(error.Exception); 1250Assert.IsType<TooManyModelErrorsException>(error.Exception);
ModelBinding\Validation\ModelValidatorProviderExtensionsTest.cs (2)
24Assert.IsType<BarModelValidatorProvider>(provider); 43Assert.IsType<BarModelValidatorProvider>(provider);
ModelBinding\Validation\ValidatorCacheTest.cs (4)
23var attribute1 = Assert.IsType<DataAnnotationsModelValidator>(validators1[0]).Attribute; 24var attribute2 = Assert.IsType<DataAnnotationsModelValidator>(validators1[1]).Attribute; 50var validator1 = Assert.IsType<DataAnnotationsModelValidator>(validators1[0]); 51var validator2 = Assert.IsType<DataAnnotationsModelValidator>(validators1[1]);
ModelBinding\ValueProviderFactoryExtensionsTest.cs (2)
24Assert.IsType<BarValueProviderFactory>(factory); 43Assert.IsType<BarValueProviderFactory>(factory);
ProducesAttributeTests.cs (2)
58var objectResult = Assert.IsType<ObjectResult>(resultExecutingContext.Result); 83var objectResult = Assert.IsType<ObjectResult>(resultExecutingContext.Result);
RedirectToPageResultTest.cs (4)
112Assert.Collection(Assert.IsType<RouteValueDictionary>(context.Values), 166Assert.Collection(Assert.IsType<RouteValueDictionary>(context.Values), 228Assert.Collection(Assert.IsType<RouteValueDictionary>(context.Values), 279Assert.Collection(Assert.IsType<RouteValueDictionary>(context.Values),
RequireHttpsAttributeTests.cs (5)
98var result = Assert.IsType<RedirectResult>(authContext.Result); 124var result = Assert.IsType<StatusCodeResult>(authContext.Result); 143var result = Assert.IsType<StatusCodeResult>(authContext.Result); 187var result = Assert.IsType<RedirectResult>(authContext.Result); 215var result = Assert.IsType<RedirectResult>(authContext.Result);
ResponseCacheAttributeTest.cs (2)
37var responseCacheFilter = Assert.IsType<ResponseCacheFilter>(createdFilter); 166var responseCacheFilter = Assert.IsType<ResponseCacheFilter>(createdFilter);
Routing\ActionEndpointDataSourceBaseTest.cs (4)
35var endpoint = Assert.IsType<RouteEndpoint>(Assert.Single(endpoints)); 61(e) => Assert.Equal("/test", Assert.IsType<RouteEndpoint>(e).RoutePattern.RawText)); 98var routePattern = Assert.IsType<RouteEndpoint>(e).RoutePattern; 120var routePattern = Assert.IsType<RouteEndpoint>(e).RoutePattern;
Routing\ActionEndpointFactoryTest.cs (6)
284var endpoint = Assert.IsType<RouteEndpoint>(Assert.Single(endpoints)); 346var matcherEndpoint = Assert.IsType<RouteEndpoint>(ep); 354var matcherEndpoint = Assert.IsType<RouteEndpoint>(ep); 373Assert.IsType<Endpoint>(Assert.Single(endpoints)); 389return Assert.IsType<RouteEndpoint>(Assert.Single(endpoints)); 412var endpoint = Assert.IsType<RouteEndpoint>(Assert.Single(endpoints));
Routing\AttributeRouteTest.cs (1)
537Assert.IsType<RouteCreationException>(exception.InnerException);
Routing\EndpointRoutingUrlHelperTest.cs (1)
145Assert.IsType<EndpointRoutingUrlHelper>(urlHelper);
Routing\KnownRouteValueConstraintTests.cs (1)
50var knownRouteValueConstraint = Assert.IsType<KnownRouteValueConstraint>(constraint);
Routing\UrlHelperExtensionsTest.cs (17)
41Assert.Collection(Assert.IsType<RouteValueDictionary>(actual.Values), 89Assert.Collection(Assert.IsType<RouteValueDictionary>(actual.Values), 121Assert.Collection(Assert.IsType<RouteValueDictionary>(actual.Values), 153Assert.Collection(Assert.IsType<RouteValueDictionary>(actual.Values), 185Assert.Collection(Assert.IsType<RouteValueDictionary>(actual.Values), 235Assert.Collection(Assert.IsType<RouteValueDictionary>(actual.Values), 284Assert.Collection(Assert.IsType<RouteValueDictionary>(actual.Values), 327Assert.Collection(Assert.IsType<RouteValueDictionary>(actual.Values), 375Assert.Collection(Assert.IsType<RouteValueDictionary>(actual.Values), 418Assert.Collection(Assert.IsType<RouteValueDictionary>(actual.Values), 453Assert.Collection(Assert.IsType<RouteValueDictionary>(actual.Values), 480Assert.Collection(Assert.IsType<RouteValueDictionary>(actual.Values), 524Assert.Collection(Assert.IsType<RouteValueDictionary>(actual.Values), 587Assert.Collection(Assert.IsType<RouteValueDictionary>(actual.Values).OrderBy(v => v.Key), 743Assert.Collection(Assert.IsType<RouteValueDictionary>(actual.Values), 791Assert.Collection(Assert.IsType<RouteValueDictionary>(actual.Values), 839Assert.Collection(Assert.IsType<RouteValueDictionary>(actual.Values),
SerializableErrorTests.cs (3)
23var arr = Assert.IsType<string[]>(serializableError["key1"]); 40var arr = Assert.IsType<string[]>(serializableError["KEY1"]); 55var arr = Assert.IsType<string[]>(serializableError["key1"]);
ServiceFilterAttributeTest.cs (1)
43Assert.IsType<TestFilter>(filter);
TypeFilterAttributeTest.cs (3)
28var testFilter = Assert.IsType<TestFilter>(filter); 53var testFilter = Assert.IsType<TestFilter>(filter); 78var testFilter = Assert.IsType<TestFilter>(filter);
UnprocessableEntityObjectResultTests.cs (1)
31var errors = Assert.IsType<SerializableError>(result.Value);
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
CommonFilterTest.cs (1)
77Assert.IsType<NoOpResult>(context.Result);
Microsoft.AspNetCore.Mvc.Cors.Test (10)
CorsApplicationModelProviderTest.cs (9)
38Assert.IsType<CorsHttpMethodActionConstraint>(constraint); 57Assert.IsType<CorsHttpMethodActionConstraint>(constraint); 75Assert.IsType<CorsHttpMethodActionConstraint>(constraint); 94Assert.IsType<CorsHttpMethodActionConstraint>(constraint); 113Assert.IsType<CorsHttpMethodActionConstraint>(constraint); 131Assert.IsType<CorsHttpMethodActionConstraint>(constraint); 152Assert.IsType<CorsHttpMethodActionConstraint>(constraint); 171Assert.IsType<CorsHttpMethodActionConstraint>(constraint); 190Assert.IsType<CorsHttpMethodActionConstraint>(constraint);
DisableCorsAuthorizationFilterTest.cs (1)
72var statusCodeResult = Assert.IsType<StatusCodeResult>(authorizationFilterContext.Result);
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (12)
DataAnnotationsClientModelValidatorProviderTest.cs (2)
35Assert.IsType<RequiredAttributeAdapter>(validatorItem.Validator); 111var adapter = Assert.IsType<RequiredAttributeAdapter>(validatorItem.Validator);
DataAnnotationsModelValidatorProviderTest.cs (2)
34Assert.IsType<ValidatableObjectAdapter>(validatorItem.Validator); 76Assert.IsType<DataAnnotationsModelValidator>(validatorItem.Validator);
DataTypeClientModelValidatorProviderTest.cs (1)
33Assert.IsType<NumericClientModelValidator>(validatorItem.Validator);
DefaultModelClientValidatorProviderTest.cs (6)
30Assert.IsType<ValidatableObjectAdapter>(validatorItem.Validator); 50var customModelValidator = Assert.IsType<CustomModelValidatorAttribute>(validatorItem.Validator); 72var validatorItem = Assert.IsType<CustomModelValidatorAttribute>(Assert.Single(validatorItems).Validator); 95Assert.Single(validatorItems, v => Assert.IsType<CustomModelValidatorAttribute>(v.Validator).Tag == "Class"); 96Assert.Single(validatorItems, v => Assert.IsType<CustomModelValidatorAttribute>(v.Validator).Tag == "Property"); 141Assert.IsType<CustomValidationAttribute>(Assert.Single(validatorItems).Validator);
ValidationAttributeAdapterProviderTest.cs (1)
87var dataTypeAdapter = Assert.IsType<DataTypeAttributeAdapter>(adapter);
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (35)
DelegatingEnumerableTest.cs (1)
50Assert.IsType<SerializableErrorWrapper>(errorWrapper);
DependencyInjection\XmlDataContractSerializerMvcOptionsSetupTest.cs (2)
54Assert.IsType<XmlDataContractSerializerInputFormatter>(Assert.Single(options.InputFormatters)); 68Assert.IsType<XmlDataContractSerializerOutputFormatter>(Assert.Single(options.OutputFormatters));
DependencyInjection\XmlSerializerMvcOptionsSetupTest.cs (2)
54Assert.IsType<XmlSerializerInputFormatter>(Assert.Single(options.InputFormatters)); 68Assert.IsType<XmlSerializerOutputFormatter>(Assert.Single(options.OutputFormatters));
ProblemDetailsWrapperProviderFactoryTest.cs (2)
35var wrapper = Assert.IsType<ProblemDetailsWrapper>(result); 52var wrapper = Assert.IsType<ValidationProblemDetailsWrapper>(result);
ProblemDetailsWrapperTest.cs (1)
32var problemDetails = Assert.IsType<ProblemDetailsWrapper>(value).ProblemDetails;
ValidationProblemDetailsWrapperTest.cs (3)
36var problemDetails = Assert.IsType<ValidationProblemDetailsWrapper>(value).ProblemDetails; 92var problemDetails = Assert.IsType<ValidationProblemDetailsWrapper>(value).ProblemDetails; 130var problemDetails = Assert.IsType<ValidationProblemDetailsWrapper>(value).ProblemDetails;
XmlDataContractSerializerInputFormatterTest.cs (13)
159var model = Assert.IsType<TestLevelOne>(result.Model); 190var model = Assert.IsType<TestLevelOne>(result.Model); 223var model = Assert.IsType<TestLevelOne>(result.Model); 258var model = Assert.IsType<TestLevelOne>(result.Model); 290var model = Assert.IsType<TestLevelOne>(result.Model); 317var model = Assert.IsType<TestLevelOne>(result.Model); 351var model = Assert.IsType<TestLevelOne>(result.Model); 383var model = Assert.IsType<TestLevelTwo>(result.Model); 409var model = Assert.IsType<DummyClass>(result.Model); 554var model = Assert.IsType<TestLevelTwo>(result.Model); 592var model = Assert.IsType<TestLevelOne>(result.Model); 652var model = Assert.IsType<DummyClass>(result.Model); 711var model = Assert.IsType<SomeDummyClass>(result.Model);
XmlSerializerInputFormatterTest.cs (11)
64var model = Assert.IsType<TestLevelOne>(result.Model); 101var model = Assert.IsType<TestLevelOne>(result.Model); 137var model = Assert.IsType<TestLevelOne>(result.Model); 173var model = Assert.IsType<TestLevelOne>(result.Model); 217var model = Assert.IsType<TestLevelOne>(result.Model); 353var model = Assert.IsType<TestLevelOne>(result.Model); 387var model = Assert.IsType<TestLevelTwo>(result.Model); 416var model = Assert.IsType<DummyClass>(result.Model); 574var model = Assert.IsType<TestLevelTwo>(result.Model); 613var model = Assert.IsType<TestLevelOne>(result.Model); 645var model = Assert.IsType<TestLevelOne>(result.Model);
Microsoft.AspNetCore.Mvc.FunctionalTests (4)
InputFormatterTests.cs (3)
113var value = Assert.IsType<JArray>(p.Value); 145var value = Assert.IsType<JArray>(p.Value); 177var value = Assert.IsType<JArray>(p.Value);
RazorPagesTest.cs (1)
832var value = Assert.IsType<JArray>(p.Value);
Microsoft.AspNetCore.Mvc.IntegrationTests (399)
ActionParametersIntegrationTest.cs (12)
60var boundModel = Assert.IsType<Person3>(modelBindingResult.Model); 104var boundModel = Assert.IsType<Person6>(modelBindingResult.Model); 153var boundModel = Assert.IsType<Person4>(modelBindingResult.Model); 199var boundModel = Assert.IsType<Person5>(modelBindingResult.Model); 240var boundModel = Assert.IsType<Person3>(modelBindingResult.Model); 283var boundModel = Assert.IsType<Person6>(modelBindingResult.Model); 331var boundModel = Assert.IsType<Person4>(modelBindingResult.Model); 376var boundModel = Assert.IsType<Person5>(modelBindingResult.Model); 442var model = Assert.IsType<ActionParameter_DefaultValueConstructor>(result.Model); 624var boundModel = Assert.IsType<ClassWithNoDefaultConstructor>(modelBindingResult.Model); 694var model = Assert.IsType<ModelWithIValidatableObject>(modelBindingResult.Model); 742Assert.Equal(input.Value, Assert.IsType<int>(modelBindingResult.Model));
ArrayModelBinderIntegrationTest.cs (9)
37var model = Assert.IsType<int[]>(modelBindingResult.Model); 81var model = Assert.IsType<int[]>(modelBindingResult.Model); 121var model = Assert.IsType<int[]>(modelBindingResult.Model); 160Assert.Empty(Assert.IsType<int[]>(modelBindingResult.Model)); 196var model = Assert.IsType<Person[]>(modelBindingResult.Model); 241var model = Assert.IsType<Person[]>(modelBindingResult.Model); 282var model = Assert.IsType<Person[]>(modelBindingResult.Model); 322Assert.Empty(Assert.IsType<Person[]>(modelBindingResult.Model)); 362var model = Assert.IsType<PersonWithReadOnlyAndInitializedProperty>(modelBindingResult.Model);
BinderTypeBasedModelBinderIntegrationTest.cs (4)
176var address = Assert.IsType<Address>(modelBindingResult.Model); 227var person = Assert.IsType<Person3>(modelBindingResult.Model); 265var boundPerson = Assert.IsType<Person>(modelBindingResult.Model); 304var boundPerson = Assert.IsType<Person>(modelBindingResult.Model);
BindingSourceMetadataProviderIntegrationTest.cs (2)
53var boundPerson = Assert.IsType<CancellationTokenBundle>(modelBindingResult.Model); 106var boundPerson = Assert.IsType<FormFileBundle>(modelBindingResult.Model);
BindPropertyIntegrationTest.cs (3)
47Assert.Equal("Joey", Assert.IsType<Person>(result.Model).Name); 74Assert.Equal("Joey", Assert.IsType<Person>(result.Model).Name); 176Assert.Equal(input.Value, Assert.IsType<int>(result.Model));
BodyValidationIntegrationTests.cs (17)
47var boundPerson = Assert.IsType<ProductViewModel>(modelBindingResult.Model); 128var boundPerson = Assert.IsType<ProductViewModel>(modelBindingResult.Model); 174var boundPerson = Assert.IsType<ProductViewModel>(modelBindingResult.Model); 213var boundPerson = Assert.IsType<ProductViewModel>(modelBindingResult.Model); 253var boundPerson = Assert.IsType<SoftwareViewModel>(modelBindingResult.Model); 292var boundPerson = Assert.IsType<SoftwareViewModel>(modelBindingResult.Model); 334var boundPerson = Assert.IsType<SoftwareViewModel>(modelBindingResult.Model); 386var boundPerson = Assert.IsType<Person>(modelBindingResult.Model); 474var boundPerson = Assert.IsType<Person4>(modelBindingResult.Model); 538var boundPerson = Assert.IsType<Person5>(modelBindingResult.Model); 580var boundPerson = Assert.IsType<Person5>(modelBindingResult.Model); 594Assert.IsType<JsonReaderException>(error.Exception); 679Assert.IsType<Person5>(modelBindingResult.Model); 730var boundPerson = Assert.IsType<Person2>(modelBindingResult.Model); 786Assert.IsType<Person3>(modelBindingResult.Model); 840var person = Assert.IsType<Person6>(modelBindingResult.Model); 886var address = Assert.IsType<Address6>(modelBindingResult.Model);
ByteArrayModelBinderIntegrationTest.cs (2)
53var boundPerson = Assert.IsType<Person>(modelBindingResult.Model); 135var model = Assert.IsType<byte[]>(modelBindingResult.Model);
CancellationTokenModelBinderIntegrationTest.cs (3)
44var boundPerson = Assert.IsType<Person>(modelBindingResult.Model); 80var boundPerson = Assert.IsType<Person>(modelBindingResult.Model); 119var token = Assert.IsType<CancellationToken>(modelBindingResult.Model);
CollectionModelBinderIntegrationTest.cs (19)
43var model = Assert.IsType<List<int>>(modelBindingResult.Model); 91var model = Assert.IsType<List<int>>(modelBindingResult.Model); 127var model = Assert.IsType<List<int>>(modelBindingResult.Model); 158Assert.Empty(Assert.IsType<List<int>>(modelBindingResult.Model)); 199var model = Assert.IsType<List<Person>>(modelBindingResult.Model); 239var model = Assert.IsType<List<Person>>(modelBindingResult.Model); 271Assert.Empty(Assert.IsType<List<Person>>(modelBindingResult.Model)); 310var model = Assert.IsType<List<Person2>>(modelBindingResult.Model); 369var model = Assert.IsType<List<Person2>>(modelBindingResult.Model); 420var model = Assert.IsType<List<Person2>>(modelBindingResult.Model); 472var model = Assert.IsType<List<int>>(modelBindingResult.Model); 515var model = Assert.IsType<List<Person2>>(modelBindingResult.Model); 565Assert.Empty(Assert.IsType<List<Person2>>(modelBindingResult.Model)); 615Assert.IsType<Person4>(modelBindingResult.Model); 672Assert.IsType<Person5>(modelBindingResult.Model); 712var model = Assert.IsType<List<Address5>>(modelBindingResult.Model); 1032var locations = Assert.IsType<List<SuccessfulModel>>(result.Model); 1155var model = Assert.IsType<Collection<string>>(result.Model); 1204var model = Assert.IsType<Collection<string>>(result.Model);
ComplexRecordIntegrationTest.cs (75)
66var model = Assert.IsType<Order1>(modelBindingResult.Model); 116var model = Assert.IsType<Order1>(modelBindingResult.Model); 168var model = Assert.IsType<Order1>(modelBindingResult.Model); 222var model = Assert.IsType<Order1>(modelBindingResult.Model); 271var model = Assert.IsType<Order1>(modelBindingResult.Model); 320var model = Assert.IsType<Order1>(modelBindingResult.Model); 368var model = Assert.IsType<Order3>(modelBindingResult.Model); 420var model = Assert.IsType<Order3>(modelBindingResult.Model); 472var model = Assert.IsType<Order3>(modelBindingResult.Model); 525var model = Assert.IsType<Order4>(modelBindingResult.Model); 578var model = Assert.IsType<Order4>(modelBindingResult.Model); 632var model = Assert.IsType<Order4>(modelBindingResult.Model); 682var model = Assert.IsType<Order4>(modelBindingResult.Model); 739var model = Assert.IsType<Order4>(modelBindingResult.Model); 793var model = Assert.IsType<Order5>(modelBindingResult.Model); 848var model = Assert.IsType<Order5>(modelBindingResult.Model); 903var model = Assert.IsType<Order5>(modelBindingResult.Model); 950var model = Assert.IsType<Order5>(modelBindingResult.Model); 996var model = Assert.IsType<Order6>(modelBindingResult.Model); 1051var model = Assert.IsType<Order6>(modelBindingResult.Model); 1106var model = Assert.IsType<Order6>(modelBindingResult.Model); 1153var model = Assert.IsType<Order6>(modelBindingResult.Model); 1199var model = Assert.IsType<Order7>(modelBindingResult.Model); 1254var model = Assert.IsType<Order7>(modelBindingResult.Model); 1309var model = Assert.IsType<Order7>(modelBindingResult.Model); 1356var model = Assert.IsType<Order7>(modelBindingResult.Model); 1415var model = Assert.IsType<Car1>(modelBindingResult.Model); 1522var model = Assert.IsType<Car2>(modelBindingResult.Model); 1629var model = Assert.IsType<Car3>(modelBindingResult.Model); 1733var model = Assert.IsType<Order8>(modelBindingResult.Model); 1788var model = Assert.IsType<Order8>(modelBindingResult.Model); 1852var model = Assert.IsType<Car4>(modelBindingResult.Model); 1938var model = Assert.IsType<Order9>(modelBindingResult.Model); 1984var model = Assert.IsType<Order10>(modelBindingResult.Model); 2040var model = Assert.IsType<Order10>(modelBindingResult.Model); 2092var model = Assert.IsType<Order11>(modelBindingResult.Model); 2146var model = Assert.IsType<Order11>(modelBindingResult.Model); 2204var model = Assert.IsType<Order11>(modelBindingResult.Model); 2260var model = Assert.IsType<Order12>(modelBindingResult.Model); 2312var model = Assert.IsType<Order12>(modelBindingResult.Model); 2360var model = Assert.IsType<Order12>(modelBindingResult.Model); 2408var model = Assert.IsType<Order13>(modelBindingResult.Model); 2460var model = Assert.IsType<Order13>(modelBindingResult.Model); 2507var model = Assert.IsType<Order13>(modelBindingResult.Model); 2557var model = Assert.IsType<Order14>(modelBindingResult.Model); 2611var model = Assert.IsType<Order14>(modelBindingResult.Model); 2669var person = Assert.IsType<Person12>(modelBindingResult.Model); 2718var address = Assert.IsType<Address12>(modelBindingResult.Model); 2774var person = Assert.IsType<Person13>(modelBindingResult.Model); 2828var address = Assert.IsType<Address13>(modelBindingResult.Model); 2887var model = Assert.IsType<Product>(modelBindingResult.Model); 2934var model = Assert.IsType<Photo>(modelBindingResult.Model); 3002var model = Assert.IsType<List<Person5>>(modelBindingResult.Model); 3074var model = Assert.IsType<TestModel>(modelBindingResult.Model); 3138var model = Assert.IsType<Person6>(modelBindingResult.Model); 3190var model = Assert.IsType<Person6>(modelBindingResult.Model); 3265var model = Assert.IsType<Person7>(modelBindingResult.Model); 3360var model = Assert.IsType<ThreeDeepModel>(result.Model); 3472var model = Assert.IsType<RecordTypeWithSettableProperty1>(modelBindingResult.Model); 3514var model = Assert.IsType<RecordTypeWithSettableProperty1>(modelBindingResult.Model); 3557var model = Assert.IsType<RecordTypeWithSettableProperty1>(modelBindingResult.Model); 3600var model = Assert.IsType<RecordTypeWithSettableProperty1>(modelBindingResult.Model); 3651var model = Assert.IsType<RecordTypeWithFilteredProperty1>(modelBindingResult.Model); 3697var model = Assert.IsType<RecordTypeWithFilteredProperty2>(modelBindingResult.Model); 3750var model = Assert.IsType<RecordTypesWithDifferentMetadataOnParameterAndProperty>(modelBindingResult.Model); 3792var model = Assert.IsType<RecordTypesWithDifferentMetadataOnParameterAndProperty>(modelBindingResult.Model); 3838var model = Assert.IsType<RecordTypeWithCollectionParameter>(modelBindingResult.Model); 3880var model = Assert.IsType<RecordTypeWithCollectionParameter>(modelBindingResult.Model); 3925var model = Assert.IsType<RecordTypesWithReadOnlyCollectionParameter>(modelBindingResult.Model); 3971var model = Assert.IsType<RecordTypesWithDefaultParameterValue>(modelBindingResult.Model); 4014var model = Assert.IsType<RecordTypesWithDefaultParameterValue>(modelBindingResult.Model); 4055var model = Assert.IsType<RecordTypesWithDefaultParameterValue>(modelBindingResult.Model); 4098var model = Assert.IsType<RecordTypesWithDefaultParameterValue>(modelBindingResult.Model); 4143var model = Assert.IsType<RecordTypeWithBindRequiredParameters>(modelBindingResult.Model); 4187var model = Assert.IsType<RecordTypeWithBindRequiredParameters>(modelBindingResult.Model);
ComplexTypeIntegrationTestBase.cs (59)
103var model = Assert.IsType<Order1>(modelBindingResult.Model); 153var model = Assert.IsType<Order1>(modelBindingResult.Model); 205var model = Assert.IsType<Order1>(modelBindingResult.Model); 254var model = Assert.IsType<Order1>(modelBindingResult.Model); 303var model = Assert.IsType<Order1>(modelBindingResult.Model); 361var model = Assert.IsType<Order3>(modelBindingResult.Model); 413var model = Assert.IsType<Order3>(modelBindingResult.Model); 465var model = Assert.IsType<Order3>(modelBindingResult.Model); 528var model = Assert.IsType<Order4>(modelBindingResult.Model); 581var model = Assert.IsType<Order4>(modelBindingResult.Model); 635var model = Assert.IsType<Order4>(modelBindingResult.Model); 685var model = Assert.IsType<Order4>(modelBindingResult.Model); 742var model = Assert.IsType<Order4>(modelBindingResult.Model); 801var model = Assert.IsType<Order5>(modelBindingResult.Model); 856var model = Assert.IsType<Order5>(modelBindingResult.Model); 911var model = Assert.IsType<Order5>(modelBindingResult.Model); 958var model = Assert.IsType<Order5>(modelBindingResult.Model); 1009var model = Assert.IsType<Order6>(modelBindingResult.Model); 1064var model = Assert.IsType<Order6>(modelBindingResult.Model); 1119var model = Assert.IsType<Order6>(modelBindingResult.Model); 1166var model = Assert.IsType<Order6>(modelBindingResult.Model); 1217var model = Assert.IsType<Order7>(modelBindingResult.Model); 1272var model = Assert.IsType<Order7>(modelBindingResult.Model); 1327var model = Assert.IsType<Order7>(modelBindingResult.Model); 1374var model = Assert.IsType<Order7>(modelBindingResult.Model); 1451var model = Assert.IsType<Car1>(modelBindingResult.Model); 1558var model = Assert.IsType<Car2>(modelBindingResult.Model); 1665var model = Assert.IsType<Car3>(modelBindingResult.Model); 1774var model = Assert.IsType<Order8>(modelBindingResult.Model); 1829var model = Assert.IsType<Order8>(modelBindingResult.Model); 1884var model = Assert.IsType<Order8>(modelBindingResult.Model); 1933var model = Assert.IsType<Order8>(modelBindingResult.Model); 1992var model = Assert.IsType<Car4>(modelBindingResult.Model); 2085var model = Assert.IsType<Order9>(modelBindingResult.Model); 2138var model = Assert.IsType<Order10>(modelBindingResult.Model); 2193var model = Assert.IsType<Order10>(modelBindingResult.Model); 2254var model = Assert.IsType<Order11>(modelBindingResult.Model); 2308var model = Assert.IsType<Order11>(modelBindingResult.Model); 2366var model = Assert.IsType<Order11>(modelBindingResult.Model); 2426var model = Assert.IsType<Order12>(modelBindingResult.Model); 2478var model = Assert.IsType<Order12>(modelBindingResult.Model); 2526var model = Assert.IsType<Order12>(modelBindingResult.Model); 2578var model = Assert.IsType<Order13>(modelBindingResult.Model); 2630var model = Assert.IsType<Order13>(modelBindingResult.Model); 2677var model = Assert.IsType<Order13>(modelBindingResult.Model); 2730var model = Assert.IsType<Order14>(modelBindingResult.Model); 2784var model = Assert.IsType<Order14>(modelBindingResult.Model); 2848var person = Assert.IsType<Person12>(modelBindingResult.Model); 2897var address = Assert.IsType<Address12>(modelBindingResult.Model); 2965var person = Assert.IsType<Person13>(modelBindingResult.Model); 3019var address = Assert.IsType<Address13>(modelBindingResult.Model); 3080var model = Assert.IsType<Product>(modelBindingResult.Model); 3138var model = Assert.IsType<Photo>(modelBindingResult.Model); 3210var model = Assert.IsType<List<Person5>>(modelBindingResult.Model); 3289var model = Assert.IsType<TestModel>(modelBindingResult.Model); 3360var model = Assert.IsType<Person6>(modelBindingResult.Model); 3412var model = Assert.IsType<Person6>(modelBindingResult.Model); 3494var model = Assert.IsType<Person7>(modelBindingResult.Model); 3605var model = Assert.IsType<ThreeDeepModel>(result.Model);
DictionaryModelBinderIntegrationTest.cs (26)
41var model = Assert.IsType<Dictionary<string, int>>(modelBindingResult.Model); 81var model = Assert.IsType<Dictionary<string, int>>(modelBindingResult.Model); 119var model = Assert.IsType<Dictionary<string, int>>(modelBindingResult.Model); 172var model = Assert.IsType<Dictionary<string, int>>(modelBindingResult.Model); 209var model = Assert.IsType<Dictionary<string, int>>(modelBindingResult.Model); 353var model = Assert.IsType<Dictionary<string, int>>(result.Model); 390var model = Assert.IsType<Dictionary<string, int>>(result.Model); 421var model = Assert.IsType<Dictionary<string, int>>(modelBindingResult.Model); 526var model = Assert.IsType<Dictionary<string, Person>>(modelBindingResult.Model); 564var model = Assert.IsType<Dictionary<string, Person>>(modelBindingResult.Model); 602var model = Assert.IsType<Dictionary<string, Person>>(modelBindingResult.Model); 637var model = Assert.IsType<Dictionary<string, Person>>(modelBindingResult.Model); 672var model = Assert.IsType<Dictionary<string, Person>>(modelBindingResult.Model); 724var model = Assert.IsType<Dictionary<string, Person>>(modelBindingResult.Model); 763var model = Assert.IsType<Dictionary<string, Person>>(modelBindingResult.Model); 803var model = Assert.IsType<Dictionary<string, Person>>(modelBindingResult.Model); 843var model = Assert.IsType<Dictionary<string, Person>>(modelBindingResult.Model); 927var model = Assert.IsType<Dictionary<string, string[]>>(modelBindingResult.Model); 961var model = Assert.IsType<Dictionary<string, string[]>>(modelBindingResult.Model); 995var model = Assert.IsType<Dictionary<string, string[]>>(modelBindingResult.Model); 1034var model = Assert.IsType<Dictionary<string, string[]>>(modelBindingResult.Model); 1073var model = Assert.IsType<Dictionary<string, string[]>>(modelBindingResult.Model); 1255var model = Assert.IsType<Dictionary<string, string>>(modelBindingResult.Model); 1309var model = Assert.IsType<Dictionary<string, NonNullPerson>>(modelBindingResult.Model); 1416var model = Assert.IsType<Dictionary<string, DayOfWeek>>(modelBindingResult.Model); 1462var model = Assert.IsType<Dictionary<string, NonNullPersonWithRequiredProperties>>(modelBindingResult.Model);
ExcludeBindingMetadataProviderIntegrationTest.cs (2)
52var boundPerson = Assert.IsType<TypesBundle>(modelBindingResult.Model); 111var boundPerson = Assert.IsType<TypesBundle>(modelBindingResult.Model);
FormCollectionModelBindingIntegrationTest.cs (1)
57var boundPerson = Assert.IsType<Person>(modelBindingResult.Model);
FormFileModelBindingIntegrationTest.cs (21)
57var boundPerson = Assert.IsType<Person>(modelBindingResult.Model); 104var boundPerson = Assert.IsType<Person>(modelBindingResult.Model); 155var boundPerson = Assert.IsType<Person>(modelBindingResult.Model); 214var group = Assert.IsType<Group>(modelBindingResult.Model); 301var fleet = Assert.IsType<Fleet>(modelBindingResult.Model); 366var fleet = Assert.IsType<Fleet>(modelBindingResult.Model); 432var group = Assert.IsType<Group>(modelBindingResult.Model); 495var boundContainer = Assert.IsType<ListContainer1>(result.Model); 540var boundContainer = Assert.IsType<ListContainer1>(result.Model); 584var boundContainer = Assert.IsType<ListContainer2>(result.Model); 639var file = Assert.IsType<FormFile>(modelBindingResult.Model); 726var car = Assert.IsType<Car1>(modelBindingResult.Model); 786var house = Assert.IsType<House>(modelBindingResult.Model); 851var house = Assert.IsType<House>(modelBindingResult.Model); 911var house = Assert.IsType<House>(modelBindingResult.Model); 951var house = Assert.IsType<House>(modelBindingResult.Model); 1013var car = Assert.IsType<Car1>(modelBindingResult.Model); 1068var container = Assert.IsType<MultiDimensionalFormFileContainer>(modelBindingResult.Model); 1117var container = Assert.IsType<MultiDimensionalFormFileContainer>(modelBindingResult.Model); 1164var level2 = Assert.IsType<MultiDimensionalFormFileContainerLevel2>(modelBindingResult.Model); 1228var container = Assert.IsType<DictionaryContainer>(modelBindingResult.Model);
GenericModelBinderIntegrationTest.cs (14)
45var model = Assert.IsType<List<IFormCollection>>(modelBindingResult.Model); 83var model = Assert.IsType<List<IFormCollection>>(modelBindingResult.Model); 122var model = Assert.IsType<List<IFormCollection>>(modelBindingResult.Model); 213var model = Assert.IsType<Address[]>(modelBindingResult.Model); 247var model = Assert.IsType<Address[]>(modelBindingResult.Model); 282var model = Assert.IsType<Dictionary<string, int>[]>(modelBindingResult.Model); 327var model = Assert.IsType<Dictionary<string, int>[]>(modelBindingResult.Model); 372var model = Assert.IsType<Dictionary<string, int>[]>(modelBindingResult.Model); 407var model = Assert.IsType<List<KeyValuePair<string, int>>>(modelBindingResult.Model); 451var model = Assert.IsType<List<KeyValuePair<string, int>>>(modelBindingResult.Model); 495var model = Assert.IsType<List<KeyValuePair<string, int>>>(modelBindingResult.Model); 531var model = Assert.IsType<Dictionary<string, List<int>>>(modelBindingResult.Model); 579var model = Assert.IsType<Dictionary<string, List<int>>>(modelBindingResult.Model); 627var model = Assert.IsType<Dictionary<string, List<int>>>(modelBindingResult.Model);
HasValidatorsValidationMetadataProviderIntegrationTest.cs (2)
27Assert.IsType<HasValidatorsValidationMetadataProvider>(options.Value.ModelMetadataDetailsProviders.Last()); 45Assert.IsType<HasValidatorsValidationMetadataProvider>(options.Value.ModelMetadataDetailsProviders.Last());
HeaderModelBinderIntegrationTest.cs (6)
55var boundPerson = Assert.IsType<Person>(modelBindingResult.Model); 94var boundPerson = Assert.IsType<Person>(modelBindingResult.Model); 136var boundPerson = Assert.IsType<Person>(modelBindingResult.Model); 180var boundContainer = Assert.IsType<ListContainer1>(result.Model); 227var boundContainer = Assert.IsType<ListContainer2>(result.Model); 343var product = Assert.IsType<Product>(modelBindingResult.Model);
JQueryFormatModelBindingIntegrationTest.cs (2)
43var model = Assert.IsType<Customer>(modelBindingResult.Model); 81var model = Assert.IsType<Customer>(modelBindingResult.Model);
KeyValuePairModelBinderIntegrationTest.cs (7)
37var model = Assert.IsType<KeyValuePair<string, int>>(modelBindingResult.Model); 255var model = Assert.IsType<KeyValuePair<string, int>>(modelBindingResult.Model); 295var model = Assert.IsType<KeyValuePair<string, int>>(modelBindingResult.Model); 373var model = Assert.IsType<KeyValuePair<string, Person>>(modelBindingResult.Model); 418var model = Assert.IsType<KeyValuePair<string, Person>>(modelBindingResult.Model); 459var model = Assert.IsType<KeyValuePair<string, Person>>(modelBindingResult.Model); 535var model = Assert.IsType<KeyValuePair<string, string[]>>(modelBindingResult.Model);
ModelPrefixSelectionIntegrationTest.cs (5)
52var model = Assert.IsType<Person1>(modelBindingResult.Model); 101var model = Assert.IsType<Person2>(modelBindingResult.Model); 140var model = Assert.IsType<Person3>(modelBindingResult.Model); 189var model = Assert.IsType<Person4>(modelBindingResult.Model); 235var model = Assert.IsType<Person5>(modelBindingResult.Model);
NullableReferenceTypeIntegrationTest.cs (3)
44var boundPerson = Assert.IsType<Person1>(modelBindingResult.Model); 92var boundPerson = Assert.IsType<Person2>(modelBindingResult.Model); 131var boundPerson = Assert.IsType<Person3>(modelBindingResult.Model);
ServicesModelBinderIntegrationTest.cs (3)
115var formatterArray = Assert.IsType<ITypeActivatorCache[]>(modelBindingResult.Model); 151var actionResultArray = Assert.IsType<IActionResult[]>(modelBindingResult.Model); 369var person = Assert.IsType<Person>(modelBindingResult.Model);
SimpleTypeModelBinderIntegrationTest.cs (10)
50var boundPerson = Assert.IsType<Person>(modelBindingResult.Model); 94var boundPerson = Assert.IsType<Person>(modelBindingResult.Model); 139var model = Assert.IsType<string>(modelBindingResult.Model); 216var model = Assert.IsType<decimal>(modelBindingResult.Model); 260var model = Assert.IsType<DateTime>(modelBindingResult.Model); 309var model = Assert.IsType<DateTime>(modelBindingResult.Model); 345var model = Assert.IsType<string>(modelBindingResult.Model); 686var boundPerson = Assert.IsType<Person>(modelBindingResult.Model); 733var model = Assert.IsType<SampleModel>(modelBindingResult.Model); 777var model = Assert.IsType<SampleTryParsableModel>(modelBindingResult.Model);
ValidationIntegrationTests.cs (47)
187var model = Assert.IsType<Order1>(modelBindingResult.Model); 224var model = Assert.IsType<Order1>(modelBindingResult.Model); 275var model = Assert.IsType<Order2>(modelBindingResult.Model); 313var model = Assert.IsType<Order2>(modelBindingResult.Model); 366var model = Assert.IsType<Order3>(modelBindingResult.Model); 405var model = Assert.IsType<Order3>(modelBindingResult.Model); 458var model = Assert.IsType<Order4>(modelBindingResult.Model); 497var model = Assert.IsType<Order4>(modelBindingResult.Model); 545var model = Assert.IsType<List<Order5>>(modelBindingResult.Model); 583var model = Assert.IsType<List<Order5>>(modelBindingResult.Model); 703var model = Assert.IsType<Order6>(modelBindingResult.Model); 740var model = Assert.IsType<Order6>(modelBindingResult.Model); 791var model = Assert.IsType<Order7>(modelBindingResult.Model); 828var model = Assert.IsType<Order7>(modelBindingResult.Model); 868var model = Assert.IsType<Order7>(modelBindingResult.Model); 926var model = Assert.IsType<Order8>(modelBindingResult.Model); 963var model = Assert.IsType<Order8>(modelBindingResult.Model); 1033var model = Assert.IsType<Order9>(modelBindingResult.Model); 1070var model = Assert.IsType<Order9>(modelBindingResult.Model); 1121var model = Assert.IsType<List<Order10>>(modelBindingResult.Model); 1158var model = Assert.IsType<List<Order10>>(modelBindingResult.Model); 1198var model = Assert.IsType<List<Order10>>(modelBindingResult.Model); 1238var model = Assert.IsType<User>(modelBindingResult.Model); 1278var model = Assert.IsType<User>(modelBindingResult.Model); 1368var model = Assert.IsType<ValidateSomeProperties>(result.Model); 1417var model = Assert.IsType<ValidateSomeProperties>(result.Model); 1456var model = Assert.IsType<ValidateSomeProperties>(result.Model); 1486var model = Assert.IsType<ValidateSomeProperties>(result.Model); 1519Assert.IsType<ValidateNoProperties>(result.Model); 1592var model = Assert.IsType<ValidateSomePropertiesSometimes>(result.Model); 1632var model = Assert.IsType<ValidateSomePropertiesSometimes>(result.Model); 1682var model = Assert.IsType<ValidateSomePropertiesSometimesWithoutValidation>(result.Model); 1809var message = Assert.IsType<JObject>(modelBindingResult.Model).GetValue("message").Value<string>(); 1852Assert.IsType<CancellationToken>(modelBindingResult.Model); 1897var message = Assert.IsType<Greeting>(modelBindingResult.Model).Message; 1944var message = Assert.IsType<Greeting>(modelBindingResult.Model).Message; 1998var model = Assert.IsType<Order12>(modelBindingResult.Model); 2047var model = Assert.IsType<List<int>>(modelBindingResult.Model); 2099var model = Assert.IsType<List<int>>(modelBindingResult.Model); 2169var model = Assert.IsType<Collection<InvalidEvenIds>>(modelBindingResult.Model); 2231var model = Assert.IsType<Dictionary<string, int>>(modelBindingResult.Model); 2278var model = Assert.IsType<Dictionary<string, NeverValid>>(modelBindingResult.Model); 2335var model = Assert.IsType<Validation_TopLevelPropertyModel>(modelBindingResult.Model); 2389var model = Assert.IsType<Validation_TopLevelPropertyModel>(modelBindingResult.Model); 2441var model = Assert.IsType<RecursiveModel>(modelBindingResult.Model); 2493var model = Assert.IsType<RecursiveModel>(modelBindingResult.Model); 2543var model = Assert.IsType<ModelWithNonNullableReferenceTypeProperties>(modelBindingResult.Model);
ValidationWithRecordIntegrationTests.cs (45)
175var model = Assert.IsType<Order1>(modelBindingResult.Model); 212var model = Assert.IsType<Order1>(modelBindingResult.Model); 256var model = Assert.IsType<Order2>(modelBindingResult.Model); 294var model = Assert.IsType<Order2>(modelBindingResult.Model); 338var model = Assert.IsType<Order3>(modelBindingResult.Model); 377var model = Assert.IsType<Order3>(modelBindingResult.Model); 423var model = Assert.IsType<Order4>(modelBindingResult.Model); 462var model = Assert.IsType<Order4>(modelBindingResult.Model); 504var model = Assert.IsType<List<Order5>>(modelBindingResult.Model); 542var model = Assert.IsType<List<Order5>>(modelBindingResult.Model); 586var model = Assert.IsType<Order6>(modelBindingResult.Model); 623var model = Assert.IsType<Order6>(modelBindingResult.Model); 667var model = Assert.IsType<Order7>(modelBindingResult.Model); 704var model = Assert.IsType<Order7>(modelBindingResult.Model); 744var model = Assert.IsType<Order7>(modelBindingResult.Model); 795var model = Assert.IsType<Order8>(modelBindingResult.Model); 832var model = Assert.IsType<Order8>(modelBindingResult.Model); 895var model = Assert.IsType<Order9>(modelBindingResult.Model); 932var model = Assert.IsType<Order9>(modelBindingResult.Model); 979var model = Assert.IsType<List<Order10>>(modelBindingResult.Model); 1016var model = Assert.IsType<List<Order10>>(modelBindingResult.Model); 1056var model = Assert.IsType<List<Order10>>(modelBindingResult.Model); 1090var model = Assert.IsType<User>(modelBindingResult.Model); 1130var model = Assert.IsType<User>(modelBindingResult.Model); 1212var model = Assert.IsType<ValidateSomeProperties>(result.Model); 1261var model = Assert.IsType<ValidateSomeProperties>(result.Model); 1300var model = Assert.IsType<ValidateSomeProperties>(result.Model); 1330var model = Assert.IsType<ValidateSomeProperties>(result.Model); 1400var model = Assert.IsType<ValidateSomePropertiesSometimes>(result.Model); 1440var model = Assert.IsType<ValidateSomePropertiesSometimes>(result.Model); 1488var model = Assert.IsType<ValidateSomePropertiesSometimesWithoutValidation>(result.Model); 1612var message = Assert.IsType<JObject>(modelBindingResult.Model).GetValue("message").Value<string>(); 1655Assert.IsType<CancellationToken>(modelBindingResult.Model); 1700var message = Assert.IsType<Greeting>(modelBindingResult.Model).Message; 1747var message = Assert.IsType<Greeting>(modelBindingResult.Model).Message; 1793var model = Assert.IsType<Order12>(modelBindingResult.Model); 1838var model = Assert.IsType<List<int>>(modelBindingResult.Model); 1890var model = Assert.IsType<List<int>>(modelBindingResult.Model); 1960var model = Assert.IsType<Collection<InvalidEvenIds>>(modelBindingResult.Model); 2022var model = Assert.IsType<Dictionary<string, int>>(modelBindingResult.Model); 2069var model = Assert.IsType<Dictionary<string, NeverValid>>(modelBindingResult.Model); 2126var model = Assert.IsType<Validation_TopLevelPropertyModel>(modelBindingResult.Model); 2177var model = Assert.IsType<Validation_TopLevelPropertyModel>(modelBindingResult.Model); 2229var model = Assert.IsType<RecursiveModel>(modelBindingResult.Model); 2279var model = Assert.IsType<RecursiveModel>(modelBindingResult.Model);
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (51)
BsonTempDataSerializerTest.cs (6)
107var roundTripValue = Assert.IsType<int[]>(values[key]); 128var roundTripValue = Assert.IsType<DateTime>(values[key]); 149var roundTripValue = Assert.IsType<Guid>(values[key]); 171var roundTripValue = Assert.IsType<long>(values[key]); 222var roundTripValue = Assert.IsType<string>(values[key]); 249var roundTripValue = Assert.IsType<DateTime[]>(values[key]);
JsonResultTest.cs (1)
66return Assert.IsType<MemoryStream>(context.Response.Body).ToArray();
NewtonsoftJsonHelperTest.cs (3)
37var htmlString = Assert.IsType<HtmlString>(result); 65var htmlString = Assert.IsType<HtmlString>(result); 84var htmlString = Assert.IsType<HtmlString>(result);
NewtonsoftJsonInputFormatterTest.cs (5)
52var userModel = Assert.IsType<User>(result.Model); 88var userModel = Assert.IsType<User>(result.Model); 126var userModel = Assert.IsType<User>(result.Model); 468Assert.IsType<FileBufferingReadStream>(registerForDispose); 516var userModel = Assert.IsType<TypeWithPrimitives>(result.Model);
NewtonsoftJsonOutputFormatterTest.cs (2)
83Assert.IsType<FileBufferingWriteStream>(writeStream); 115Assert.IsType<FileBufferingWriteStream>(writeStream);
NewtonsoftJsonPatchInputFormatterTest.cs (4)
50var patchDocument = Assert.IsType<JsonPatchDocument<Customer>>(result.Model); 90var patchDocument = Assert.IsType<JsonPatchDocument<Customer>>(result.Model); 120var patchDocument = Assert.IsType<JsonPatchDocument<Customer>>(result.Model); 144var patchDocument = Assert.IsType<JsonPatchDocument<Customer>>(result.Model);
src\Mvc\Mvc.Core\test\Formatters\JsonInputFormatterTestBase.cs (10)
80var intValue = Assert.IsType<int>(result.Model); 101var stringValue = Assert.IsType<string>(result.Model); 122var stringValue = Assert.IsType<string>(result.Model); 228var dateValue = Assert.IsType<DateTime>(result.Model); 249var userModel = Assert.IsType<ComplexModel>(result.Model); 271var integers = Assert.IsType<int[]>(result.Model); 436Assert.IsType<TooManyModelErrorsException>(error.Exception); 555var userModel = Assert.IsType<ComplexModel>(result.Model); 577var userModel = Assert.IsType<ComplexModel>(result.Model); 603var userModel = Assert.IsType<ComplexModel>(result.Model);
src\Mvc\Mvc.Core\test\Infrastructure\JsonResultExecutorTestBase.cs (2)
223var expectedException = Assert.IsType<NotImplementedException>(serializerException.InnerException); 499return Assert.IsType<MemoryStream>(context.Response.Body).ToArray();
src\Mvc\Mvc.ViewFeatures\test\Infrastructure\TempDataSerializerTestBase.cs (12)
64var roundTripValue = Assert.IsType<int>(values[key]); 107var roundTripValue = Assert.IsType<string>(values[key]); 149var roundTripValue = Assert.IsType<DateTime>(values[key]); 170var roundTripValue = Assert.IsType<Guid>(values[key]); 192var roundTripValue = Assert.IsType<string>(values[key]); 214var roundTripValue = Assert.IsType<string>(values[key]); 236var roundTripValue = Assert.IsType<Guid>(values[key]); 257var roundTripValue = Assert.IsType<int[]>(values[key]); 278var roundTripValue = Assert.IsType<string[]>(values[key]); 299var roundTripValue = Assert.IsType<string[]>(values[key]); 324var roundTripValue = Assert.IsType<Dictionary<string, string>>(values[key]); 349var roundTripValue = Assert.IsType<Dictionary<string, int>>(values[key]);
src\Mvc\Mvc.ViewFeatures\test\Rendering\JsonHelperTestBase.cs (6)
27var htmlString = Assert.IsType<HtmlString>(result); 42var htmlString = Assert.IsType<HtmlString>(result); 61var htmlString = Assert.IsType<HtmlString>(result); 80var htmlString = Assert.IsType<HtmlString>(result); 99var htmlString = Assert.IsType<HtmlString>(result); 118var htmlString = Assert.IsType<HtmlString>(result);
Microsoft.AspNetCore.Mvc.Razor.Test (44)
Compilation\RazorPagePropertyActivatorTest.cs (6)
28Assert.IsType<ViewDataDictionary<TestModel>>(viewDataDictionary); 47Assert.IsType<ViewDataDictionary<object>>(viewDataDictionary); 75Assert.IsType<ViewDataDictionary<TestModel>>(viewDataDictionary); 104Assert.IsType<ViewDataDictionary<TestModel>>(viewDataDictionary); 133Assert.IsType<ViewDataDictionary<TestModel>>(viewDataDictionary); 162Assert.IsType<ViewDataDictionary<object>>(viewDataDictionary);
RazorHotReloadTest.cs (3)
22var compilerProvider = Assert.IsType<DefaultViewCompilerProvider>(serviceProvider.GetRequiredService<IViewCompilerProvider>()); 38var viewEngine = Assert.IsType<RazorViewEngine>(serviceProvider.GetRequiredService<IRazorViewEngine>()); 55var pageActivator = Assert.IsType<RazorPageActivator>(serviceProvider.GetRequiredService<IRazorPageActivator>());
RazorPageActivatorTest.cs (1)
189Assert.IsType<ViewDataDictionary<Guid>>(viewContext.ViewData);
RazorPageTest.cs (3)
200var content = Assert.IsType<DefaultTagHelperContent>(returnValue); 241var content = Assert.IsType<string>(returnValue); 1448var bufferedWriter = Assert.IsType<ViewBufferTextWriter>(Output);
RazorViewEngineTest.cs (23)
157var view = Assert.IsType<RazorView>(result.View); 189var view1 = Assert.IsType<RazorView>(result1.View); 200var view2 = Assert.IsType<RazorView>(result2.View); 323var view = Assert.IsType<RazorView>(result.View); 355var view = Assert.IsType<RazorView>(result.View); 521var view = Assert.IsType<RazorView>(result.View); 557var view1 = Assert.IsType<RazorView>(result1.View); 571var view2 = Assert.IsType<RazorView>(result2.View); 583var view3 = Assert.IsType<RazorView>(result3.View); 585var view4 = Assert.IsType<RazorView>(result4.View); 621var view1 = Assert.IsType<RazorView>(result1.View); 636var view2 = Assert.IsType<RazorView>(result2.View); 648var view3 = Assert.IsType<RazorView>(result3.View); 650var view4 = Assert.IsType<RazorView>(result4.View); 843var view1 = Assert.IsType<RazorView>(result1.View); 856var view2 = Assert.IsType<RazorView>(result2.View); 880var view1 = Assert.IsType<RazorView>(result1.View); 893var view2 = Assert.IsType<RazorView>(result2.View); 931var view1 = Assert.IsType<RazorView>(result1.View); 940var view2 = Assert.IsType<RazorView>(result2.View); 1054var view = Assert.IsType<RazorView>(result.View); 2002var view = Assert.IsType<RazorView>(result.View); 2020var view = Assert.IsType<RazorView>(result.View);
RazorViewTest.cs (2)
53Assert.IsType<ViewBufferTextWriter>(actual); 302Assert.IsType<ViewBufferTextWriter>(actual);
TagHelpers\UrlResolutionTagHelperTest.cs (6)
89var attributeValue = Assert.IsType<string>(attribute.Value); 131var attributeValue = Assert.IsType<string>(attribute.Value); 249var attributeValue = Assert.IsType<string>(attribute.Value); 305var attributeValue = Assert.IsType<HtmlString>(attribute.Value); 336Assert.True(Assert.IsType<bool>(attribute.Value)); 431var attributeValue = Assert.IsType<string>(attribute.Value);
Microsoft.AspNetCore.Mvc.RazorPages.Test (308)
ApplicationModels\AuthorizationPageApplicationModelProviderTest.cs (13)
34f => Assert.IsType<PageHandlerPageFilter>(f), 35f => Assert.IsType<HandleOptionsRequestsPageFilter>(f)); 68f => Assert.IsType<PageHandlerPageFilter>(f), 69f => Assert.IsType<HandleOptionsRequestsPageFilter>(f)); 86f => Assert.IsType<PageHandlerPageFilter>(f), 87f => Assert.IsType<HandleOptionsRequestsPageFilter>(f), 88f => Assert.IsType<AuthorizeFilter>(f)); 126f => Assert.IsType<PageHandlerPageFilter>(f), 127f => Assert.IsType<HandleOptionsRequestsPageFilter>(f), 128f => authorizeFilter = Assert.IsType<AuthorizeFilter>(f)); 168f => Assert.IsType<PageHandlerPageFilter>(f), 169f => Assert.IsType<HandleOptionsRequestsPageFilter>(f), 170f => Assert.IsType<AllowAnonymousFilter>(f));
ApplicationModels\DefaultPageApplicationModelProviderTest.cs (14)
547filter => Assert.IsType<TypeFilterAttribute>(filter), 548filter => Assert.IsType<ServiceFilterAttribute>(filter), 549filter => Assert.IsType<PageHandlerPageFilter>(filter), 550filter => Assert.IsType<HandleOptionsRequestsPageFilter>(filter)); 1100filter => Assert.IsType<HandleOptionsRequestsPageFilter>(filter)); 1117filter => Assert.IsType<TypeFilterAttribute>(filter), 1118filter => Assert.IsType<HandleOptionsRequestsPageFilter>(filter)); 1142filter => Assert.IsType<PageHandlerPageFilter>(filter), 1143filter => Assert.IsType<HandleOptionsRequestsPageFilter>(filter)); 1173filter => Assert.IsType<PageHandlerPageFilter>(filter), 1174filter => Assert.IsType<HandleOptionsRequestsPageFilter>(filter)); 1209filter => Assert.IsType<ServiceFilterAttribute>(filter), 1210filter => Assert.IsType<PageHandlerPageFilter>(filter), 1211filter => Assert.IsType<HandleOptionsRequestsPageFilter>(filter));
ApplicationModels\PageConventionCollectionTest.cs (2)
92convention => Assert.IsType<BarPageConvention>(convention)); 112convention => Assert.IsType<BarPageConvention>(convention));
ApplicationModels\ResponseCacheFilterApplicationModelProviderTest.cs (8)
33f => Assert.IsType<PageHandlerPageFilter>(f), 34f => Assert.IsType<HandleOptionsRequestsPageFilter>(f)); 68f => Assert.IsType<PageHandlerPageFilter>(f), 69f => Assert.IsType<HandleOptionsRequestsPageFilter>(f), 72var filter = Assert.IsType<PageResponseCacheFilter>(f); 115f => Assert.IsType<PageHandlerPageFilter>(f), 116f => Assert.IsType<HandleOptionsRequestsPageFilter>(f), 119var filter = Assert.IsType<PageResponseCacheFilter>(f);
ApplicationModels\TempDataFilterPageApplicationModelProviderTest.cs (3)
74Assert.IsType<PageSaveTempDataPropertyFilterFactory>(filter); 89var filter = Assert.IsType<PageSaveTempDataPropertyFilterFactory>(Assert.Single(context.PageApplicationModel.Filters)); 111var filter = Assert.IsType<PageSaveTempDataPropertyFilterFactory>(Assert.Single(context.PageApplicationModel.Filters));
ApplicationModels\ViewDataAttributePageApplicationModelProviderTest.cs (1)
40var viewDataFilter = Assert.IsType<PageViewDataAttributeFilterFactory>(filter);
DependencyInjection\PageConventionCollectionExtensionsTest.cs (60)
66Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 72Assert.IsType<AuthorizeAttribute>(model.EndpointMetadata[0]); 73Assert.IsType<AllowAnonymousAttribute>(model.EndpointMetadata[1]); 100Assert.IsType<AuthorizeFilter>(Assert.Single(model.Filters)); 105Assert.IsType<AuthorizeFilter>(model.Filters[0]); 106Assert.IsType<AllowAnonymousFilter>(model.Filters[1]); 132Assert.IsType<AllowAnonymousAttribute>(Assert.Single(model.EndpointMetadata)); 157Assert.IsType<AllowAnonymousFilter>(Assert.Single(model.Filters)); 187metadata => Assert.IsType<AuthorizeAttribute>(metadata)); 194metadata => Assert.IsType<AuthorizeAttribute>(metadata), 195metadata => Assert.IsType<AllowAnonymousAttribute>(metadata)); 201metadata => Assert.IsType<AuthorizeAttribute>(metadata), 202metadata => Assert.IsType<AllowAnonymousAttribute>(metadata)); 230Assert.IsType<AuthorizeFilter>(Assert.Single(model.Filters)); 235Assert.IsType<AuthorizeFilter>(model.Filters[0]); 236Assert.IsType<AllowAnonymousFilter>(model.Filters[1]); 241Assert.IsType<AuthorizeFilter>(model.Filters[0]); 242Assert.IsType<AllowAnonymousFilter>(model.Filters[1]); 272metadata => Assert.IsType<AuthorizeAttribute>(metadata)); 279metadata => Assert.IsType<AuthorizeAttribute>(metadata), 280metadata => Assert.IsType<AllowAnonymousAttribute>(metadata)); 287metadata => Assert.IsType<AuthorizeAttribute>(metadata), 288metadata => Assert.IsType<AllowAnonymousAttribute>(metadata)); 316Assert.IsType<AuthorizeFilter>(Assert.Single(model.Filters)); 321Assert.IsType<AuthorizeFilter>(model.Filters[0]); 322Assert.IsType<AllowAnonymousFilter>(model.Filters[1]); 327Assert.IsType<AuthorizeFilter>(model.Filters[0]); 328Assert.IsType<AllowAnonymousFilter>(model.Filters[1]); 358Assert.IsType<AllowAnonymousAttribute>(Assert.Single(model.EndpointMetadata)); 364Assert.IsType<AllowAnonymousAttribute>(Assert.Single(model.EndpointMetadata)); 394Assert.IsType<AllowAnonymousFilter>(Assert.Single(model.Filters)); 399Assert.IsType<AllowAnonymousFilter>(Assert.Single(model.Filters)); 427var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 455var authorizeFilter = Assert.IsType<AuthorizeFilter>(Assert.Single(model.Filters)); 456var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(authorizeFilter.AuthorizeData)); 484var authorizeAttribute = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 510var authFilter = Assert.IsType<AuthorizeFilter>(Assert.Single(model.Filters)); 538var authorizeAttribute = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 564var authFilter = Assert.IsType<AuthorizeFilter>(Assert.Single(model.Filters)); 593var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 621var authorizeFilter = Assert.IsType<AuthorizeFilter>(Assert.Single(model.Filters)); 622var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(authorizeFilter.AuthorizeData)); 653var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 660var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 689var authorizeFilter = Assert.IsType<AuthorizeFilter>(Assert.Single(model.Filters)); 690var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(authorizeFilter.AuthorizeData)); 696var authorizeFilter = Assert.IsType<AuthorizeFilter>(Assert.Single(model.Filters)); 697var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(authorizeFilter.AuthorizeData)); 728var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 735var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 766var authorizeFilter = Assert.IsType<AuthorizeFilter>(Assert.Single(model.Filters)); 767var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(authorizeFilter.AuthorizeData)); 773var authorizeFilter = Assert.IsType<AuthorizeFilter>(Assert.Single(model.Filters)); 774var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(authorizeFilter.AuthorizeData)); 806var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 813var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(model.EndpointMetadata)); 844var authorizeFilter = Assert.IsType<AuthorizeFilter>(Assert.Single(model.Filters)); 845var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(authorizeFilter.AuthorizeData)); 851var authorizeFilter = Assert.IsType<AuthorizeFilter>(Assert.Single(model.Filters)); 852var authorizeData = Assert.IsType<AuthorizeAttribute>(Assert.Single(authorizeFilter.AuthorizeData));
DependencyInjection\RazorPagesRazorViewEngineOptionsSetupTest.cs (1)
180expander => Assert.IsType<PageViewLocationExpander>(expander));
Filters\AutoValidateAntiforgeryPageApplicationModelProviderTest.cs (1)
35filter => Assert.IsType<AutoValidateAntiforgeryTokenAttribute>(filter));
Filters\PageSaveTempDataPropertyFilterFactoryTest.cs (1)
27var pageFilter = Assert.IsType<PageSaveTempDataPropertyFilter>(filter);
Filters\PageViewDataAttributeFilterFactoryTest.cs (1)
26var filter = Assert.IsType<PageViewDataAttributeFilter>(result);
Infrastructure\CompiledPageActionDescriptorFactoryTest.cs (2)
244var model = Assert.IsType<PageParameterModel>(m); 341var model = Assert.IsType<PagePropertyModel>(m);
Infrastructure\DefaultPageFactoryProviderTest.cs (8)
61var testPage = Assert.IsType<TestPage>(instance); 97var testPage = Assert.IsType<TestPage>(instance); 127var testPage = Assert.IsType<ViewDataTestPage>(instance); 154var testPage = Assert.IsType<ViewDataTestPage>(instance); 181var testPage = Assert.IsType<ViewDataTestPage>(instance); 206var testPage = Assert.IsType<NonGenericViewDataTestPage>(instance); 240var testPage = Assert.IsType<TestPage>(instance); 278var testPage = Assert.IsType<PropertiesWithoutRazorInject>(instance);
Infrastructure\DefaultPageModelActivatorProviderTest.cs (2)
56var simpleModel = Assert.IsType<SimpleModel>(model); 86var modelWithServices = Assert.IsType<ModelWithServices>(model);
Infrastructure\DefaultPageModelFactoryProviderTest.cs (2)
57var model = Assert.IsType<SimpleModel>(instance); 77var testModel = Assert.IsType<ModelWithPageContext>(instance);
Infrastructure\DisallowOptionsRequestsPageFilterTest.cs (1)
122Assert.IsType<OkResult>(context.Result);
Infrastructure\ExecutorFactoryTest.cs (5)
29Assert.IsType<EmptyResult>(actionResult); 49Assert.IsType<ViewResult>(actionResult); 70var contentResult = Assert.IsType<ContentResult>(actionResult); 138Assert.IsType<EmptyResult>(actionResult); 159var contentResult = Assert.IsType<ContentResult>(actionResult);
Infrastructure\PageActionDescriptorProviderTest.cs (7)
61var descriptor = Assert.IsType<PageActionDescriptor>(result); 100var descriptor = Assert.IsType<PageActionDescriptor>(result); 150var descriptor = Assert.IsType<PageActionDescriptor>(result); 196var descriptor = Assert.IsType<PageActionDescriptor>(result); 230var descriptor = Assert.IsType<PageActionDescriptor>(result); 330var descriptor = Assert.IsType<PageActionDescriptor>(result); 337var descriptor = Assert.IsType<PageActionDescriptor>(result);
Infrastructure\PageActionInvokerProviderTest.cs (11)
65var actionInvoker = Assert.IsType<PageActionInvoker>(context.Result); 128var actionInvoker = Assert.IsType<PageActionInvoker>(context.Result); 131var compiledPageActionDescriptor = Assert.IsType<CompiledPageActionDescriptor>(entry.ActionDescriptor); 145Assert.NotNull(Assert.IsType<ViewDataDictionary<TestPageModel>>(pageContext.ViewData)); 193var actionInvoker = Assert.IsType<PageActionInvoker>(context.Result); 225var actionInvoker = Assert.IsType<PageActionInvoker>(context.Result); 239actionInvoker = Assert.IsType<PageActionInvoker>(context.Result); 271Assert.IsType<PageActionInvoker>(context.Result); 305Assert.IsType<PageActionInvoker>(context.Result); 342var actionInvoker = Assert.IsType<PageActionInvoker>(context1.Result); 358actionInvoker = Assert.IsType<PageActionInvoker>(context2.Result);
Infrastructure\PageActionInvokerTest.cs (24)
109var pageContext = Assert.IsType<PageActionInvoker>(invoker).PageContext; 143var pageContext = Assert.IsType<PageActionInvoker>(invoker).PageContext; 199var page = Assert.IsType<TestPage>(instance); 200Assert.IsType<ViewDataDictionary<TestPage>>(page.ViewContext.ViewData); 203var pageResult = Assert.IsType<PageResult>(result); 255var page = Assert.IsType<TestPage>(instance); 256Assert.IsType<ViewDataDictionary<PocoModel>>(page.PageContext.ViewData); 259var pageResult = Assert.IsType<PageResult>(result); 315var pageModel = Assert.IsType<TestPageModel>(instance); 316Assert.IsType<ViewDataDictionary<TestPageModel>>(pageModel.PageContext.ViewData); 319var pageResult = Assert.IsType<PageResult>(result); 320Assert.IsType<TestPage>(pageResult.Page); 348var page = Assert.IsType<TestPage>(instance); 480var pageResult = Assert.IsType<PageResult>(result); 481Assert.IsType<ViewDataDictionary<TestPage>>(pageResult.ViewData); 482Assert.IsType<TestPage>(pageResult.Model); 578var pageResult = Assert.IsType<PageResult>(result); 612var pageResult = Assert.IsType<PageResult>(result); 647var pageResult = Assert.IsType<PageResult>(result); 681var pageResult = Assert.IsType<PageResult>(result); 716var pageResult = Assert.IsType<PageResult>(result); 750var pageResult = Assert.IsType<PageResult>(result); 786var pageResult = Assert.IsType<PageResult>(result); 821var pageResult = Assert.IsType<PageResult>(result);
Infrastructure\ServiceBasedPageModelActivatorProviderTest.cs (1)
87var simpleModel2 = Assert.IsType<DISimpleModel>(model);
PageModelTest.cs (68)
59Assert.IsType<RedirectResult>(result); 76Assert.IsType<RedirectResult>(result); 93Assert.IsType<RedirectResult>(result); 140Assert.IsType<LocalRedirectResult>(result); 157Assert.IsType<LocalRedirectResult>(result); 174Assert.IsType<LocalRedirectResult>(result); 191Assert.IsType<LocalRedirectResult>(result); 282Assert.IsType<RedirectToActionResult>(resultTemporary); 298Assert.IsType<RedirectToActionResult>(resultTemporary); 314Assert.IsType<RedirectToActionResult>(resultPermanent); 330Assert.IsType<RedirectToActionResult>(resultPermanent); 349Assert.IsType<RedirectToActionResult>(resultTemporary); 369Assert.IsType<RedirectToActionResult>(resultTemporary); 389Assert.IsType<RedirectToActionResult>(resultPermanent); 409Assert.IsType<RedirectToActionResult>(resultPermanent); 429Assert.IsType<RedirectToActionResult>(resultTemporary); 453Assert.IsType<RedirectToActionResult>(resultTemporary); 477Assert.IsType<RedirectToActionResult>(resultPermanent); 501Assert.IsType<RedirectToActionResult>(resultPermanent); 522Assert.IsType<RedirectToActionResult>(resultTemporary); 542Assert.IsType<RedirectToActionResult>(resultTemporary); 565Assert.IsType<RedirectToActionResult>(result); 590Assert.IsType<RedirectToActionResult>(result); 612Assert.IsType<RedirectToActionResult>(resultPermanent); 632Assert.IsType<RedirectToActionResult>(resultPermanent); 655Assert.IsType<RedirectToActionResult>(result); 684Assert.IsType<RedirectToActionResult>(result); 706Assert.IsType<RedirectToRouteResult>(resultTemporary); 725Assert.IsType<RedirectToRouteResult>(resultTemporary); 746Assert.IsType<RedirectToRouteResult>(result); 769Assert.IsType<RedirectToRouteResult>(result); 790Assert.IsType<RedirectToRouteResult>(resultPermanent); 809Assert.IsType<RedirectToRouteResult>(resultPermanent); 830Assert.IsType<RedirectToRouteResult>(result); 853Assert.IsType<RedirectToRouteResult>(result); 872Assert.IsType<RedirectToRouteResult>(resultTemporary); 889Assert.IsType<RedirectToRouteResult>(resultTemporary); 906Assert.IsType<RedirectToRouteResult>(resultPermanent); 923Assert.IsType<RedirectToRouteResult>(resultPermanent); 969Assert.IsType<RedirectToPageResult>(result); 984Assert.IsType<RedirectToPageResult>(result); 999Assert.IsType<RedirectToPageResult>(result); 1022Assert.IsType<RedirectToPageResult>(result); 1039Assert.IsType<RedirectToPageResult>(result); 1063Assert.IsType<RedirectToPageResult>(result); 1083Assert.IsType<RedirectToPageResult>(result); 1107Assert.IsType<RedirectToPageResult>(result); 1124Assert.IsType<RedirectToPageResult>(result); 1142Assert.IsType<RedirectToPageResult>(result); 1167Assert.IsType<RedirectToPageResult>(result); 1193Assert.IsType<RedirectToPageResult>(result); 1214Assert.IsType<RedirectToPageResult>(result); 1239Assert.IsType<RedirectToPageResult>(result); 1259Assert.IsType<RedirectToPageResult>(resultPermanent); 1280Assert.IsType<RedirectToPageResult>(resultPermanent); 1301Assert.IsType<RedirectToRouteResult>(resultTemporary); 1322Assert.IsType<RedirectToRouteResult>(resultTemporary); 1343Assert.IsType<RedirectToRouteResult>(resultPermanent); 1364Assert.IsType<RedirectToRouteResult>(resultPermanent); 1502Assert.IsType<UnauthorizedResult>(result); 1516Assert.IsType<BadRequestResult>(result); 1530Assert.IsType<BadRequestObjectResult>(result); 1545Assert.IsType<NotFoundResult>(result); 1559Assert.IsType<NotFoundObjectResult>(result); 1574Assert.IsType<ContentResult>(actualContentResult); 1589Assert.IsType<ContentResult>(actualContentResult); 1605Assert.IsType<ContentResult>(actualContentResult); 1838var pageResult = Assert.IsType<PageResult>(result);
PageTest.cs (68)
62Assert.IsType<RedirectResult>(result); 79Assert.IsType<RedirectResult>(result); 96Assert.IsType<RedirectResult>(result); 113Assert.IsType<RedirectResult>(result); 160Assert.IsType<LocalRedirectResult>(result); 177Assert.IsType<LocalRedirectResult>(result); 194Assert.IsType<LocalRedirectResult>(result); 211Assert.IsType<LocalRedirectResult>(result); 302Assert.IsType<RedirectToActionResult>(resultTemporary); 318Assert.IsType<RedirectToActionResult>(resultTemporary); 334Assert.IsType<RedirectToActionResult>(resultPermanent); 350Assert.IsType<RedirectToActionResult>(resultPermanent); 369Assert.IsType<RedirectToActionResult>(resultTemporary); 389Assert.IsType<RedirectToActionResult>(resultTemporary); 409Assert.IsType<RedirectToActionResult>(resultPermanent); 429Assert.IsType<RedirectToActionResult>(resultPermanent); 449Assert.IsType<RedirectToActionResult>(resultTemporary); 473Assert.IsType<RedirectToActionResult>(resultTemporary); 497Assert.IsType<RedirectToActionResult>(resultPermanent); 521Assert.IsType<RedirectToActionResult>(resultPermanent); 542Assert.IsType<RedirectToActionResult>(resultTemporary); 562Assert.IsType<RedirectToActionResult>(resultTemporary); 585Assert.IsType<RedirectToActionResult>(result); 610Assert.IsType<RedirectToActionResult>(result); 632Assert.IsType<RedirectToActionResult>(resultPermanent); 652Assert.IsType<RedirectToActionResult>(resultPermanent); 675Assert.IsType<RedirectToActionResult>(result); 704Assert.IsType<RedirectToActionResult>(result); 726Assert.IsType<RedirectToRouteResult>(resultTemporary); 745Assert.IsType<RedirectToRouteResult>(resultTemporary); 766Assert.IsType<RedirectToRouteResult>(result); 789Assert.IsType<RedirectToRouteResult>(result); 810Assert.IsType<RedirectToRouteResult>(resultPermanent); 829Assert.IsType<RedirectToRouteResult>(resultPermanent); 850Assert.IsType<RedirectToRouteResult>(result); 873Assert.IsType<RedirectToRouteResult>(result); 892Assert.IsType<RedirectToRouteResult>(resultTemporary); 909Assert.IsType<RedirectToRouteResult>(resultTemporary); 926Assert.IsType<RedirectToRouteResult>(resultPermanent); 943Assert.IsType<RedirectToRouteResult>(resultPermanent); 963Assert.IsType<RedirectToRouteResult>(resultTemporary); 984Assert.IsType<RedirectToRouteResult>(resultTemporary); 1005Assert.IsType<RedirectToRouteResult>(resultPermanent); 1026Assert.IsType<RedirectToRouteResult>(resultPermanent); 1043Assert.IsType<RedirectToPageResult>(result); 1058Assert.IsType<RedirectToPageResult>(result); 1073Assert.IsType<RedirectToPageResult>(result); 1096Assert.IsType<RedirectToPageResult>(result); 1113Assert.IsType<RedirectToPageResult>(result); 1137Assert.IsType<RedirectToPageResult>(result); 1157Assert.IsType<RedirectToPageResult>(result); 1181Assert.IsType<RedirectToPageResult>(result); 1198Assert.IsType<RedirectToPageResult>(result); 1216Assert.IsType<RedirectToPageResult>(result); 1241Assert.IsType<RedirectToPageResult>(result); 1267Assert.IsType<RedirectToPageResult>(result); 1288Assert.IsType<RedirectToPageResult>(result); 1313Assert.IsType<RedirectToPageResult>(result); 1333Assert.IsType<RedirectToPageResult>(resultPermanent); 1354Assert.IsType<RedirectToPageResult>(resultPermanent); 1492Assert.IsType<UnauthorizedResult>(result); 1506Assert.IsType<BadRequestResult>(result); 1520Assert.IsType<BadRequestObjectResult>(result); 1535Assert.IsType<NotFoundResult>(result); 1549Assert.IsType<NotFoundObjectResult>(result); 1564Assert.IsType<ContentResult>(actualContentResult); 1579Assert.IsType<ContentResult>(actualContentResult); 1595Assert.IsType<ContentResult>(actualContentResult);
src\Mvc\Mvc.Core\test\Routing\ActionEndpointDataSourceBaseTest.cs (4)
35var endpoint = Assert.IsType<RouteEndpoint>(Assert.Single(endpoints)); 61(e) => Assert.Equal("/test", Assert.IsType<RouteEndpoint>(e).RoutePattern.RawText)); 98var routePattern = Assert.IsType<RouteEndpoint>(e).RoutePattern; 120var routePattern = Assert.IsType<RouteEndpoint>(e).RoutePattern;
Microsoft.AspNetCore.Mvc.TagHelpers.Test (9)
AnchorTagHelperTest.cs (1)
450var rvd = Assert.IsType<RouteValueDictionary>(routeValues);
CacheTagHelperTest.cs (2)
1009var cacheKey = Assert.IsType<CacheTagKey>(key); 1031var cacheKey = Assert.IsType<CacheTagKey>(key);
FormActionTagHelperTest.cs (1)
460var rvd = Assert.IsType<RouteValueDictionary>(routeContext.Values);
FormTagHelperTest.cs (2)
470var routeValueDictionary = Assert.IsType<RouteValueDictionary>(routeValues); 928var rvd = Assert.IsType<RouteValueDictionary>(routeValues);
PartialTagHelperTest.cs (1)
332var actual = Assert.IsType<PropertyModel>(v.ViewData.Model);
SelectTagHelperTest.cs (2)
622var actualCurrentValues = Assert.IsType<CurrentValues>(keyValuePair.Value); 698var actualCurrentValues = Assert.IsType<CurrentValues>(keyValuePair.Value);
Microsoft.AspNetCore.Mvc.Test (66)
MvcOptionsSetupTest.cs (59)
36Assert.IsType<RazorViewEngine>(viewEngine); 48binder => Assert.IsType<BinderTypeModelBinderProvider>(binder), 49binder => Assert.IsType<ServicesModelBinderProvider>(binder), 50binder => Assert.IsType<BodyModelBinderProvider>(binder), 51binder => Assert.IsType<HeaderModelBinderProvider>(binder), 52binder => Assert.IsType<FloatingPointTypeModelBinderProvider>(binder), 53binder => Assert.IsType<EnumTypeModelBinderProvider>(binder), 54binder => Assert.IsType<DateTimeModelBinderProvider>(binder), 55binder => Assert.IsType<SimpleTypeModelBinderProvider>(binder), 56binder => Assert.IsType<TryParseModelBinderProvider>(binder), 57binder => Assert.IsType<CancellationTokenModelBinderProvider>(binder), 58binder => Assert.IsType<ByteArrayModelBinderProvider>(binder), 59binder => Assert.IsType<FormFileModelBinderProvider>(binder), 60binder => Assert.IsType<FormCollectionModelBinderProvider>(binder), 61binder => Assert.IsType<KeyValuePairModelBinderProvider>(binder), 62binder => Assert.IsType<DictionaryModelBinderProvider>(binder), 63binder => Assert.IsType<ArrayModelBinderProvider>(binder), 64binder => Assert.IsType<CollectionModelBinderProvider>(binder), 65binder => Assert.IsType<ComplexObjectModelBinderProvider>(binder)); 77provider => Assert.IsType<FormValueProviderFactory>(provider), 78provider => Assert.IsType<RouteValueProviderFactory>(provider), 79provider => Assert.IsType<QueryStringValueProviderFactory>(provider), 80provider => Assert.IsType<JQueryFormValueProviderFactory>(provider), 81provider => Assert.IsType<FormFileValueProviderFactory>(provider)); 92formatter => Assert.IsType<HttpNoContentOutputFormatter>(formatter), 93formatter => Assert.IsType<StringOutputFormatter>(formatter), 94formatter => Assert.IsType<StreamOutputFormatter>(formatter), 95formatter => Assert.IsType<SystemTextJsonOutputFormatter>(formatter)); 107formatter => Assert.IsType<SystemTextJsonInputFormatter>(formatter)); 129validator => Assert.IsType<DefaultModelValidatorProvider>(validator), 130validator => Assert.IsType<DataAnnotationsModelValidatorProvider>(validator)); 141validator => Assert.IsType<DefaultClientModelValidatorProvider>(validator), 142validator => Assert.IsType<DataAnnotationsClientModelValidatorProvider>(validator), 143validator => Assert.IsType<NumericClientModelValidatorProvider>(validator)); 169provider => Assert.IsType<ExcludeBindingMetadataProvider>(provider), 170provider => Assert.IsType<DefaultBindingMetadataProvider>(provider), 171provider => Assert.IsType<DefaultValidationMetadataProvider>(provider), 174var specialParameter = Assert.IsType<BindingSourceMetadataProvider>(provider); 180var formFileParameter = Assert.IsType<BindingSourceMetadataProvider>(provider); 186var formCollectionParameter = Assert.IsType<BindingSourceMetadataProvider>(provider); 192var formFileParameter = Assert.IsType<BindingSourceMetadataProvider>(provider); 198var formFileParameter = Assert.IsType<BindingSourceMetadataProvider>(provider); 204var excludeFilter = Assert.IsType<SuppressChildValidationMetadataProvider>(provider); 209var excludeFilter = Assert.IsType<SuppressChildValidationMetadataProvider>(provider); 214var excludeFilter = Assert.IsType<SuppressChildValidationMetadataProvider>(provider); 219var excludeFilter = Assert.IsType<SuppressChildValidationMetadataProvider>(provider); 224var excludeFilter = Assert.IsType<SuppressChildValidationMetadataProvider>(provider); 229var excludeFilter = Assert.IsType<SuppressChildValidationMetadataProvider>(provider); 234var excludeFilter = Assert.IsType<SuppressChildValidationMetadataProvider>(provider); 239var excludeFilter = Assert.IsType<SuppressChildValidationMetadataProvider>(provider); 244var excludeFilter = Assert.IsType<SuppressChildValidationMetadataProvider>(provider); 249var excludeFilter = Assert.IsType<SuppressChildValidationMetadataProvider>(provider); 254var excludeFilter = Assert.IsType<SuppressChildValidationMetadataProvider>(provider); 259var excludeFilter = Assert.IsType<SuppressChildValidationMetadataProvider>(provider); 262provider => Assert.IsType<DataAnnotationsMetadataProvider>(provider), 263provider => Assert.IsType<DataMemberRequiredBindingMetadataProvider>(provider), 266var excludeFilter = Assert.IsType<SuppressChildValidationMetadataProvider>(provider); 271var excludeFilter = Assert.IsType<SuppressChildValidationMetadataProvider>(provider); 274provider => Assert.IsType<HasValidatorsValidationMetadataProvider>(provider));
MvcServiceCollectionExtensionsTest.cs (7)
313var manager = Assert.IsType<ApplicationPartManager>(descriptor.ImplementationInstance); 341var manager = Assert.IsType<ApplicationPartManager>(descriptor.ImplementationInstance); 367var manager = Assert.IsType<ApplicationPartManager>(descriptor.ImplementationInstance); 370feature => Assert.IsType<ControllerFeatureProvider>(feature), 371feature => Assert.IsType<ViewComponentFeatureProvider>(feature), 372feature => Assert.IsType<TagHelperFeatureProvider>(feature), 373feature => Assert.IsType<RazorCompiledItemFeatureProvider>(feature));
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (120)
Buffers\ViewBufferTest.cs (3)
265Assert.Equal("Hello", Assert.IsType<HtmlString>(nestedItems[0]).Value); 266Assert.Equal("Hello", Assert.IsType<HtmlString>(destinationItems[0]).Value); 289Assert.Equal("Hello", Assert.IsType<HtmlString>(destinationItems[0]).Value);
ControllerTest.cs (13)
77Assert.IsType<ViewResult>(actualViewResult); 101Assert.IsType<ViewResult>(actualViewResult); 122Assert.IsType<ViewResult>(actualViewResult); 144Assert.IsType<ViewResult>(actualViewResult); 166Assert.IsType<ViewResult>(actualViewResult); 188Assert.IsType<ViewResult>(actualViewResult); 212Assert.IsType<PartialViewResult>(actualViewResult); 235Assert.IsType<PartialViewResult>(actualViewResult); 257Assert.IsType<PartialViewResult>(actualViewResult); 279Assert.IsType<PartialViewResult>(actualViewResult); 301Assert.IsType<PartialViewResult>(actualViewResult); 319Assert.IsType<JsonResult>(actualJsonResult); 335Assert.IsType<JsonResult>(actualJsonResult);
ControllerUnitTestabilityTests.cs (34)
29var viewResult = Assert.IsType<ViewResult>(result); 51var viewResult = Assert.IsType<PartialViewResult>(result); 75var contentResult = Assert.IsType<ContentResult>(result); 96var createdResult = Assert.IsType<CreatedResult>(result); 116var acceptedResult = Assert.IsType<AcceptedResult>(result); 137var fileContentResult = Assert.IsType<FileContentResult>(result); 170var fileStreamResult = Assert.IsType<FileStreamResult>(result); 200var jsonResult = Assert.IsType<JsonResult>(result); 203Assert.IsType<MyModel>(jsonResult.Value); 214jsonResult = Assert.IsType<JsonResult>(result); 232var jsonResult = Assert.IsType<JsonResult>(result); 235Assert.IsType<MyModel>(jsonResult.Value); 250var httpNotFoundResult = Assert.IsType<NotFoundResult>(result); 266var httpNotFoundObjectResult = Assert.IsType<NotFoundObjectResult>(result); 283var httpBadRequest = Assert.IsType<BadRequestResult>(result); 300var httpBadRequest = Assert.IsType<BadRequestObjectResult>(result); 313httpBadRequest = Assert.IsType<BadRequestObjectResult>(result); 333var createdAtRouteResult = Assert.IsType<CreatedAtRouteResult>(result); 348createdAtRouteResult = Assert.IsType<CreatedAtRouteResult>(result); 369var acceptedAtRouteResult = Assert.IsType<AcceptedAtRouteResult>(result); 384acceptedAtRouteResult = Assert.IsType<AcceptedAtRouteResult>(result); 406var createdAtActionResult = Assert.IsType<CreatedAtActionResult>(result); 422createdAtActionResult = Assert.IsType<CreatedAtActionResult>(result); 445var acceptedAtActionResult = Assert.IsType<AcceptedAtActionResult>(result); 461acceptedAtActionResult = Assert.IsType<AcceptedAtActionResult>(result); 482var redirectToRouteResult = Assert.IsType<RedirectToRouteResult>(result); 496redirectToRouteResult = Assert.IsType<RedirectToRouteResult>(result); 516var redirectToActionResult = Assert.IsType<RedirectToActionResult>(result); 531redirectToActionResult = Assert.IsType<RedirectToActionResult>(result); 550var redirectResult = Assert.IsType<RedirectResult>(result); 693var badRequest = Assert.IsType<ObjectResult>(result); 694var problemDetails = Assert.IsType<ProblemDetails>(badRequest.Value); 710var badRequest = Assert.IsType<ObjectResult>(result); 711var validationProblemDetails = Assert.IsType<ValidationProblemDetails>(badRequest.Value);
Filters\AntiforgeryApplicationModelProviderTest.cs (2)
31Assert.IsType<AntiforgeryMiddlewareAuthorizationFilter>(Assert.Single(model.Filters)); 36Assert.IsType<ValidateAntiForgeryTokenAttribute>(Assert.Single(model.Filters));
Filters\AntiforgeryMiddlewareAuthorizationFilterTest.cs (1)
29Assert.IsType<AntiforgeryValidationFailedResult>(context.Result);
Filters\ControllerSaveTempDataPropertyFilterFactoryTest.cs (1)
23var tempDataFilter = Assert.IsType<ControllerSaveTempDataPropertyFilter>(filter);
Filters\ControllerViewDataAttributeFilterFactoryTest.cs (1)
25var filter = Assert.IsType<ControllerViewDataAttributeFilter>(result);
Filters\TempDataApplicationModelProviderTest.cs (2)
76var filter = Assert.IsType<ControllerSaveTempDataPropertyFilterFactory>(Assert.Single(controller.Filters)); 97var filter = Assert.IsType<ControllerSaveTempDataPropertyFilterFactory>(Assert.Single(controller.Filters));
Filters\ValidateAntiforgeryTokenAuthorizationFilterTest.cs (1)
96Assert.IsType<AntiforgeryValidationFailedResult>(context.Result);
Filters\ViewDataAttributeApplicationModelProviderTest.cs (2)
42Assert.IsType<ControllerViewDataAttributeFilterFactory>(Assert.Single(controller.Filters)); 56var filter = Assert.IsType<ControllerViewDataAttributeFilterFactory>(Assert.Single(controller.Filters));
HtmlAttributePropertyHelperTest.cs (1)
104Assert.IsType<HtmlAttributePropertyHelper>(helpers1[0]);
Infrastructure\DefaultTempDataSerializerTest.cs (1)
30var roundTripValue = Assert.IsType<string>(values[key]);
Infrastructure\TempDataSerializerTestBase.cs (12)
64var roundTripValue = Assert.IsType<int>(values[key]); 107var roundTripValue = Assert.IsType<string>(values[key]); 149var roundTripValue = Assert.IsType<DateTime>(values[key]); 170var roundTripValue = Assert.IsType<Guid>(values[key]); 192var roundTripValue = Assert.IsType<string>(values[key]); 214var roundTripValue = Assert.IsType<string>(values[key]); 236var roundTripValue = Assert.IsType<Guid>(values[key]); 257var roundTripValue = Assert.IsType<int[]>(values[key]); 278var roundTripValue = Assert.IsType<string[]>(values[key]); 299var roundTripValue = Assert.IsType<string[]>(values[key]); 324var roundTripValue = Assert.IsType<Dictionary<string, string>>(values[key]); 349var roundTripValue = Assert.IsType<Dictionary<string, int>>(values[key]);
PageRemoteAttributeTest.cs (1)
54var routeDictionary = Assert.IsType<RouteValueDictionary>(urlHelper.RouteValues);
RemoteAttributeTest.cs (3)
169var routeDictionary = Assert.IsType<RouteValueDictionary>(urlHelper.RouteValues); 188var routeDictionary = Assert.IsType<RouteValueDictionary>(urlHelper.RouteValues); 209var routeDictionary = Assert.IsType<RouteValueDictionary>(urlHelper.RouteValues);
Rendering\HtmlHelperFormTest.cs (1)
591Assert.Equal("antiforgery", Assert.IsType<TagBuilder>(htmlHelper.AntiForgeryToken()).TagName);
Rendering\HtmlHelperTest.cs (1)
302Assert.IsType<ViewDataDictionary<BaseModel>>(
Rendering\JsonHelperTestBase.cs (6)
27var htmlString = Assert.IsType<HtmlString>(result); 42var htmlString = Assert.IsType<HtmlString>(result); 61var htmlString = Assert.IsType<HtmlString>(result); 80var htmlString = Assert.IsType<HtmlString>(result); 99var htmlString = Assert.IsType<HtmlString>(result); 118var htmlString = Assert.IsType<HtmlString>(result);
Rendering\SystemTextJsonHelperTest.cs (3)
34var htmlString = Assert.IsType<HtmlString>(result); 53var htmlString = Assert.IsType<HtmlString>(result); 85var htmlString = Assert.IsType<HtmlString>(result);
ViewComponents\DefaultViewComponentFactoryTest.cs (1)
29var activablePropertiesComponent = Assert.IsType<ActivablePropertiesViewComponent>(result);
ViewComponents\DefaultViewComponentHelperTest.cs (7)
26Assert.IsType<Dictionary<string, object>>(argumentDictionary); 44Assert.IsType<int>(item.Value); 64Assert.IsType<int>(item.Value); 84Assert.IsType<int>(item1.Value); 90Assert.IsType<string>(item2.Value); 111Assert.IsType<object>(item.Value); 135Assert.IsType<int>(item.Value);
ViewComponentTests.cs (15)
61Assert.IsType<ContentViewComponentResult>(actualResult); 75Assert.IsType<ViewViewComponentResult>(actualResult); 94Assert.IsType<ViewViewComponentResult>(actualResult); 111Assert.IsType<ViewViewComponentResult>(actualResult); 112Assert.IsType<ViewDataDictionary<object>>(actualResult.ViewData); 131Assert.IsType<ViewViewComponentResult>(actualResult); 132Assert.IsType<ViewDataDictionary<object>>(actualResult.ViewData); 151Assert.IsType<ViewViewComponentResult>(actualResult); 152Assert.IsType<ViewDataDictionary<object>>(actualResult.ViewData); 170Assert.IsType<ViewViewComponentResult>(actualResult); 171Assert.IsType<ViewDataDictionary<object>>(actualResult.ViewData); 189Assert.IsType<ViewViewComponentResult>(actualResult); 190Assert.IsType<ViewDataDictionary<string>>(actualResult.ViewData); 209Assert.IsType<ViewViewComponentResult>(actualResult); 210Assert.IsType<ViewDataDictionary<object>>(actualResult.ViewData);
ViewDataDictionaryOfTModelTest.cs (5)
57Assert.IsType<CopyOnWriteDictionary<string, object>>(viewData1.Data); 69Assert.IsType<CopyOnWriteDictionary<string, object>>(viewData2.Data); 96Assert.IsType<CopyOnWriteDictionary<string, object>>(viewData1.Data); 108Assert.IsType<CopyOnWriteDictionary<string, object>>(viewData2.Data); 176Assert.IsType<CopyOnWriteDictionary<string, object>>(viewData.Data);
ViewDataDictionaryTest.cs (3)
211Assert.IsType<CopyOnWriteDictionary<string, object>>(viewData.Data); 365var model = Assert.IsType<bool>(viewData.Model); 391var model = Assert.IsType<bool>(viewData.Model);
Microsoft.AspNetCore.OpenApi.Tests (19)
Extensions\OpenApiRouteHandlerBuilderExtensionTests.cs (1)
249return Assert.IsType<RouteEndpointDataSource>(Assert.Single(endpointRouteBuilder.DataSources));
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (3)
630var openApiString = Assert.IsType<OpenApiString>(value); 635var openApiString = Assert.IsType<OpenApiString>(value); 640var openApiString = Assert.IsType<OpenApiString>(value);
Transformers\OpenApiOptionsTests.cs (15)
25Assert.IsType<DelegateOpenApiDocumentTransformer>(insertedTransformer); 26Assert.IsType<OpenApiOptions>(result); 44Assert.IsType<OpenApiOptions>(result); 60Assert.IsType<TypeBasedOpenApiDocumentTransformer>(insertedTransformer); 61Assert.IsType<OpenApiOptions>(result); 82Assert.IsType<DelegateOpenApiOperationTransformer>(insertedTransformer); 83Assert.IsType<OpenApiOptions>(result); 101Assert.IsType<OpenApiOptions>(result); 117Assert.IsType<TypeBasedOpenApiOperationTransformer>(insertedTransformer); 118Assert.IsType<OpenApiOptions>(result); 139Assert.IsType<DelegateOpenApiSchemaTransformer>(insertedTransformer); 140Assert.IsType<OpenApiOptions>(result); 158Assert.IsType<OpenApiOptions>(result); 174Assert.IsType<TypeBasedOpenApiSchemaTransformer>(insertedTransformer); 175Assert.IsType<OpenApiOptions>(result);
Microsoft.AspNetCore.Razor.Test (12)
TagHelpers\DefaultTagHelperContentTest.cs (12)
118Assert.Equal("some-content", Assert.IsType<string>(items[0])); 119Assert.Equal("hello", Assert.IsType<HtmlString>(items[1]).Value); 120Assert.Equal("Test", Assert.IsType<string>(items[2])); 144Assert.Equal("some-content", Assert.IsType<string>(items[0])); 145Assert.Equal("hello", Assert.IsType<HtmlString>(items[1]).Value); 146Assert.Equal("Test", Assert.IsType<string>(items[2])); 168Assert.Equal("some-content", Assert.IsType<string>(items[0])); 169Assert.Equal("hello", Assert.IsType<HtmlString>(items[1]).Value); 170Assert.Equal("Test", Assert.IsType<string>(items[2])); 196Assert.Equal("some-content", Assert.IsType<string>(items[0])); 197Assert.Equal("hello", Assert.IsType<HtmlString>(items[1]).Value); 198Assert.Equal("Test", Assert.IsType<string>(items[2]));
Microsoft.AspNetCore.RequestDecompression.Tests (3)
RequestDecompressionOptionsTests.cs (3)
22Assert.IsType<BrotliDecompressionProvider>(brotliProvider); 25Assert.IsType<DeflateDecompressionProvider>(deflateProvider); 28Assert.IsType<GZipDecompressionProvider>(gzipProvider);
Microsoft.AspNetCore.Routing.Tests (150)
Builder\GroupTest.cs (6)
35var routeEndpoint = Assert.IsType<RouteEndpoint>(endpoint); 67var routeEndpoint = Assert.IsType<RouteEndpoint>(endpoint); 101var routeEndpoint = Assert.IsType<RouteEndpoint>(endpoint); 251var routeEndpoint = Assert.IsType<RouteEndpoint>(endpoint); 296var routeEndpoint = Assert.IsType<RouteEndpoint>(endpoint); 382var prefixedEndpoint = Assert.IsType<RouteEndpoint>(Assert.Single(groupDataSource.Endpoints));
Builder\OpenApiRouteHandlerBuilderExtensionsTest.cs (9)
20=> Assert.IsType<ExcludeFromDescriptionAttribute>(Assert.Single(builder.Metadata)); 33var tags = Assert.IsType<TagsAttribute>(Assert.Single(builder.Metadata)); 51var metadata = Assert.IsType<ProducesResponseTypeMetadata>(Assert.Single(testBuilder.Metadata)); 65var metadata = Assert.IsType<ProducesResponseTypeMetadata>(Assert.Single(testBuilder.Metadata)); 79var metadata = Assert.IsType<ProducesResponseTypeMetadata>(Assert.Single(builder.Metadata)); 97var metadata = Assert.IsType<ProducesResponseTypeMetadata>(Assert.Single(builder.Metadata)); 114var metadata = Assert.IsType<AcceptsMetadata>(Assert.Single(testBuilder.Metadata)); 127var metadata = Assert.IsType<EndpointDescriptionAttribute>(Assert.Single(builder.Metadata)); 137var metadata = Assert.IsType<EndpointSummaryAttribute>(Assert.Single(builder.Metadata));
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (3)
256Assert.IsType<EmptyHttpResult>(response); 378Assert.IsType<Attribute1>(endpointBuilder1.Metadata[0]); 379Assert.IsType<Attribute2>(endpointBuilder1.Metadata[1]);
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (2)
22return Assert.IsType<RouteEndpointDataSource>(Assert.Single(endpointRouteBuilder.DataSources)); 892var routeEndpoint = Assert.IsType<RouteEndpoint>(endpoint);
Builder\RoutingEndpointConventionBuilderExtensionsTest.cs (1)
27var hostMetadata = Assert.IsType<HostAttribute>(Assert.Single(endpointModel.Metadata));
CompositeEndpointDataSourceTest.cs (16)
166var token = Assert.IsType<CancellationChangeToken>(changeToken1); 179token = Assert.IsType<CancellationChangeToken>(changeToken2); 193token = Assert.IsType<CancellationChangeToken>(changeToken3); 206var token = Assert.IsType<CancellationChangeToken>(changeToken1); 218token = Assert.IsType<CancellationChangeToken>(changeToken2); 229token = Assert.IsType<CancellationChangeToken>(changeToken3); 242var token = Assert.IsType<CancellationChangeToken>(changeToken1); 253token = Assert.IsType<CancellationChangeToken>(changeToken2); 265token = Assert.IsType<CancellationChangeToken>(changeToken3); 309var resolvedEndpoint = Assert.IsType<RouteEndpoint>(Assert.Single(groupedEndpoints)); 358var endpoint = Assert.IsType<RouteEndpoint>(endpoint1); 365var endpoint = Assert.IsType<RouteEndpoint>(endpoint2); 413var endpoint = Assert.IsType<RouteEndpoint>(endpoint1); 420var endpoint = Assert.IsType<RouteEndpoint>(endpoint2); 479var endpoint = Assert.IsType<RouteEndpoint>(endpoint1); 486var endpoint = Assert.IsType<RouteEndpoint>(endpoint2);
DefaultInlineConstraintResolverTest.cs (23)
31Assert.IsType<RequiredRouteConstraint>(constraint); 41Assert.IsType<IntRouteConstraint>(constraint); 63Assert.IsType<AlphaRouteConstraint>(constraint); 73Assert.IsType<RegexInlineRouteConstraint>(constraint); 84Assert.IsType<RegexInlineRouteConstraint>(constraint); 94Assert.IsType<BoolRouteConstraint>(constraint); 111Assert.IsType<DateTimeRouteConstraint>(constraint); 121Assert.IsType<DecimalRouteConstraint>(constraint); 131Assert.IsType<DoubleRouteConstraint>(constraint); 141Assert.IsType<FloatRouteConstraint>(constraint); 151Assert.IsType<GuidRouteConstraint>(constraint); 161Assert.IsType<IntRouteConstraint>(constraint); 171Assert.IsType<LengthRouteConstraint>(constraint); 183var lengthConstraint = Assert.IsType<LengthRouteConstraint>(constraint); 195Assert.IsType<LongRouteConstraint>(constraint); 205Assert.IsType<MaxRouteConstraint>(constraint); 216Assert.IsType<MaxLengthRouteConstraint>(constraint); 227Assert.IsType<MinRouteConstraint>(constraint); 238Assert.IsType<MinLengthRouteConstraint>(constraint); 249Assert.IsType<RangeRouteConstraint>(constraint); 267Assert.IsType<CustomRouteConstraint>(constraint); 282Assert.IsType<CustomRouteConstraint>(constraint); 307Assert.IsType<CustomRouteConstraint>(constraint);
DefaultParameterPolicyFactoryTest.cs (20)
68Assert.IsType<IntRouteConstraint>(parameterPolicy); 87var optionalConstraint = Assert.IsType<OptionalRouteConstraint>(parameterPolicy); 88Assert.IsType<IntRouteConstraint>(optionalConstraint.InnerConstraint); 107Assert.IsType<IntRouteConstraint>(parameterPolicy); 126var optionalConstraint = Assert.IsType<OptionalRouteConstraint>(parameterPolicy); 127Assert.IsType<IntRouteConstraint>(optionalConstraint.InnerConstraint); 146Assert.IsType<CustomParameterPolicy>(parameterPolicy); 159Assert.IsType<IntRouteConstraint>(parameterPolicy); 172var constraint = Assert.IsType<RangeRouteConstraint>(parameterPolicy); 187var optionalConstraint = Assert.IsType<OptionalRouteConstraint>(parameterPolicy); 188Assert.IsType<IntRouteConstraint>(optionalConstraint.InnerConstraint); 207Assert.IsType<CustomParameterPolicy>(parameterPolicy); 226var constraint = Assert.IsType<CustomParameterPolicyWithArguments>(parameterPolicy); 247var constraint = Assert.IsType<CustomParameterPolicyWithMultipleArguments>(parameterPolicy); 270var constraint = Assert.IsType<CustomParameterPolicyWithOnlyServiceArguments>(parameterPolicy); 291var constraint = Assert.IsType<CustomParameterPolicyWithMultipleCtors>(parameterPolicy); 312var constraint = Assert.IsType<CustomParameterPolicyWithMultipleCtorsInAscendingOrder>(parameterPolicy); 355var constraint = Assert.IsType<RegexInlineRouteConstraintWithService>(parameterPolicy); 376var inner = Assert.IsType<InvalidOperationException>(exception.InnerException); 396Assert.IsType<CustomParameterPolicy>(parameterPolicy);
EndpointRoutingMiddlewareFormOptionsTest.cs (4)
47var formOptions = Assert.IsType<FormFeature>(formFeature).FormOptions; 81var formOptions = Assert.IsType<FormFeature>(formFeature).FormOptions; 119var formOptions = Assert.IsType<FormFeature>(formFeature).FormOptions; 155var formOptions = Assert.IsType<FormFeature>(formFeature).FormOptions;
Matching\ContentEncodingNegotiationMatcherPolicyTest.cs (8)
361e => Assert.Equal("gzip", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.State).NegotiationValue), 362e => Assert.Equal("br", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.State).NegotiationValue), 365Assert.Equal("identity", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.State).NegotiationValue); 371Assert.Equal("", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.State).NegotiationValue); 396Assert.Equal("gzip", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.State).NegotiationValue); 403Assert.Equal("br", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.State).NegotiationValue); 410Assert.Equal("identity", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.State).NegotiationValue); 416Assert.Equal("", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.State).NegotiationValue);
Matching\DataSourceDependentMatcherTest.cs (6)
23var inner = Assert.IsType<TestMatcher>(matcher.CurrentMatcher); 48var inner = Assert.IsType<TestMatcher>(matcher.CurrentMatcher); 75var inner = Assert.IsType<TestMatcher>(matcher.CurrentMatcher); 92var inner = Assert.IsType<TestMatcher>(matcher.CurrentMatcher); 114var inner = Assert.IsType<TestMatcher>(matcher.CurrentMatcher); 136var inner = Assert.IsType<TestMatcher>(matcher.CurrentMatcher);
Matching\DfaMatcherTest.cs (1)
58return Assert.IsType<DataSourceDependentMatcher>(factory.CreateMatcher(dataSource));
Patterns\RoutePatternFactoryTest.cs (15)
156c => Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy), 160c => Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy)); 169c => Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy), 177c => Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy)); 206c => Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy)); 213c => Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy)); 242c => Assert.Equal("foo", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString()), 243c => Assert.Equal("bar", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString()), 244c => Assert.Equal("^(baz)$", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString())); 280c => Assert.Equal("^(fizz)$", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString())); 287c => Assert.Equal("foo", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString()), 288c => Assert.Equal("bar", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString()), 289c => Assert.Equal("^(baz)$", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString()), 374var regex = Assert.IsType<RegexRouteConstraint>(Assert.Single(kvp.Value).ParameterPolicy); 741var part = Assert.IsType<RoutePatternLiteralPart>(Assert.Single(segment.Parts));
RouteConstraintBuilderTest.cs (6)
29Assert.IsType<RegexRouteConstraint>(Assert.Single(result).Value); 69Assert.IsType<IntRouteConstraint>(kvp.Value); 112Assert.IsType<OptionalRouteConstraint>(Assert.Single(result).Value); 125Assert.IsType<OptionalRouteConstraint>(Assert.Single(result).Value); 140Assert.IsType<OptionalRouteConstraint>(Assert.Single(result).Value); 142var compositeConstraint = Assert.IsType<CompositeRouteConstraint>(optionalConstraint.InnerConstraint);
RouteEndpointBuilderTest.cs (6)
40var endpoint = Assert.IsType<RouteEndpoint>(builder.Build()); 62var endpoint = Assert.IsType<RouteEndpoint>(builder.Build()); 92var endpoint = Assert.IsType<RouteEndpoint>(builder.Build()); 112var endpoint = Assert.IsType<RouteEndpoint>(builder.Build()); 133var endpoint = Assert.IsType<RouteEndpoint>(builder.Build()); 167var endpoint = Assert.IsType<RouteEndpoint>(builder.Build());
RouteTest.cs (12)
193Assert.IsType<OptionalRouteConstraint>(route.Constraints["id"]); 235Assert.IsType<RegexInlineRouteConstraint>(route.Constraints["ssn"]); 277Assert.IsType<OptionalRouteConstraint>(route.Constraints["id"]); 320Assert.IsType<OptionalRouteConstraint>(route.Constraints["id"]); 322Assert.IsType<CompositeRouteConstraint>(innerConstraint); 369Assert.IsType<OptionalRouteConstraint>(route.Constraints["id"]); 480Assert.Equal("Home", Assert.IsType<string>(value.Value)); 1643Assert.IsType<RegexRouteConstraint>(constraints["controller"]); 1663Assert.IsType<CompositeRouteConstraint>(constraint); 1664Assert.IsType<RegexRouteConstraint>(constraint.Constraints.ElementAt(0)); 1665Assert.IsType<IntRouteConstraint>(constraint.Constraints.ElementAt(1)); 1683Assert.IsType<IntRouteConstraint>(constraints["id"]);
RouteValuesAddressSchemeTest.cs (5)
88var actual = Assert.IsType<RouteEndpoint>(match.Entry.Data); 131actual = Assert.IsType<RouteEndpoint>(m.Entry.Data); 136actual = Assert.IsType<RouteEndpoint>(m.Entry.Data); 141actual = Assert.IsType<RouteEndpoint>(m.Entry.Data); 146actual = Assert.IsType<RouteEndpoint>(m.Entry.Data);
RoutingServiceCollectionExtensionsTests.cs (3)
24Assert.IsType<ArgumentNullException>(ex); 38Assert.IsType<ArgumentNullException>(ex); 50Assert.IsType<ArgumentNullException>(ex);
Template\TemplateSegmentTest.cs (4)
37Assert.IsType<RoutePatternParameterPart>(routePatternPathSegment.Parts[0]); 39Assert.IsType<RoutePatternLiteralPart>(routePatternPathSegment.Parts[1]); 41Assert.IsType<RoutePatternSeparatorPart>(routePatternPathSegment.Parts[2]); 43Assert.IsType<RoutePatternParameterPart>(routePatternPathSegment.Parts[3]);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (5)
Http3Tests.cs (4)
177var qex = Assert.IsType<QuicException>(ex.InnerException); 210var qex = Assert.IsType<QuicException>(ex.InnerException?.InnerException?.InnerException); 236var qex = Assert.IsType<QuicException>(ex.InnerException?.InnerException?.InnerException); 257var qex = Assert.IsType<QuicException>(ex.InnerException);
RequestTests.cs (1)
83Assert.IsType<MemoryStream>(requestInfo.Body);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (15)
AddressBinderTests.cs (11)
57Assert.IsType<AnyIPListenOptions>(listenOptions); 58Assert.IsType<IPEndPoint>(listenOptions.EndPoint); 68Assert.IsType<LocalhostListenOptions>(listenOptions); 69Assert.IsType<IPEndPoint>(listenOptions.EndPoint); 81Assert.IsType<IPEndPoint>(listenOptions.EndPoint); 91Assert.IsType<NamedPipeEndPoint>(listenOptions.EndPoint); 102Assert.IsType<NamedPipeEndPoint>(listenOptions.EndPoint); 113Assert.IsType<NamedPipeEndPoint>(listenOptions.EndPoint); 124Assert.IsType<UnixDomainSocketEndPoint>(listenOptions.EndPoint); 135Assert.IsType<UnixDomainSocketEndPoint>(listenOptions.EndPoint); 149Assert.IsType<IPEndPoint>(listenOptions.EndPoint);
ConnectionDispatcherTests.cs (1)
68Assert.IsType<InvalidOperationException>(critical.Exception);
ListenOptionsTests.cs (1)
72Assert.IsType<UriEndPoint>(listenOptions.EndPoint);
MessageBodyTests.cs (1)
380Assert.IsType<OverflowException>(ex.InnerException);
src\Shared\test\Shared.Tests\runtime\Http2\HPackDecoderTest.cs (1)
903Assert.IsType<HuffmanDecodingException>(exception.InnerException);
Microsoft.AspNetCore.Server.Kestrel.Tests (4)
WebHostBuilderKestrelExtensionsTests.cs (4)
67t => Assert.IsType<SocketTransportFactory>(t), 68t => Assert.IsType<NamedPipeTransportFactory>(t)); 73t => Assert.IsType<SocketTransportFactory>(t)); 110Assert.IsType<KestrelServerImpl>(hostBuilder.Build().Services.GetService<IServer>());
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (3)
QuicConnectionContextTests.cs (2)
139var innerEx = Assert.IsType<QuicException>(ex.InnerException); 644var quicStreamContext = Assert.IsType<QuicStreamContext>(serverStream);
QuicTestHelpers.cs (1)
167var quicStreamContext = Assert.IsType<QuicStreamContext>(serverStream);
Microsoft.AspNetCore.Shared.Tests (56)
AdaptiveCapacityDictionaryTests.cs (47)
138Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 155Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 172Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 199Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 219Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 236Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 253Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 283Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 297Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 314Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 328Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 345Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 359Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 392Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 413Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 434Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 454Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 484Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 504Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 523Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 542Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 562Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 605Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 622Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 639Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 664Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 684Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 704Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 724Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 745Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 789Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 807Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 825Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 872Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 892Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 912Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 937Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 962Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 987Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1127Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1145Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1163Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1176var storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1206var storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1236var storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1266var storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1273storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage);
ObjectMethodExecutorTest.cs (8)
50var resultObject = Assert.IsType<TestObject>(result); 63var resultObject = Assert.IsType<TestObject>(result); 98var resultObject = Assert.IsType<TestObject>(result); 111var resultObject = Assert.IsType<TestObject>(result); 206Assert.IsType<TestObject>(result); 223Assert.IsType<int>(result); 373Assert.IsType<InvalidOperationException>(exception.InnerException); 406Assert.IsType<InvalidOperationException>(exception.InnerException);
runtime\Http2\HPackDecoderTest.cs (1)
903Assert.IsType<HuffmanDecodingException>(exception.InnerException);
Microsoft.AspNetCore.SignalR.Client.Tests (13)
HttpConnectionTests.ConnectionLifecycle.cs (1)
451Assert.IsType<OperationCanceledException>(innerInnerEx);
HubConnectionBuilderExtensionsTests.cs (2)
110Assert.IsType<NewtonsoftJsonHubProtocol>(resolvedHubProtocol); 123Assert.IsType<MessagePackHubProtocol>(resolvedHubProtocol);
HubConnectionBuilderTests.cs (4)
41var actualProtocol = Assert.IsType<NewtonsoftJsonHubProtocol>(serviceProvider.GetService<IHubProtocol>()); 42Assert.IsType<CamelCasePropertyNamesContractResolver>(actualProtocol.PayloadSerializer.ContractResolver); 56var actualProtocol = Assert.IsType<NewtonsoftJsonHubProtocol>(serviceProvider.GetService<IHubProtocol>()); 78Assert.IsType<MessagePackHubProtocol>(serviceProvider.GetService<IHubProtocol>());
HubConnectionTests.cs (1)
367var exception = Assert.IsType<TimeoutException>(await closeTcs.Task.DefaultTimeout());
HubConnectionTests.Reconnect.cs (5)
265Assert.IsType<OperationCanceledException>(closeError); 356Assert.IsType<OperationCanceledException>(closeError); 930Assert.IsType<HubException>(retryContexts[1].RetryReason); 1036Assert.IsType<OperationCanceledException>(await closedErrorTcs.Task.DefaultTimeout()); 1111Assert.IsType<OperationCanceledException>(await closedErrorTcs.Task.DefaultTimeout());
Microsoft.AspNetCore.SignalR.Common.Tests (22)
Internal\Protocol\JsonHubProtocolTests.cs (3)
133var invocationMessage = Assert.IsType<InvocationMessage>(message); 166var streamItemMessage = Assert.IsType<StreamItemMessage>(message); 199var completionMessage = Assert.IsType<CompletionMessage>(message);
Internal\Protocol\JsonHubProtocolTestsBase.cs (12)
208Assert.IsType<InvocationMessage>(message); 257var bindingFailure = Assert.IsType<InvocationBindingFailureMessage>(message); 281var invocationMessage = Assert.IsType<InvocationMessage>(message); 284var dt = Assert.IsType<DateTime>(invocationMessage.Arguments[0]); 296var invocationMessage = Assert.IsType<CompletionMessage>(message); 298var dt = Assert.IsType<DateTime>(invocationMessage.Result); 308var bindingFailure = Assert.IsType<InvocationBindingFailureMessage>(message); 322var streamItemMessage = Assert.IsType<StreamItemMessage>(message); 443var completion = Assert.IsType<CompletionMessage>(message); 457completion = Assert.IsType<CompletionMessage>(message); 476var completion = Assert.IsType<CompletionMessage>(hubMessage); 492var completion = Assert.IsType<CompletionMessage>(hubMessage);
Internal\Protocol\MessagePackHubProtocolTestBase.cs (1)
398var bindingFailure = Assert.IsType<InvocationBindingFailureMessage>(message);
Internal\Protocol\MessagePackHubProtocolTests.cs (6)
40var completionMessage = Assert.IsType<CompletionMessage>(hubMessage); 69var completionMessage = Assert.IsType<CompletionMessage>(hubMessage); 223var completion = Assert.IsType<CompletionMessage>(message); 237completion = Assert.IsType<CompletionMessage>(message); 254var completion = Assert.IsType<CompletionMessage>(hubMessage); 267var completion = Assert.IsType<CompletionMessage>(hubMessage);
Microsoft.AspNetCore.SignalR.Specification.Tests (19)
HubLifetimeManagerTestBase.cs (12)
48var message = Assert.IsType<InvocationMessage>(await client1.ReadAsync().DefaultTimeout()); 53message = Assert.IsType<InvocationMessage>(await client2.ReadAsync().DefaultTimeout()); 81var message = Assert.IsType<InvocationMessage>(await client1.ReadAsync().DefaultTimeout()); 111var message = Assert.IsType<InvocationMessage>(await client1.ReadAsync().DefaultTimeout()); 142var message = Assert.IsType<InvocationMessage>(await client1.ReadAsync().DefaultTimeout()); 167var message = Assert.IsType<InvocationMessage>(await client.ReadAsync().DefaultTimeout()); 190var invocation = Assert.IsType<InvocationMessage>(await client1.ReadAsync().DefaultTimeout()); 217var invocation = Assert.IsType<InvocationMessage>(await client1.ReadAsync().DefaultTimeout()); 247var invocation = Assert.IsType<InvocationMessage>(await client1.ReadAsync().DefaultTimeout()); 305var invocation1 = Assert.IsType<InvocationMessage>(await client1.ReadAsync().DefaultTimeout()); 306var invocation2 = Assert.IsType<InvocationMessage>(await client2.ReadAsync().DefaultTimeout()); 359var invocation1 = Assert.IsType<InvocationMessage>(await client1.ReadAsync().DefaultTimeout());
ScaleoutHubLifetimeManagerTests.cs (7)
32var message = Assert.IsType<InvocationMessage>(await client.ReadAsync().DefaultTimeout()); 486var invocation = Assert.IsType<InvocationMessage>(await client1.ReadAsync().DefaultTimeout()); 517var invocation = Assert.IsType<InvocationMessage>(await client1.ReadAsync().DefaultTimeout()); 569var invocation = Assert.IsType<InvocationMessage>(await client1.ReadAsync().DefaultTimeout()); 598var invocation2 = Assert.IsType<InvocationMessage>(await client.ReadAsync().DefaultTimeout()); 601var invocation1 = Assert.IsType<InvocationMessage>(await client.ReadAsync().DefaultTimeout()); 649var invocation = Assert.IsType<InvocationMessage>(await client1.ReadAsync().DefaultTimeout());
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (4)
RedisDependencyInjectionExtensionsTests.cs (1)
34var dnsEndpoint = Assert.IsType<DnsEndPoint>(endpoint);
RedisHubLifetimeManagerTests.cs (2)
72var message = Assert.IsType<InvocationMessage>(await client2.ReadAsync().DefaultTimeout()); 78var dict = Assert.IsType<JObject>(arg0);
RedisProtocolTests.cs (1)
165var invocation = Assert.IsType<InvocationMessage>(actualMessage);
Microsoft.AspNetCore.SignalR.Tests (144)
AddSignalRTests.cs (14)
40Assert.IsType<CustomIdProvider>(serviceProvider.GetRequiredService<IUserIdProvider>()); 41Assert.IsType<CustomHubLifetimeManager<CustomHub>>(serviceProvider.GetRequiredService<HubLifetimeManager<CustomHub>>()); 42Assert.IsType<CustomHubProtocolResolver>(serviceProvider.GetRequiredService<IHubProtocolResolver>()); 43Assert.IsType<CustomHubActivator<CustomHub>>(serviceProvider.GetRequiredService<IHubActivator<CustomHub>>()); 44Assert.IsType<CustomHubContext<CustomHub>>(serviceProvider.GetRequiredService<IHubContext<CustomHub>>()); 45Assert.IsType<CustomHubContext<CustomTHub, string>>(serviceProvider.GetRequiredService<IHubContext<CustomTHub, string>>()); 46Assert.IsType<CustomHubContext<CustomDynamicHub>>(serviceProvider.GetRequiredService<IHubContext<CustomDynamicHub>>()); 65Assert.IsType<CustomIdProvider>(serviceProvider.GetRequiredService<IUserIdProvider>()); 66Assert.IsType<CustomHubLifetimeManager<CustomHub>>(serviceProvider.GetRequiredService<HubLifetimeManager<CustomHub>>()); 67Assert.IsType<CustomHubProtocolResolver>(serviceProvider.GetRequiredService<IHubProtocolResolver>()); 68Assert.IsType<CustomHubActivator<CustomHub>>(serviceProvider.GetRequiredService<IHubActivator<CustomHub>>()); 69Assert.IsType<CustomHubContext<CustomHub>>(serviceProvider.GetRequiredService<IHubContext<CustomHub>>()); 70Assert.IsType<CustomHubContext<CustomTHub, string>>(serviceProvider.GetRequiredService<IHubContext<CustomTHub, string>>()); 71Assert.IsType<CustomHubContext<CustomDynamicHub>>(serviceProvider.GetRequiredService<IHubContext<CustomDynamicHub>>());
DefaultHubLifetimeManagerTests.cs (3)
39var message = Assert.IsType<InvocationMessage>(client1.TryRead()); 215var message = Assert.IsType<InvocationMessage>(client1.TryRead()); 245var message = Assert.IsType<InvocationMessage>(client1.TryRead());
DefaultTransportFactoryTests.cs (1)
78Assert.IsType<WebSocketsTransport>(
HubConnectionHandlerTests.Activity.cs (4)
59var completionMessage = Assert.IsType<CompletionMessage>(await client.ReadAsync().DefaultTimeout()); 67Assert.IsType<CompletionMessage>(await client.ReadAsync().DefaultTimeout()); 73Assert.IsType<CompletionMessage>(await client.ReadAsync().DefaultTimeout()); 141var completionMessage = Assert.IsType<CompletionMessage>(await client.ReadAsync().DefaultTimeout());
HubConnectionHandlerTests.ClientResult.cs (24)
28var invocationMessage = Assert.IsType<InvocationMessage>(await client.ReadAsync().DefaultTimeout()); 33var completion = Assert.IsType<CompletionMessage>(await client.ReadAsync().DefaultTimeout()); 61var invocationMessage = Assert.IsType<InvocationMessage>(await client.ReadAsync().DefaultTimeout()); 65var completion = Assert.IsType<CompletionMessage>(await client.ReadAsync().DefaultTimeout()); 91var closeMessage = Assert.IsType<CloseMessage>(await client.ReadAsync().DefaultTimeout()); 119var closeMessage = Assert.IsType<CloseMessage>(await client.ReadAsync().DefaultTimeout()); 149var invocation = Assert.IsType<InvocationMessage>(message); 183var invocation = Assert.IsType<InvocationMessage>(message); 217var invocationMessage = Assert.IsType<InvocationMessage>(await client.ReadAsync().DefaultTimeout()); 223var completion = Assert.IsType<CompletionMessage>(await client.ReadAsync().DefaultTimeout()); 253var invocationMessage = Assert.IsType<InvocationMessage>(await client.ReadAsync().DefaultTimeout()); 254var invocationMessage2 = Assert.IsType<InvocationMessage>(await client.ReadAsync().DefaultTimeout()); 255var invocationMessage3 = Assert.IsType<InvocationMessage>(await client.ReadAsync().DefaultTimeout()); 262var completion = Assert.IsType<CompletionMessage>(await client.ReadAsync().DefaultTimeout()); 268completion = Assert.IsType<CompletionMessage>(await client.ReadAsync().DefaultTimeout()); 274completion = Assert.IsType<CompletionMessage>(await client.ReadAsync().DefaultTimeout()); 307var invocationMessage = Assert.IsType<InvocationMessage>(await (Task<HubMessage>)task); 376var invocation = Assert.IsType<InvocationMessage>(message); 421var invocation = Assert.IsType<InvocationMessage>(message); 462var invocationMessage = Assert.IsType<InvocationMessage>(await client.ReadAsync().DefaultTimeout()); 470var completion = Assert.IsType<CompletionMessage>(await client.ReadAsync().DefaultTimeout()); 500var invocationMessage = Assert.IsType<InvocationMessage>(await client.ReadAsync().DefaultTimeout()); 505var streamItem = Assert.IsType<StreamItemMessage>(await client.ReadAsync().DefaultTimeout()); 509var completionMessage = Assert.IsType<CompletionMessage>(await client.ReadAsync().DefaultTimeout());
HubConnectionHandlerTests.cs (70)
157var close = Assert.IsType<CloseMessage>(await client.ReadAsync().DefaultTimeout()); 964var closeMessage = Assert.IsType<CloseMessage>(await client.ReadAsync().DefaultTimeout()); 1027var message = Assert.IsType<CloseMessage>(client.TryRead()); 1145Assert.IsType<CloseMessage>(closeMessage); 1389var invocation = Assert.IsType<InvocationMessage>(result); 1427var invocation = Assert.IsType<InvocationMessage>(result); 1462var invocation = Assert.IsType<InvocationMessage>(secondClientResult); 1467var completion = Assert.IsType<CompletionMessage>(firstClientResult); 1471invocation = Assert.IsType<InvocationMessage>(firstClientResult); 1503var invocation = Assert.IsType<InvocationMessage>(firstClientResult); 1509invocation = Assert.IsType<InvocationMessage>(secondClientResult); 1541var close = Assert.IsType<CloseMessage>(await firstClient.ReadAsync()); 1574var invocation = Assert.IsType<InvocationMessage>(secondClientResult); 1579invocation = Assert.IsType<InvocationMessage>(thirdClientResult); 1617var invocation = Assert.IsType<InvocationMessage>(secondClientResult); 1622invocation = Assert.IsType<InvocationMessage>(thirdClientResult); 1628Assert.IsType<CompletionMessage>(hubMessage); 1662var invocation = Assert.IsType<InvocationMessage>(secondClientResult); 1667invocation = Assert.IsType<InvocationMessage>(thirdClientResult); 1673Assert.IsType<CompletionMessage>(hubMessage); 1716var invocation = Assert.IsType<InvocationMessage>(hubMessage); 1763var invocation = Assert.IsType<InvocationMessage>(hubMessage); 1770Assert.IsType<CompletionMessage>(hubMessage); 1814var invocation = Assert.IsType<InvocationMessage>(hubMessage); 1821Assert.IsType<CompletionMessage>(hubMessage); 1857var invocation = Assert.IsType<InvocationMessage>(hubMessage); 1863invocation = Assert.IsType<InvocationMessage>(hubMessage); 1920var invocation = Assert.IsType<InvocationMessage>(hubMessage); 1954var invocation = Assert.IsType<InvocationMessage>(hubMessage); 1987var invocation = Assert.IsType<InvocationMessage>(hubMessage); 2059var hubMessage = Assert.IsType<CompletionMessage>(await client.ReadAsync().DefaultTimeout()); 2292var close = Assert.IsType<CloseMessage>(await client.ReadAsync().DefaultTimeout()); 2308var resource = Assert.IsType<HubInvocationContext>(context.Resource); 2467var message = Assert.IsType<InvocationMessage>(await client.ReadAsync().DefaultTimeout()); 2575Assert.IsType<CompletionMessage>(client2.TryRead()); 2576Assert.IsType<CloseMessage>(client2.TryRead()); 2889var ex = Assert.IsType<OperationCanceledException>(state.DisconnectedException); 2925Assert.IsType<CompletionMessage>(result); 3122var closeMessage = Assert.IsType<CloseMessage>(message); 3156var closeMessage = Assert.IsType<CloseMessage>(message); 3300var completion = Assert.IsType<CompletionMessage>(await client.ReadAsync().DefaultTimeout()); 3353var longRunningCompletion = Assert.IsType<CompletionMessage>(firstResult); 3359var simpleCompletion = Assert.IsType<CompletionMessage>(secondResult); 3405var simpleCompletion = Assert.IsType<CompletionMessage>(secondResult); 3415var longRunningCompletion = Assert.IsType<CompletionMessage>(firstResult); 3472var longRunningCompletion = Assert.IsType<CompletionMessage>(firstResult); 3478var simpleCompletion = Assert.IsType<CompletionMessage>(secondResult); 3485longRunningCompletion = Assert.IsType<CompletionMessage>(firstResult); 3537completion = Assert.IsType<CompletionMessage>(await client.ReadAsync().DefaultTimeout()); 3574var closeMessage = Assert.IsType<CloseMessage>(await client.ReadAsync().DefaultTimeout()); 3832Assert.IsType<System.Text.Json.JsonException>(state.DisconnectedException); 3855Assert.IsType<System.Text.Json.JsonException>(state.DisconnectedException); 4069var simpleCompletion = Assert.IsType<CompletionMessage>(result); 4142var simpleCompletion = Assert.IsType<CompletionMessage>(result); 4179var simpleCompletion = Assert.IsType<CompletionMessage>(result); 4229var simpleCompletion = Assert.IsType<CompletionMessage>(result); 4392var completion = Assert.IsType<CompletionMessage>(await client.ReadAsync().DefaultTimeout()); 4524var message = Assert.IsType<InvocationMessage>(await client.ReadAsync().DefaultTimeout()); 4551var invocation = Assert.IsType<InvocationMessage>(message); 4641var invocation = Assert.IsType<InvocationMessage>(message); 4679Assert.True(Assert.IsType<bool>(res.Result)); 4698Assert.True(Assert.IsType<bool>(res.Result)); 4723var response = Assert.IsType<CompletionMessage>(await client.ReadAsync().DefaultTimeout()); 5103var message = Assert.IsType<InvocationMessage>(await client1.ReadAsync().DefaultTimeout()); 5125var message = Assert.IsType<CloseMessage>(await client.ReadAsync().DefaultTimeout()); 5150var message = Assert.IsType<CloseMessage>(await client.ReadAsync().DefaultTimeout()); 5157var ex = Assert.IsType<HubException>(state.DisconnectedException); 5220var completionMessage = Assert.IsType<CompletionMessage>(await readTask); 5258var seqMessage = Assert.IsType<SequenceMessage>(await client.ReadAsync().DefaultTimeout()); 5323var message = Assert.IsType<CloseMessage>(await client.ReadAsync().DefaultTimeout());
HubConnectionHandlerTestUtils\Utils.cs (3)
33var actualCompletion = Assert.IsType<CompletionMessage>(actual); 39var actualStreamItem = Assert.IsType<StreamItemMessage>(actual); 43var actualInvocation = Assert.IsType<InvocationMessage>(actual);
Internal\MessageBufferTests.cs (25)
38Assert.IsType<PingMessage>(message); 63Assert.IsType<InvocationMessage>(message); 77Assert.IsType<StreamItemMessage>(message); 104Assert.IsType<SequenceMessage>(message); 113Assert.IsType<InvocationMessage>(message); 138Assert.IsType<StreamItemMessage>(message); 153var seqMessage = Assert.IsType<SequenceMessage>(message); 162Assert.IsType<StreamItemMessage>(message); 187Assert.IsType<StreamItemMessage>(message); 200var seqMessage = Assert.IsType<SequenceMessage>(message); 211Assert.IsType<CompletionMessage>(message); 232var seqMessage = Assert.IsType<SequenceMessage>(message); 264var seqMessage = Assert.IsType<SequenceMessage>(message); 275Assert.IsType<StreamItemMessage>(message); 301Assert.IsType<InvocationMessage>(message); 315Assert.IsType<StreamItemMessage>(message); 345Assert.IsType<SequenceMessage>(message); 354Assert.IsType<StreamItemMessage>(message); 381var ackMessage = Assert.IsType<AckMessage>(message); 393ackMessage = Assert.IsType<AckMessage>(message); 425Assert.IsType<SequenceMessage>(message); 433Assert.IsType<InvocationMessage>(message); 472Assert.IsType<SequenceMessage>(message); 482Assert.IsType<InvocationMessage>(message); 491Assert.IsType<AckMessage>(message);
Microsoft.AspNetCore.TestHost.Tests (2)
ClientHandlerTests.cs (1)
537Assert.IsType<InvalidOperationException>(ex.GetBaseException());
TestServerTests.cs (1)
87Assert.IsType<NoopHostLifetime>(host.Services.GetService<IHostLifetime>());
Microsoft.AspNetCore.Testing.Tests (7)
FakesExtensionsTests.cs (7)
111Assert.IsType<InvalidOperationException>(exception); 122Assert.IsType<InvalidOperationException>(exception); 130Assert.IsType<ArgumentNullException>(exception); 142Assert.IsType<InvalidOperationException>(exception); 189Assert.IsType<InvalidOperationException>(exception); 204Assert.IsType<InvalidOperationException>(exception); 211Assert.IsType<ArgumentNullException>(exception);
Microsoft.AspNetCore.Tests (12)
WebApplicationTests.cs (12)
704var config = Assert.IsType<ConfigurationManager>(webApplication.Configuration); 729var config = Assert.IsType<ConfigurationManager>(webApplication.Configuration); 762var config = Assert.IsType<ConfigurationManager>(webApplication.Configuration); 777var config = Assert.IsType<ConfigurationManager>(webApplication.Configuration); 1512Assert.IsType<Service>(service0); 1513Assert.IsType<Service>(service1); 1565Assert.IsType<CustomHostLifetime>(hostLifetime0); 1566Assert.IsType<CustomHostLifetime>(hostLifetime1); 1599var newRouteEndpoint = Assert.IsType<RouteEndpoint>(newEndpoint); 2532Assert.IsType<MyServiceProvider>(app.Services); 2606Assert.IsType<RouteCreationException>(ex); 2607Assert.IsType<InvalidOperationException>(ex.InnerException.InnerException);
Microsoft.AspNetCore.WebSockets.Tests (2)
WebSocketMiddlewareTests.cs (2)
550Assert.IsType<ConnectionAbortedException>(receiveException); 783var feature = Assert.IsType<HttpRequestTimeoutFeature>(context.Features.Get<IHttpRequestTimeoutFeature>());
Microsoft.AspNetCore.WebUtilities.Tests (1)
FormPipeReaderTests.cs (1)
86Assert.IsType<InvalidOperationException>(exception.InnerException);
Microsoft.Build.Engine.UnitTests (15)
BackEnd\AssemblyTaskFactory_Tests.cs (7)
450Assert.IsType<TaskHostTask>(createdTask); 481Assert.IsType<TaskHostTask>(createdTask); 516Assert.IsType<TaskHostTask>(createdTask); 545Assert.IsType<TaskHostTask>(createdTask); 578Assert.IsType<TaskHostTask>(createdTask); 611Assert.IsType<TaskHostTask>(createdTask); 668Assert.IsType<TaskHostTask>(createdTask);
BackEnd\LoggingServicesLogMethod_Tests.cs (2)
1022Assert.IsType<BuildStartedEventArgs>(service.ProcessedBuildEvent); 1064Assert.IsType<BuildCanceledEventArgs>(service.ProcessedBuildEvent);
Construction\SolutionProjectGenerator_Tests.cs (1)
2551ProjectTaskInstance task = Assert.IsType<ProjectTaskInstance>(projectInstance.Targets["MyTarget"].Children[0]);
Evaluation\Expander_Tests.cs (1)
2556Assert.IsType<Version>(result);
Globbing\CompositeGlob_Tests.cs (1)
167var composite = Assert.IsType<CompositeGlob>(result);
Parser_Tests.cs (3)
220Assert.IsType<StringExpressionNode>(tree); 225Assert.IsType<NotExpressionNode>(tree); 229Assert.IsType<AndExpressionNode>(tree);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (6)
AutomaticCompletion\AutomaticLineEnderTests.cs (1)
3331return Assert.IsType<AutomaticLineEnderCommandHandler>(
BlockCommentEditing\BlockCommentEditingTests.cs (1)
724=> Assert.IsType<BlockCommentEditingCommandHandler>(workspace.GetService<ICommandHandler>(ContentTypeNames.CSharpContentType, nameof(BlockCommentEditingCommandHandler)));
BlockCommentEditing\CloseBlockCommentTests.cs (1)
376=> Assert.IsType<CloseBlockCommentCommandHandler>(workspace.GetService<ICommandHandler>(ContentTypeNames.CSharpContentType, nameof(CloseBlockCommentCommandHandler)));
Completion\CompletionProviders\AbstractCSharpCompletionProviderTests.cs (1)
47=> Assert.IsType<CSharpCompletionService>(base.GetCompletionService(project));
Completion\CompletionProviders\CrefCompletionProviderTests.cs (1)
450var provider = Assert.IsType<CrefCompletionProvider>(service.GetTestAccessor().GetImportedAndBuiltInProviders(ImmutableHashSet<string>.Empty).Single());
TextStructureNavigation\TextStructureNavigatorTests.cs (1)
510var provider = Assert.IsType<CSharpTextStructureNavigatorProvider>(
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenTupleTest.cs (4)
12797Assert.IsType<SourceMemberFieldSymbolFromDeclarator>(m1Item1.OriginalDefinition); 12816Assert.IsType<SourceMemberFieldSymbolFromDeclarator>(m2Item1.OriginalDefinition); 28589Assert.IsType<ConstructedNamedTypeSymbol>(tuple); 28622Assert.IsType<ConstructedNamedTypeSymbol>(tuple);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (16)
Attributes\AttributeTests_WellKnownAttributes.cs (1)
5018Assert.IsType<ImplicitNamedTypeSymbol>(scriptClass);
FieldKeywordTests.cs (5)
1278Assert.IsType<IdentifierNameSyntax>(argument); 1282Assert.IsType<IdentifierNameSyntax>(argument); 1336Assert.IsType<FieldExpressionSyntax>(argument); 1340Assert.IsType<FieldExpressionSyntax>(argument); 1344Assert.IsType<FieldExpressionSyntax>(argument);
OverloadResolutionPriorityTests.cs (2)
696Assert.All(ms, m => Assert.IsType<RetargetingMethodSymbol>(m)); 804Assert.All(constructors, m => Assert.IsType<RetargetingMethodSymbol>(m));
Semantics\ExperimentalAttributeTests.cs (8)
947Assert.IsType<RetargetingNamedTypeSymbol>(derived); 948Assert.IsType<RetargetingAssemblySymbol>(derived.ContainingAssembly); 975Assert.IsType<RetargetingNamedTypeSymbol>(derived); 976Assert.IsType<RetargetingAssemblySymbol>(derived.ContainingAssembly); 1012Assert.IsType<RetargetingNamedTypeSymbol>(derived); 1013Assert.IsType<RetargetingModuleSymbol>(derived.ContainingModule); 1040Assert.IsType<RetargetingNamedTypeSymbol>(derived); 1041Assert.IsType<RetargetingModuleSymbol>(derived.ContainingModule);
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (1)
InteractiveSessionReferencesTests.cs (1)
106Assert.IsType<List<Version>>(s.Result.ReturnValue);
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (3)
InteractiveSessionTests.cs (3)
1385Assert.IsType<List<int>>(s2.Result.ReturnValue); 2050Assert.IsType<OperationCanceledException>(state3.Exception); 2084Assert.IsType<OperationCanceledException>(state3.Exception);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (37)
Semantics\ExpressionBodiedMemberTests.cs (1)
211Assert.IsType<SourcePropertySymbol>(prop);
Semantics\RecordStructTests.cs (4)
538Assert.IsType<AnonymousTypeManager.AnonymousTypePublicSymbol>(((Symbols.PublicModel.NonErrorNamedTypeSymbol)type).UnderlyingNamedTypeSymbol); 558Assert.IsType<ExtendedErrorTypeSymbol>(((Symbols.PublicModel.ErrorTypeSymbol)type).UnderlyingNamedTypeSymbol); 578Assert.IsType<PointerTypeSymbol>(((Symbols.PublicModel.PointerTypeSymbol)type).UnderlyingTypeSymbol); 600Assert.IsType<DynamicTypeSymbol>(((Symbols.PublicModel.DynamicTypeSymbol)type).UnderlyingTypeSymbol);
SourceGeneration\GeneratorDriverTests.cs (20)
1661Assert.IsType<InvalidOperationException>(e.InnerException); 2721Assert.Equal("path1.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2737Assert.Equal("path2.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2753Assert.Equal("path3.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2774Assert.Equal("path1.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2790Assert.Equal("path2.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2806Assert.Equal("path3.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2830Assert.Equal("path1.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2846Assert.Equal("path4.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2862Assert.Equal("path3.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2911Assert.Equal("path.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2928Assert.Equal("path.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2949Assert.Equal("path.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2966Assert.Equal("path.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2991Assert.Equal("path.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 3008Assert.Equal("path.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 3033Assert.Equal("path2.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 3050Assert.Equal("path2.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 4583Assert.IsType<ArgumentException>(result.Exception); 4636var exception = Assert.IsType<InvalidOperationException>(result.Exception);
SourceGeneration\SyntaxAwareGeneratorTests.cs (12)
49Assert.IsType<TestSyntaxReceiver>(receiver); 100Assert.IsType<TestSyntaxContextReceiver>(receiver); 250Assert.IsType<TestSyntaxReceiver>(receiver); 254Assert.IsType<CompilationUnitSyntax>(testReceiver.VisitedNodes[0]); 289Assert.IsType<TestSyntaxContextReceiver>(receiver); 293Assert.IsType<CompilationUnitSyntax>(testReceiver.VisitedNodes[0].Node); 331Assert.IsType<TestSyntaxReceiver>(receiver); 336Assert.IsType<CompilationUnitSyntax>(testReceiver.VisitedNodes[0]); 351Assert.IsType<CompilationUnitSyntax>(testReceiver.VisitedNodes[0]); 692Assert.IsType<TestSyntaxReceiver>(receiver); 750Assert.IsType<TestSyntaxReceiver>(receiver); 2060Assert.IsType<OperationCanceledException>(results.Results[0].Exception);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (82)
Compilation\UsedAssembliesTests.cs (10)
77Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp2).GetAssemblyOrModuleSymbol(reference)); 405Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp2).GetAssemblyOrModuleSymbol(reference)); 439Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp2).GetAssemblyOrModuleSymbol(reference)); 490Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp2).GetAssemblyOrModuleSymbol(reference)); 561Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp2).GetAssemblyOrModuleSymbol(reference1)); 659Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp2).GetAssemblyOrModuleSymbol(reference0)); 666Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp3).GetAssemblyOrModuleSymbol(references.Last())); 1383Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp2).GetAssemblyOrModuleSymbol(reference)); 2005Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp2).GetAssemblyOrModuleSymbol(reference)); 2472Assert.IsType<TAssemblySymbol>(((CSharpCompilation)comp2).GetAssemblyOrModuleSymbol(reference1));
DocumentationComments\CrefTests.cs (1)
6051Assert.IsType<CrefTypeParameterSymbol>(((CSharp.Symbols.PublicModel.Symbol)typeParameterSymbol).UnderlyingSymbol);
Symbols\CompilationCreationTests.cs (1)
2982Assert.IsType<SourceAssemblySymbol>(sourceAssembly);
Symbols\Metadata\PE\NoPia.cs (20)
165Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 209Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 214Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 216Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 238Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 240Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 245Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 247Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 276Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 278Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 312Assert.IsType<NoPiaAmbiguousCanonicalTypeSymbol>(param[1].Type); 538Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 551Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 572Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 574Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 579Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 581Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 613Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 615Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 647Assert.IsType<NoPiaAmbiguousCanonicalTypeSymbol>(param[1].Type);
Symbols\Metadata\PE\NoPiaInstantiationOfGenericClassAndStruct.cs (2)
413Assert.IsType<ConstructedNamedTypeSymbol>(localField.Type); 572Assert.IsType<NoPiaIllegalGenericInstantiationSymbol>(m.ReturnType);
Symbols\Metadata\PE\NoPiaLocalHideAndTypeSubstitutionTests.cs (3)
149Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 244Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(methodSymbol.ReturnType); 375Assert.IsType<NoPiaAmbiguousCanonicalTypeSymbol>(param.First().Type);
Symbols\MockSymbolTests.cs (1)
99Assert.IsType<CSharpCompilation>(ne2.Compilation);
Symbols\RequiredMembersTests.cs (5)
2234Assert.IsType<RetargetingNamedTypeSymbol>(baseSymbol); 2280Assert.IsType<RetargetingNamedTypeSymbol>(baseSymbol); 2316Assert.IsType<RetargetingNamedTypeSymbol>(baseSymbol); 2572Assert.IsType<RetargetingNamedTypeSymbol>(comp.GetTypeByMetadataName("Base")); 2607Assert.IsType<RetargetingNamedTypeSymbol>(comp.GetTypeByMetadataName("Base"));
Symbols\Retargeting\NoPia.cs (33)
473Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 515Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 520Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 522Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 542Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 544Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 549Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 551Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 579Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 581Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 613Assert.IsType<NoPiaAmbiguousCanonicalTypeSymbol>(param[1].Type); 774Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 816Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 821Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 823Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 843Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 845Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 850Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 852Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 880Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 882Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 914Assert.IsType<NoPiaAmbiguousCanonicalTypeSymbol>(param[1].Type); 1078Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 1120Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 1125Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 1127Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 1147Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 1149Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 1154Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 1156Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 1184Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[0].Type); 1186Assert.IsType<NoPiaMissingCanonicalTypeSymbol>(param[1].Type); 1218Assert.IsType<NoPiaAmbiguousCanonicalTypeSymbol>(param[1].Type);
Symbols\Retargeting\RetargetCustomAttributes.cs (1)
200Assert.IsType<RetargetingNamedTypeSymbol>(testClass);
Symbols\Retargeting\RetargetCustomModifiers.cs (1)
163Assert.IsType<RetargetingNamedTypeSymbol>(modifiers);
Symbols\Retargeting\RetargetExplicitInterfaceImplementation.cs (1)
466Assert.IsType<RetargetingNamedTypeSymbol>(c2);
Symbols\Retargeting\RetargetingTests.cs (1)
844Assert.IsType<RetargetingAssemblySymbol>(mRetargeted.ContainingAssembly);
Symbols\Source\BaseClassTests.cs (2)
1037Assert.IsType<Retargeting.RetargetingNamedTypeSymbol>(B2); 1167Assert.IsType<Retargeting.RetargetingNamedTypeSymbol>(B2);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (39)
IncrementalParsing\NodeValidators.cs (7)
22Assert.IsType<PointerTypeSyntax>(nameTree); 29Assert.IsType<PredefinedTypeSyntax>(nameTree); 36Assert.IsType<ArrayTypeSyntax>(nameTree); 45Assert.IsType<AliasQualifiedNameSyntax>(nameTree); 54Assert.IsType<QualifiedNameSyntax>(nameTree); 63Assert.IsType<GenericNameSyntax>(nameTree); 78Assert.IsType<IdentifierNameSyntax>(nameTree);
IncrementalParsing\TypeChanges.cs (4)
33Assert.IsType<DestructorDeclarationSyntax>(classType.Members[0]); 48Assert.IsType<ConstructorDeclarationSyntax>(classType.Members[0]); 63Assert.IsType<ConstructorDeclarationSyntax>(classType.Members[0]); 78Assert.IsType<ConstructorDeclarationSyntax>(classType.Members[0]);
LexicalAndXml\LexicalTests.cs (8)
725Assert.IsType<string>(token.ValueText); 742Assert.IsType<string>(token.ValueText); 759Assert.IsType<string>(token.ValueText); 776Assert.IsType<string>(token.ValueText); 793Assert.IsType<string>(token.ValueText); 810Assert.IsType<string>(token.ValueText); 827Assert.IsType<string>(token.ValueText); 869Assert.IsType<string>(token.ValueText);
LexicalAndXml\RawStringLiteralLexingTests.cs (1)
195Assert.IsType<string>(token.Value);
LexicalAndXml\XmlDocCommentTests.cs (1)
2660Assert.IsType<XmlElementSyntax>(doc.Content[0]);
Parsing\ExpressionParsingTests.cs (1)
2997Assert.IsType<GroupClauseSyntax>(qs.Body.SelectOrGroup);
Parsing\LocalFunctionParsingTests.cs (12)
1228var m = Assert.IsType<MethodDeclarationSyntax>(file.DescendantNodes() 1294var c = Assert.IsType<ClassDeclarationSyntax>(file.Members.Single()); 1296var m = Assert.IsType<MethodDeclarationSyntax>(c.Members[0]); 1297var s1 = Assert.IsType<LocalFunctionStatementSyntax>(m.Body.Statements[0]); 1300var m2 = Assert.IsType<MethodDeclarationSyntax>(c.Members[1]); 1301s1 = Assert.IsType<LocalFunctionStatementSyntax>(m.Body.Statements[0]); 1346var c = Assert.IsType<ClassDeclarationSyntax>(file.Members.Single()); 1348var m = Assert.IsType<MethodDeclarationSyntax>(c.Members[0]); 1349var s1 = Assert.IsType<LocalFunctionStatementSyntax>(m.Body.Statements[0]); 1358var m2 = Assert.IsType<MethodDeclarationSyntax>(c.Members[1]); 1359s1 = Assert.IsType<LocalFunctionStatementSyntax>(m2.Body.Statements[0]); 1367var s2 = Assert.IsType<ReturnStatementSyntax>(s1.Body.Statements.Single());
Parsing\StatementParsingTests.cs (1)
3350Assert.IsType<IdentifierNameSyntax>(decl.Declaration.Type);
Syntax\SyntaxFactoryTests.cs (2)
224Assert.IsType<InternalSyntax.SyntaxToken.SyntaxTokenWithTrivia>(token.Node); 228Assert.IsType<InternalSyntax.SyntaxToken.SyntaxTokenWithValueAndTrivia<string>>(token.Node);
Syntax\SyntaxNodeTests.cs (2)
1490var firstDirective = Assert.IsType<RegionDirectiveTriviaSyntax>(leadingTriviaWithDuplicate[0].GetStructure()); 1491var secondDirective = Assert.IsType<RegionDirectiveTriviaSyntax>(leadingTriviaWithDuplicate[1].GetStructure());
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestBase.cs (1)
1550Assert.IsType<T>(e);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
AutomaticCompletion\AbstractAutomaticBraceCompletionTests.cs (1)
151var provider = Assert.IsType<BraceCompletionSessionProvider>(workspace.GetService<IBraceCompletionSessionProvider>());
QuickInfo\ToolTipAssert.cs (1)
104var actualTarget = Assert.IsType<QuickInfoHyperLink>(actual.NavigationAction.Target);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (5)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (2)
628Assert.IsType<SourceGeneratedDocument>(document); 630Assert.IsType<Document>(document);
Structure\StructureTaggerTests.cs (1)
418var control = Assert.IsType<ViewHostingControl>(tag.GetCollapsedHintForm());
Utilities\AsynchronousOperationListenerTests.cs (1)
49Assert.IsType<TaskCanceledException>(inner);
Workspaces\ClassificationTypeNamesTests.cs (1)
33var classificationTypeName = Assert.IsType<string>(constantValue);
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
LspFileChangeWatcherTests.cs (1)
117var registrationJson = Assert.IsType<JsonElement>(Assert.Single(dynamicCapabilities.Registrations).Value.RegisterOptions);
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
RoundTripUtil.cs (1)
97Assert.IsType<TCompilation>(rebuild);
Microsoft.CodeAnalysis.UnitTests (7)
Collections\ImmutableSegmentedDictionaryBuilderTest.cs (1)
263Assert.IsType<ArgumentNullException>(tie.InnerException);
Collections\ImmutableSegmentedDictionaryTest.cs (1)
263Assert.IsType<ArgumentNullException>(tie.InnerException);
Collections\ImmutableSegmentedHashSetTest.cs (1)
199Assert.IsType<ArgumentNullException>(tie.InnerException);
Collections\ImmutableSegmentedListBuilderTest.cs (1)
373Assert.IsType<ArgumentNullException>(tie.InnerException);
Collections\ImmutableSegmentedListTest.cs (1)
788Assert.IsType<ArgumentNullException>(tie.InnerException);
Text\LargeTextTests.cs (1)
124Assert.IsType<LargeText>(text);
Text\SourceTextTests.cs (1)
374Assert.IsType<LargeText>(actualSourceText);
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
CommandLineTests.vb (1)
390Assert.IsType(Of DesktopStrongNameProvider)(comp.Options.StrongNameProvider)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (6)
SymbolsTests\Metadata\PE\NoPiaInstantiationOfGenericClassAndStruct.vb (3)
121Assert.IsType(Of NoPiaIllegalGenericInstantiationSymbol)(m.Parameters.[Where](Function(arg) arg.Name = "c1").[Select](Function(arg) arg).[Single]().[Type].BaseType) 125Assert.IsType(Of NoPiaIllegalGenericInstantiationSymbol)(m.ReturnType.BaseType) 484Assert.IsType(Of NoPiaIllegalGenericInstantiationSymbol)(m.ReturnType)
SymbolsTests\Retargeting\RetargetCustomModifiers.vb (2)
37Assert.IsType(Of PENamedTypeSymbol)(modifiers) 116Assert.IsType(Of RetargetingNamedTypeSymbol)(modifiers)
SymbolsTests\TypedConstantTests.vb (1)
61Assert.IsType(Of Microsoft.CodeAnalysis.TypedConstant)(common2)
Microsoft.CodeAnalysis.Workspaces.UnitTests (11)
Options\DocumentOptionSetTests.cs (2)
80Assert.IsType<CodeStyleOption2<bool>>(updatedSet.GetInternalOptionValue(optionKey)); 83Assert.IsType<CodeStyleOption<bool>>(actualValue);
SolutionTests\SolutionWithSourceGeneratorTests.cs (8)
275Assert.IsType<SourceGeneratedDocument>(project.GetDocument(generatedSyntaxTree)); 325Assert.IsType<SourceGeneratedDocument>(project.GetDocument(tree)); 449var generatedDocument = Assert.IsType<SourceGeneratedDocument>(project.GetDocument(syntaxTree)); 472var generatedDocument = Assert.IsType<SourceGeneratedDocument>(project.GetDocument(syntaxTree)); 599generatedDocument = Assert.IsType<SourceGeneratedDocument>(differentOpenTextContainer.CurrentText.GetOpenDocumentInCurrentContextWithChanges()); 623generatedDocument = Assert.IsType<SourceGeneratedDocument>(differentOpenTextContainer.CurrentText.GetOpenDocumentInCurrentContextWithChanges()); 647generatedDocument = Assert.IsType<SourceGeneratedDocument>(differentOpenTextContainer.CurrentText.GetOpenDocumentInCurrentContextWithChanges()); 674generatedDocument = Assert.IsType<SourceGeneratedDocument>(differentOpenTextContainer.CurrentText.GetOpenDocumentInCurrentContextWithChanges());
WorkspaceServiceTests\GlobalOptionServiceTests.cs (1)
308Assert.IsType<CodeStyleOption<bool>>(newOptionSet.GetOption(optionKey));
Microsoft.Data.Analysis.Tests (16)
DataFrame.IOTests.cs (16)
32Assert.IsType<BooleanDataFrameColumn>(column); 37Assert.IsType<DecimalDataFrameColumn>(column); 42Assert.IsType<ByteDataFrameColumn>(column); 47Assert.IsType<CharDataFrameColumn>(column); 52Assert.IsType<DoubleDataFrameColumn>(column); 57Assert.IsType<SingleDataFrameColumn>(column); 62Assert.IsType<Int32DataFrameColumn>(column); 68Assert.IsType<Int64DataFrameColumn>(column); 72Assert.IsType<SByteDataFrameColumn>(column); 77Assert.IsType<Int16DataFrameColumn>(column); 82Assert.IsType<UInt32DataFrameColumn>(column); 88Assert.IsType<UInt64DataFrameColumn>(column); 92Assert.IsType<UInt16DataFrameColumn>(column); 99Assert.IsType<StringDataFrameColumn>(column); 103Assert.IsType<ArrowStringDataFrameColumn>(column); 108Assert.IsType<DateTimeDataFrameColumn>(column);
Microsoft.DotNet.XUnitAssert.Tests (552)
AsyncCollectionAssertsTests.cs (42)
41 Assert.IsType<AllException>(ex); 93 Assert.IsType<AllException>(ex); 143 var collEx = Assert.IsType<CollectionException>(ex); 177 var collEx = Assert.IsType<CollectionException>(ex); 214 var collEx = Assert.IsType<CollectionException>(ex); 264 var collEx = Assert.IsType<CollectionException>(ex); 309 Assert.IsType<ContainsException>(ex); 378 Assert.IsType<ContainsException>(ex); 411 Assert.IsType<DistinctException>(ex); 427 Assert.IsType<DistinctException>(ex); 452 Assert.IsType<DistinctException>(ex); 485 Assert.IsType<DoesNotContainException>(ex); 555 Assert.IsType<DoesNotContainException>(ex); 596 Assert.IsType<EmptyException>(ex); 641 Assert.IsType<EqualException>(ex); 663 Assert.IsType<EqualException>(ex); 769 Assert.IsType<EqualException>(ex); 794 Assert.IsType<EqualException>(ex); 875 Assert.IsType<EqualException>(ex); 884 Assert.IsType<DivideByZeroException>(ex.InnerException); 927 Assert.IsType<EqualException>(ex); 967 Assert.IsType<EqualException>(ex); 1028 Assert.IsType<EqualException>(ex); 1037 Assert.IsType<DivideByZeroException>(ex.InnerException); 1055 Assert.IsType<NotEmptyException>(ex); 1094 Assert.IsType<NotEqualException>(ex); 1143 Assert.IsType<NotEqualException>(ex); 1193 Assert.IsType<NotEqualException>(ex); 1234 Assert.IsType<NotEqualException>(ex); 1243 Assert.IsType<DivideByZeroException>(ex.InnerException); 1276 Assert.IsType<NotEqualException>(ex); 1334 Assert.IsType<NotEqualException>(ex); 1361 Assert.IsType<NotEqualException>(ex); 1370 Assert.IsType<DivideByZeroException>(ex.InnerException); 1394 Assert.IsType<SingleException>(ex); 1415 Assert.IsType<SingleException>(ex); 1430 Assert.IsType<SingleException>(ex); 1455 Assert.IsType<SingleException>(ex); 1490 Assert.IsType<SingleException>(ex); 1506 Assert.IsType<SingleException>(ex); 1523 Assert.IsType<SingleException>(ex); 1550 Assert.IsType<SingleException>(ex);
BooleanAssertsTests.cs (4)
20 Assert.IsType<FalseException>(ex); 34 Assert.IsType<FalseException>(ex); 68 Assert.IsType<TrueException>(ex); 82 Assert.IsType<TrueException>(ex);
CollectionAssertsTests.cs (73)
39 Assert.IsType<AllException>(ex); 91 Assert.IsType<AllException>(ex); 141 var collEx = Assert.IsType<CollectionException>(ex); 176 var collEx = Assert.IsType<CollectionException>(ex); 214 var collEx = Assert.IsType<CollectionException>(ex); 264 var collEx = Assert.IsType<CollectionException>(ex); 309 Assert.IsType<ContainsException>(ex); 371 Assert.IsType<ContainsException>(ex); 412 Assert.IsType<ContainsException>(ex); 445 Assert.IsType<DistinctException>(ex); 461 Assert.IsType<DistinctException>(ex); 486 Assert.IsType<DistinctException>(ex); 519 Assert.IsType<DoesNotContainException>(ex); 552 Assert.IsType<DoesNotContainException>(ex); 570 Assert.IsType<DoesNotContainException>(ex); 633 Assert.IsType<DoesNotContainException>(ex); 674 Assert.IsType<EmptyException>(ex); 714 Assert.IsType<EqualException>(ex); 731 Assert.IsType<EqualException>(ex); 803 Assert.IsType<EqualException>(ex); 871 Assert.IsType<EqualException>(ex); 880 Assert.IsType<EqualException>(ex); 1025 Assert.IsType<EqualException>(ex); 1040 Assert.IsType<EqualException>(ex); 1109 Assert.IsType<EqualException>(ex); 1118 Assert.IsType<DivideByZeroException>(ex.InnerException); 1154 Assert.IsType<EqualException>(ex); 1184 Assert.IsType<EqualException>(ex); 1236 Assert.IsType<EqualException>(ex); 1245 Assert.IsType<DivideByZeroException>(ex.InnerException); 1277 Assert.IsType<EqualException>(ex); 1294 Assert.IsType<EqualException>(ex); 1327 Assert.IsType<EqualException>(ex); 1371 Assert.IsType<EqualException>(ex); 1401 Assert.IsType<EqualException>(ex); 1483 Assert.IsType<EqualException>(ex); 1539 Assert.IsType<EqualException>(ex); 1557 Assert.IsType<EqualException>(ex); 1574 Assert.IsType<EqualException>(ex); 1618 Assert.IsType<NotEmptyException>(ex); 1655 Assert.IsType<NotEqualException>(ex); 1692 Assert.IsType<NotEqualException>(ex); 1708 Assert.IsType<NotEqualException>(ex); 1743 Assert.IsType<NotEqualException>(ex); 1781 Assert.IsType<NotEqualException>(ex); 1809 Assert.IsType<NotEqualException>(ex); 1818 Assert.IsType<DivideByZeroException>(ex.InnerException); 1845 Assert.IsType<NotEqualException>(ex); 1891 Assert.IsType<NotEqualException>(ex); 1911 Assert.IsType<NotEqualException>(ex); 1920 Assert.IsType<DivideByZeroException>(ex.InnerException); 1934 Assert.IsType<NotEqualException>(ex); 1951 Assert.IsType<NotEqualException>(ex); 2020 Assert.IsType<NotEqualException>(ex); 2059 Assert.IsType<NotEqualException>(ex); 2117 Assert.IsType<NotEqualException>(ex); 2170 Assert.IsType<NotEqualException>(ex); 2192 Assert.IsType<NotEqualException>(ex); 2213 Assert.IsType<NotEqualException>(ex); 2291 Assert.IsType<SingleException>(ex); 2312 Assert.IsType<SingleException>(ex); 2327 Assert.IsType<SingleException>(ex); 2367 Assert.IsType<SingleException>(ex); 2383 Assert.IsType<SingleException>(ex); 2400 Assert.IsType<SingleException>(ex); 2426 Assert.IsType<SingleException>(ex); 2447 Assert.IsType<SingleException>(ex); 2462 Assert.IsType<SingleException>(ex); 2487 Assert.IsType<SingleException>(ex); 2522 Assert.IsType<SingleException>(ex); 2538 Assert.IsType<SingleException>(ex); 2555 Assert.IsType<SingleException>(ex); 2582 Assert.IsType<SingleException>(ex);
DictionaryAssertsTests.cs (2)
45 Assert.IsType<ContainsException>(ex); 97 Assert.IsType<DoesNotContainException>(ex);
EqualityAssertsTests.cs (163)
28 Assert.IsType<EqualException>(ex); 47 Assert.IsType<EqualException>(ex); 80 Assert.IsType<EqualException>(ex); 108 Assert.IsType<EqualException>(ex); 115 Assert.IsType<DivideByZeroException>(ex.InnerException); 131 Assert.IsType<EqualException>(ex); 138 Assert.IsType<DivideByZeroException>(ex.InnerException); 169 Assert.IsType<EqualException>(ex); 183 Assert.IsType<EqualException>(ex); 190 Assert.IsType<DivideByZeroException>(ex.InnerException); 204 Assert.IsType<EqualException>(ex); 211 Assert.IsType<DivideByZeroException>(ex.InnerException); 235 Assert.IsType<EqualException>(ex); 265 Assert.IsType<EqualException>(ex); 299 Assert.IsType<EqualException>(ex); 330 Assert.IsType<EqualException>(ex); 356 Assert.IsType<EqualException>(ex); 382 Assert.IsType<EqualException>(ex); 408 Assert.IsType<EqualException>(ex); 438 Assert.IsType<EqualException>(ex); 473 Assert.IsType<EqualException>(ex); 503 Assert.IsType<EqualException>(ex); 529 Assert.IsType<EqualException>(ex); 558 Assert.IsType<EqualException>(ex); 590 Assert.IsType<EqualException>(ex); 616 Assert.IsType<EqualException>(ex); 642 Assert.IsType<EqualException>(ex); 668 Assert.IsType<EqualException>(ex); 698 Assert.IsType<EqualException>(ex); 728 Assert.IsType<EqualException>(ex); 765 Assert.IsType<EqualException>(ex); 800 Assert.IsType<EqualException>(ex); 824 Assert.IsType<EqualException>(ex); 861 Assert.IsType<EqualException>(ex); 893 Assert.IsType<EqualException>(ex); 924 Assert.IsType<EqualException>(ex); 956 Assert.IsType<EqualException>(ex); 988 Assert.IsType<EqualException>(ex); 1007 Assert.IsType<EqualException>(ex); 1030 Assert.IsType<EqualException>(ex); 1044 Assert.IsType<EqualException>(ex); 1088 Assert.IsType<EqualException>(ex); 1142 Assert.IsType<EqualException>(ex); 1176 Assert.IsType<EqualException>(ex); 1206 Assert.IsType<EqualException>(ex); 1235 Assert.IsType<EqualException>(ex); 1261 Assert.IsType<EqualException>(ex); 1278 Assert.IsType<EqualException>(ex); 1295 Assert.IsType<EqualException>(ex); 1325 Assert.IsType<EqualException>(ex); 1348 Assert.IsType<EqualException>(ex); 1381 Assert.IsType<EqualException>(ex); 1420 Assert.IsType<EqualException>(ex); 1446 Assert.IsType<EqualException>(ex); 1485 Assert.IsType<EqualException>(ex); 1524 Assert.IsType<EqualException>(ex); 1554 Assert.IsType<EqualException>(ex); 1583 Assert.IsType<EqualException>(ex); 1611 Assert.IsType<EqualException>(ex); 1641 Assert.IsType<EqualException>(ex); 1671 Assert.IsType<EqualException>(ex); 1708 Assert.IsType<EqualException>(ex); 1745 Assert.IsType<EqualException>(ex); 1783 Assert.IsType<EqualException>(ex); 1794 Assert.IsType<EqualException>(ex2); 1831 Assert.IsType<EqualException>(ex); 1864 Assert.IsType<EqualException>(ex); 1902 Assert.IsType<EqualException>(ex); 1913 Assert.IsType<EqualException>(ex2); 1951 Assert.IsType<EqualException>(ex); 1962 Assert.IsType<EqualException>(ex2); 1990 Assert.IsType<EqualException>(ex); 2019 Assert.IsType<EqualException>(ex); 2046 Assert.IsType<EqualException>(ex); 2063 var argEx = Assert.IsType<ArgumentException>(ex); 2083 Assert.IsType<EqualException>(ex); 2107 Assert.IsType<EqualException>(ex); 2131 Assert.IsType<EqualException>(ex); 2149 Assert.IsType<EqualException>(ex); 2179 Assert.IsType<EqualException>(ex); 2206 Assert.IsType<EqualException>(ex); 2223 var argEx = Assert.IsType<ArgumentException>(ex); 2243 Assert.IsType<EqualException>(ex); 2267 Assert.IsType<EqualException>(ex); 2291 Assert.IsType<EqualException>(ex); 2309 Assert.IsType<EqualException>(ex); 2329 Assert.IsType<NotEqualException>(ex); 2358 Assert.IsType<NotEqualException>(ex); 2392 Assert.IsType<NotEqualException>(ex); 2399 Assert.IsType<DivideByZeroException>(ex.InnerException); 2415 Assert.IsType<NotEqualException>(ex); 2422 Assert.IsType<DivideByZeroException>(ex.InnerException); 2438 Assert.IsType<NotEqualException>(ex); 2445 Assert.IsType<DivideByZeroException>(ex.InnerException); 2470 Assert.IsType<NotEqualException>(ex); 2490 Assert.IsType<NotEqualException>(ex); 2497 Assert.IsType<DivideByZeroException>(ex.InnerException); 2511 Assert.IsType<NotEqualException>(ex); 2518 Assert.IsType<DivideByZeroException>(ex.InnerException); 2526 Assert.IsType<NotEqualException>(ex); 2533 Assert.IsType<DivideByZeroException>(ex.InnerException); 2547 Assert.IsType<NotEqualException>(ex); 2576 Assert.IsType<NotEqualException>(ex); 2611 Assert.IsType<NotEqualException>(ex); 2642 Assert.IsType<NotEqualException>(ex); 2669 Assert.IsType<NotEqualException>(ex); 2695 Assert.IsType<NotEqualException>(ex); 2721 Assert.IsType<NotEqualException>(ex); 2749 Assert.IsType<NotEqualException>(ex); 2786 Assert.IsType<NotEqualException>(ex); 2816 Assert.IsType<NotEqualException>(ex); 2842 Assert.IsType<NotEqualException>(ex); 2871 Assert.IsType<NotEqualException>(ex); 2900 Assert.IsType<NotEqualException>(ex); 2929 Assert.IsType<NotEqualException>(ex); 2955 Assert.IsType<NotEqualException>(ex); 2981 Assert.IsType<NotEqualException>(ex); 3011 Assert.IsType<NotEqualException>(ex); 3041 Assert.IsType<NotEqualException>(ex); 3076 Assert.IsType<NotEqualException>(ex); 3111 Assert.IsType<NotEqualException>(ex); 3160 Assert.IsType<NotEqualException>(ex); 3191 Assert.IsType<NotEqualException>(ex); 3219 Assert.IsType<NotEqualException>(ex); 3250 Assert.IsType<NotEqualException>(ex); 3280 Assert.IsType<NotEqualException>(ex); 3309 Assert.IsType<NotEqualException>(ex); 3360 Assert.IsType<NotEqualException>(ex); 3395 Assert.IsType<NotEqualException>(ex); 3426 Assert.IsType<NotEqualException>(ex); 3455 Assert.IsType<NotEqualException>(ex); 3481 Assert.IsType<NotEqualException>(ex); 3509 Assert.IsType<NotEqualException>(ex); 3547 Assert.IsType<NotEqualException>(ex); 3567 Assert.IsType<NotEqualException>(ex); 3606 Assert.IsType<NotEqualException>(ex); 3658 Assert.IsType<NotEqualException>(ex); 3697 Assert.IsType<NotEqualException>(ex); 3740 Assert.IsType<NotEqualException>(ex); 3755 Assert.IsType<NotEqualException>(ex); 3780 Assert.IsType<NotEqualException>(ex); 3801 Assert.IsType<NotEqualException>(ex); 3829 Assert.IsType<NotEqualException>(ex); 3860 Assert.IsType<NotEqualException>(ex); 3890 Assert.IsType<NotEqualException>(ex); 3927 Assert.IsType<NotEqualException>(ex); 3958 Assert.IsType<NotEqualException>(ex); 3987 Assert.IsType<NotEqualException>(ex); 4014 Assert.IsType<NotEqualException>(ex); 4037 var argEx = Assert.IsType<ArgumentException>(ex); 4051 Assert.IsType<NotEqualException>(ex); 4075 Assert.IsType<NotEqualException>(ex); 4099 Assert.IsType<NotEqualException>(ex); 4135 Assert.IsType<NotEqualException>(ex); 4162 Assert.IsType<NotEqualException>(ex); 4185 var argEx = Assert.IsType<ArgumentException>(ex); 4199 Assert.IsType<NotEqualException>(ex); 4223 Assert.IsType<NotEqualException>(ex); 4247 Assert.IsType<NotEqualException>(ex); 4277 Assert.IsType<NotStrictEqualException>(ex); 4303 Assert.IsType<NotStrictEqualException>(ex); 4330 Assert.IsType<StrictEqualException>(ex); 4344 Assert.IsType<StrictEqualException>(ex);
EquivalenceAssertsTests.cs (70)
31 Assert.IsType<EquivalentException>(ex); 63 Assert.IsType<EquivalentException>(ex); 91 Assert.IsType<EquivalentException>(ex); 106 Assert.IsType<EquivalentException>(ex); 135 Assert.IsType<EquivalentException>(ex); 164 Assert.IsType<EquivalentException>(ex); 187 Assert.IsType<EquivalentException>(ex); 201 Assert.IsType<EquivalentException>(ex); 224 Assert.IsType<EquivalentException>(ex); 247 Assert.IsType<EquivalentException>(ex); 279 Assert.IsType<EquivalentException>(ex); 302 Assert.IsType<EquivalentException>(ex); 351 Assert.IsType<EquivalentException>(ex); 380 Assert.IsType<EquivalentException>(ex); 409 Assert.IsType<EquivalentException>(ex); 438 Assert.IsType<EquivalentException>(ex); 467 Assert.IsType<EquivalentException>(ex); 513 Assert.IsType<EquivalentException>(ex); 534 Assert.IsType<EquivalentException>(ex); 558 Assert.IsType<EquivalentException>(ex); 590 Assert.IsType<EquivalentException>(ex); 607 Assert.IsType<EquivalentException>(ex); 639 Assert.IsType<EquivalentException>(ex); 653 Assert.IsType<EquivalentException>(ex); 670 Assert.IsType<EquivalentException>(ex); 687 Assert.IsType<EquivalentException>(ex); 721 Assert.IsType<EquivalentException>(ex); 738 Assert.IsType<EquivalentException>(ex); 770 Assert.IsType<EquivalentException>(ex); 784 Assert.IsType<EquivalentException>(ex); 801 Assert.IsType<EquivalentException>(ex); 818 Assert.IsType<EquivalentException>(ex); 858 Assert.IsType<EquivalentException>(ex); 875 Assert.IsType<EquivalentException>(ex); 913 Assert.IsType<EquivalentException>(ex); 930 Assert.IsType<EquivalentException>(ex); 947 Assert.IsType<EquivalentException>(ex); 964 Assert.IsType<EquivalentException>(ex); 1002 Assert.IsType<EquivalentException>(ex); 1019 Assert.IsType<EquivalentException>(ex); 1057 Assert.IsType<EquivalentException>(ex); 1074 Assert.IsType<EquivalentException>(ex); 1091 Assert.IsType<EquivalentException>(ex); 1108 Assert.IsType<EquivalentException>(ex); 1199 Assert.IsType<EquivalentException>(ex); 1216 Assert.IsType<EquivalentException>(ex); 1233 Assert.IsType<EquivalentException>(ex); 1250 Assert.IsType<EquivalentException>(ex); 1288 Assert.IsType<EquivalentException>(ex); 1305 Assert.IsType<EquivalentException>(ex); 1322 Assert.IsType<EquivalentException>(ex); 1339 Assert.IsType<EquivalentException>(ex); 1368 Assert.IsType<EquivalentException>(ex); 1385 Assert.IsType<EquivalentException>(ex); 1414 Assert.IsType<EquivalentException>(ex); 1431 Assert.IsType<EquivalentException>(ex); 1462 Assert.IsType<EquivalentException>(ex); 1479 Assert.IsType<EquivalentException>(ex); 1486 Assert.IsType<ArgumentException>(ex.InnerException); // Thrown by DateTime.CompareTo 1517 Assert.IsType<EquivalentException>(ex); 1554 Assert.IsType<EquivalentException>(ex); 1576 Assert.IsType<EquivalentException>(ex); 1589 Assert.IsType<EquivalentException>(ex); 1607 Assert.IsType<EquivalentException>(ex); 1640 Assert.IsType<EquivalentException>(ex); 1652 Assert.IsType<EquivalentException>(ex); 1667 Assert.IsType<EquivalentException>(ex); 1699 Assert.IsType<EquivalentException>(ex); 1728 Assert.IsType<EquivalentException>(ex); 1757 Assert.IsType<EquivalentException>(ex);
EventAssertsTests.cs (16)
23 Assert.IsType<RaisesException>(ex); 45 Assert.IsType<RaisesException>(ex); 80 Assert.IsType<RaisesException>(ex); 105 Assert.IsType<RaisesException>(ex); 145 Assert.IsType<RaisesException>(ex); 190 Assert.IsType<RaisesAnyException>(ex); 249 Assert.IsType<RaisesAnyException>(ex); 271 Assert.IsType<RaisesAnyException>(ex); 364 Assert.IsType<RaisesAnyException>(ex); 423 Assert.IsType<RaisesAnyException>(ex); 445 Assert.IsType<RaisesAnyException>(ex); 538 Assert.IsType<RaisesException>(ex); 560 Assert.IsType<RaisesException>(ex); 595 Assert.IsType<RaisesException>(ex); 620 Assert.IsType<RaisesException>(ex); 660 Assert.IsType<RaisesException>(ex);
ExceptionAssertsTests.cs (36)
29 Assert.IsType<ThrowsException>(ex); 54 Assert.IsType<ThrowsException>(ex); 72 Assert.IsType<ThrowsException>(ex); 101 Assert.IsType<InvalidOperationException>(ex); 112 Assert.IsType<ThrowsException>(ex); 137 Assert.IsType<ThrowsException>(ex); 155 Assert.IsType<ThrowsException>(ex); 185 Assert.IsType<ThrowsException>(ex); 210 Assert.IsType<ThrowsException>(ex); 228 Assert.IsType<ThrowsException>(ex); 254 Assert.IsType<InvalidOperationException>(ex); 265 Assert.IsType<ThrowsException>(ex); 290 Assert.IsType<ThrowsException>(ex); 308 Assert.IsType<ThrowsException>(ex); 337 Assert.IsType<ThrowsException>(ex); 361 Assert.IsType<ThrowsException>(ex); 379 Assert.IsType<ThrowsException>(ex); 397 Assert.IsType<ThrowsException>(ex); 423 Assert.IsType<ThrowsException>(ex); 447 Assert.IsType<ThrowsException>(ex); 465 Assert.IsType<ThrowsException>(ex); 483 Assert.IsType<ThrowsException>(ex); 512 Assert.IsType<ThrowsAnyException>(ex); 537 Assert.IsType<ThrowsAnyException>(ex); 571 Assert.IsType<InvalidOperationException>(ex); 582 Assert.IsType<ThrowsAnyException>(ex); 607 Assert.IsType<ThrowsAnyException>(ex); 642 Assert.IsType<ThrowsAnyException>(ex); 667 Assert.IsType<ThrowsAnyException>(ex); 701 Assert.IsType<ThrowsException>(ex); 726 Assert.IsType<ThrowsException>(ex); 744 Assert.IsType<ThrowsException>(ex); 770 Assert.IsType<ThrowsException>(ex); 794 Assert.IsType<ThrowsException>(ex); 812 Assert.IsType<ThrowsException>(ex); 830 Assert.IsType<ThrowsException>(ex);
FailAssertsTests.cs (2)
11 Assert.IsType<FailException>(ex); 20 Assert.IsType<FailException>(ex);
IdentityAssertsTests.cs (2)
16 Assert.IsType<NotSameException>(ex); 42 Assert.IsType<SameException>(ex);
MemoryAssertsTests.cs (31)
32 Assert.IsType<ContainsException>(ex); 46 Assert.IsType<ContainsException>(ex); 72 Assert.IsType<ContainsException>(ex); 86 Assert.IsType<ContainsException>(ex); 105 Assert.IsType<ContainsException>(ex); 146 Assert.IsType<ContainsException>(ex); 160 Assert.IsType<ContainsException>(ex); 174 Assert.IsType<ContainsException>(ex); 225 Assert.IsType<DoesNotContainException>(ex); 240 Assert.IsType<DoesNotContainException>(ex); 255 Assert.IsType<DoesNotContainException>(ex); 270 Assert.IsType<DoesNotContainException>(ex); 297 Assert.IsType<DoesNotContainException>(ex); 312 Assert.IsType<DoesNotContainException>(ex); 327 Assert.IsType<DoesNotContainException>(ex); 369 Assert.IsType<DoesNotContainException>(ex); 384 Assert.IsType<DoesNotContainException>(ex); 407 Assert.IsType<DoesNotContainException>(ex); 437 Assert.IsType<EndsWithException>(ex); 459 Assert.IsType<EndsWithException>(ex); 490 Assert.IsType<EndsWithException>(ex); 513 Assert.IsType<EndsWithException>(ex); 641 Assert.IsType<EqualException>(ex); 661 Assert.IsType<EqualException>(ex); 738 Assert.IsType<EqualException>(ex); 762 Assert.IsType<EqualException>(ex); 818 Assert.IsType<EqualException>(ex); 854 Assert.IsType<StartsWithException>(ex); 876 Assert.IsType<StartsWithException>(ex); 907 Assert.IsType<StartsWithException>(ex); 930 Assert.IsType<StartsWithException>(ex);
MultipleAssertsTests.cs (5)
29 Assert.IsType<TrueException>(ex); 51 Assert.IsType<FalseException>(ex); 64 var multiEx = Assert.IsType<MultipleException>(ex); 71 innerEx => Assert.IsType<TrueException>(innerEx), 72 innerEx => Assert.IsType<FalseException>(innerEx)
NullAssertsTests.cs (5)
22 Assert.IsType<int>(result); 31 Assert.IsType<NotNullException>(ex); 42 Assert.IsType<NotNullException>(ex); 68 Assert.IsType<NullException>(ex); 84 Assert.IsType<NullException>(ex);
PropertyAssertsTests.cs (4)
26 Assert.IsType<PropertyChangedException>(ex); 37 Assert.IsType<PropertyChangedException>(ex); 79 Assert.IsType<PropertyChangedException>(ex); 92 Assert.IsType<PropertyChangedException>(ex);
RangeAssertsTests.cs (9)
19 Assert.IsType<InRangeException>(ex); 39 Assert.IsType<InRangeException>(ex); 53 Assert.IsType<InRangeException>(ex); 73 Assert.IsType<InRangeException>(ex); 106 Assert.IsType<InRangeException>(ex); 129 Assert.IsType<NotInRangeException>(ex); 149 Assert.IsType<NotInRangeException>(ex); 169 Assert.IsType<NotInRangeException>(ex); 186 Assert.IsType<NotInRangeException>(ex);
SetAssertsTests.cs (11)
40 Assert.IsType<ContainsException>(ex); 90 Assert.IsType<DoesNotContainException>(ex); 128 Assert.IsType<ProperSubsetException>(ex); 154 Assert.IsType<ProperSubsetException>(ex); 168 Assert.IsType<ProperSubsetException>(ex); 194 Assert.IsType<ProperSupersetException>(ex); 220 Assert.IsType<ProperSupersetException>(ex); 234 Assert.IsType<ProperSupersetException>(ex); 278 Assert.IsType<SubsetException>(ex); 292 Assert.IsType<SubsetException>(ex); 349 Assert.IsType<SupersetException>(ex);
SpanAssertsTests.cs (31)
32 Assert.IsType<ContainsException>(ex); 46 Assert.IsType<ContainsException>(ex); 72 Assert.IsType<ContainsException>(ex); 86 Assert.IsType<ContainsException>(ex); 105 Assert.IsType<ContainsException>(ex); 146 Assert.IsType<ContainsException>(ex); 160 Assert.IsType<ContainsException>(ex); 174 Assert.IsType<ContainsException>(ex); 225 Assert.IsType<DoesNotContainException>(ex); 240 Assert.IsType<DoesNotContainException>(ex); 255 Assert.IsType<DoesNotContainException>(ex); 270 Assert.IsType<DoesNotContainException>(ex); 297 Assert.IsType<DoesNotContainException>(ex); 312 Assert.IsType<DoesNotContainException>(ex); 327 Assert.IsType<DoesNotContainException>(ex); 369 Assert.IsType<DoesNotContainException>(ex); 384 Assert.IsType<DoesNotContainException>(ex); 407 Assert.IsType<DoesNotContainException>(ex); 437 Assert.IsType<EndsWithException>(ex); 459 Assert.IsType<EndsWithException>(ex); 490 Assert.IsType<EndsWithException>(ex); 513 Assert.IsType<EndsWithException>(ex); 641 Assert.IsType<EqualException>(ex); 661 Assert.IsType<EqualException>(ex); 738 Assert.IsType<EqualException>(ex); 762 Assert.IsType<EqualException>(ex); 818 Assert.IsType<EqualException>(ex); 854 Assert.IsType<StartsWithException>(ex); 876 Assert.IsType<StartsWithException>(ex); 907 Assert.IsType<StartsWithException>(ex); 930 Assert.IsType<StartsWithException>(ex);
StringAssertsTests.cs (26)
33 Assert.IsType<ContainsException>(ex); 62 Assert.IsType<ContainsException>(ex); 89 Assert.IsType<ContainsException>(ex); 108 Assert.IsType<ContainsException>(ex); 188 Assert.IsType<DoesNotContainException>(ex); 224 Assert.IsType<DoesNotContainException>(ex); 254 Assert.IsType<DoesNotContainException>(ex); 284 Assert.IsType<DoesNotContainException>(ex); 314 Assert.IsType<DoesNotContainException>(ex); 357 Assert.IsType<DoesNotMatchException>(ex); 387 Assert.IsType<DoesNotMatchException>(ex); 417 Assert.IsType<EmptyException>(ex); 451 Assert.IsType<EndsWithException>(ex); 480 Assert.IsType<EndsWithException>(ex); 523 Assert.IsType<EndsWithException>(ex); 542 Assert.IsType<EndsWithException>(ex); 681 Assert.IsType<EqualException>(ex); 711 Assert.IsType<EqualException>(ex); 755 Assert.IsType<MatchesException>(ex); 769 Assert.IsType<MatchesException>(ex); 804 Assert.IsType<MatchesException>(ex); 818 Assert.IsType<MatchesException>(ex); 853 Assert.IsType<StartsWithException>(ex); 882 Assert.IsType<StartsWithException>(ex); 925 Assert.IsType<StartsWithException>(ex); 944 Assert.IsType<StartsWithException>(ex);
TypeAssertsTests.cs (20)
22 Assert.IsType<IsAssignableFromException>(result); 73 Assert.IsType<IsAssignableFromException>(result); 91 Assert.IsType<IsAssignableFromException>(result); 142 Assert.IsType<IsAssignableFromException>(result); 168 Assert.IsType<IsNotAssignableFromException>(result); 184 Assert.IsType<IsNotAssignableFromException>(result); 200 Assert.IsType<IsNotAssignableFromException>(result); 231 Assert.IsType<IsNotAssignableFromException>(result); 247 Assert.IsType<IsNotAssignableFromException>(result); 263 Assert.IsType<IsNotAssignableFromException>(result); 294 Assert.IsType<IsNotTypeException>(result); 326 Assert.IsType<IsNotTypeException>(result); 350 Assert.IsType<InvalidCastException>(ex); 358 var result = Assert.IsType<InvalidCastException>(ex); 366 var result = Record.Exception(() => Assert.IsType<InvalidCastException>(new InvalidOperationException())); 368 Assert.IsType<IsTypeException>(result); 402 var result = Record.Exception(() => Assert.IsType<object>(null)); 404 Assert.IsType<IsTypeException>(result); 430 Assert.IsType<IsTypeException>(result); 466 Assert.IsType<IsTypeException>(result);
Microsoft.Extensions.Caching.Hybrid.Tests (22)
BufferReleaseTests.cs (1)
23cache = Assert.IsType<DefaultHybridCache>(provider.GetRequiredService<HybridCache>());
FunctionalTests.cs (1)
17cache = Assert.IsType<DefaultHybridCache>(provider.GetRequiredService<HybridCache>());
RedisTests.cs (1)
50var cache = Assert.IsType<DefaultHybridCache>(provider.GetRequiredService<HybridCache>());
ServiceConstructionTests.cs (16)
31Assert.IsType<DefaultHybridCache>(provider.GetService<HybridCache>()); 44var obj = Assert.IsType<DefaultHybridCache>(provider.GetService<HybridCache>()); 118var cache = Assert.IsType<DefaultHybridCache>(provider.GetRequiredService<HybridCache>()); 120Assert.IsType<InbuiltTypeSerializer>(cache.GetSerializer<string>()); 121Assert.IsType<InbuiltTypeSerializer>(cache.GetSerializer<byte[]>()); 122Assert.IsType<DefaultJsonSerializerFactory.DefaultJsonSerializer<Customer>>(cache.GetSerializer<Customer>()); 123Assert.IsType<DefaultJsonSerializerFactory.DefaultJsonSerializer<Order>>(cache.GetSerializer<Order>()); 132var cache = Assert.IsType<DefaultHybridCache>(provider.GetRequiredService<HybridCache>()); 134Assert.IsType<CustomerSerializer>(cache.GetSerializer<Customer>()); 135Assert.IsType<DefaultJsonSerializerFactory.DefaultJsonSerializer<Order>>(cache.GetSerializer<Order>()); 144var cache = Assert.IsType<DefaultHybridCache>(provider.GetRequiredService<HybridCache>()); 146Assert.IsType<CustomerSerializer>(cache.GetSerializer<Customer>()); 147Assert.IsType<DefaultJsonSerializerFactory.DefaultJsonSerializer<Order>>(cache.GetSerializer<Order>()); 167var cache = Assert.IsType<DefaultHybridCache>(provider.GetRequiredService<HybridCache>()); 179var cache = Assert.IsType<DefaultHybridCache>(provider.GetRequiredService<HybridCache>()); 202var cache = Assert.IsType<DefaultHybridCache>(provider.GetRequiredService<HybridCache>());
SizeTests.cs (2)
21var cache = Assert.IsType<DefaultHybridCache>(provider.GetRequiredService<HybridCache>()); 66var cache = Assert.IsType<DefaultHybridCache>(provider.GetRequiredService<HybridCache>());
StampedeTests.cs (1)
28cache = Assert.IsType<DefaultHybridCache>(provider.GetRequiredService<HybridCache>());
Microsoft.Extensions.Caching.SqlServer.Tests (1)
SqlServerCacheServicesExtensionsTest.cs (1)
52Assert.IsType<SqlServerCache>(serviceProvider.GetRequiredService<IDistributedCache>());
Microsoft.Extensions.Compliance.Redaction.Tests (5)
RedactorProviderTests.cs (5)
20Assert.IsType<NullRedactor>(redactorProvider.GetRedactor(DataClassification.None)); 56Assert.IsType<ErasingRedactor>(r1); 57Assert.IsType<NullRedactor>(r2); 58Assert.IsType<ErasingRedactor>(r3); 59Assert.IsType<NullRedactor>(r4);
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (4)
ManualHealthCheckExtensionsTests.cs (1)
56_ = Assert.IsType<T>(r.Factory(serviceProvider));
TelemetryHealthChecksPublisherExtensionsTests.cs (3)
28_ = Assert.IsType<TelemetryHealthCheckPublisher>(publisher); 48_ = Assert.IsType<TelemetryHealthCheckPublisher>(publisher); 66_ = Assert.IsType<TelemetryHealthCheckPublisher>(publisher);
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (6)
DependencyInjection\HealthChecksBuilderTest.cs (6)
59Assert.IsType<TestHealthCheck>(registration.Factory(serviceProvider)); 105var check = Assert.IsType<TestHealthCheckWithArgs>(registration.Factory(serviceProvider)); 130Assert.IsType<DelegateHealthCheck>(registration.Factory(serviceProvider)); 153Assert.IsType<DelegateHealthCheck>(registration.Factory(serviceProvider)); 176Assert.IsType<DelegateHealthCheck>(registration.Factory(serviceProvider)); 199Assert.IsType<DelegateHealthCheck>(registration.Factory(serviceProvider));
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (6)
ResourceMonitoringBuilderTests.cs (1)
28Assert.IsType<EmptyPublisher>(publisher);
ResourceMonitoringExtensionsTests.cs (2)
47Assert.IsType<ResourceMonitorService>(trackerService); 63Assert.IsType<ResourceMonitorService>(trackerService);
ResourceMonitoringServiceTests.cs (3)
155Assert.IsType<IResourceUtilizationPublisher[]>(publishers); 183Assert.IsType<IResourceUtilizationPublisher[]>(publishers); 714Assert.IsType<ArgumentOutOfRangeException>(exception);
Microsoft.Extensions.FileProviders.Embedded.Tests (9)
ManifestEmbeddedFileProviderTests.cs (9)
104Assert.IsType<NotFoundFileInfo>(file); 124Assert.IsType<NotFoundFileInfo>(file); 144Assert.IsType<NotFoundFileInfo>(file); 211Assert.IsType<NotFoundFileInfo>(jqueryValidate); 236Assert.IsType<NotFoundFileInfo>(file); 331Assert.IsType<NotFoundDirectoryContents>(contents); 349Assert.IsType<NotFoundDirectoryContents>(contents); 374Assert.IsType<NotFoundDirectoryContents>(directory); 467Assert.IsType<NotFoundFileInfo>(jqueryValidate);
Microsoft.Extensions.Hosting.Testing.Tests (21)
FakeHostBuilderTests.cs (5)
48Assert.IsType<FakeLogger>(hostBuilderServices.GetService<ILogger>()); 137Assert.IsType<AggregateException>(exception); 140x => Assert.IsType<InvalidOperationException>(x)); 169Assert.IsType<AggregateException>(exception); 172x => Assert.IsType<InvalidOperationException>(x));
HostingFakesExtensionsTests.cs (16)
22Assert.IsType<ArgumentNullException>(exception); 54Assert.IsType<InvalidOperationException>(exception); 76Assert.IsType<InvalidOperationException>(exception); 94Assert.IsType<ArgumentNullException>(exception); 101Assert.IsType<ArgumentNullException>(exception); 110Assert.IsType<ArgumentNullException>(exception); 138source => Assert.IsType<ChainedConfigurationSource>(source), 141Assert.IsType<FakeConfigurationSource>(source); 164source => Assert.IsType<ChainedConfigurationSource>(source), 167Assert.IsType<FakeConfigurationSource>(source); 196Assert.IsType<FakeConfigurationSource>(source); 224source => Assert.IsType<ChainedConfigurationSource>(source), 227Assert.IsType<FakeConfigurationSource>(source); 250source => Assert.IsType<ChainedConfigurationSource>(source), 253Assert.IsType<FakeConfigurationSource>(source); 282Assert.IsType<FakeConfigurationSource>(source);
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Logging\AcceptanceTests.cs (2)
55var testEnricher = Assert.IsType<EnricherWithCounter>(enricher); 81Assert.IsType<NotSupportedException>(firstLogRecord.Exception);
Microsoft.Extensions.Http.Polly.Tests (27)
DependencyInjection\PollyHttpClientBuilderExtensionsTest.cs (27)
62h => Assert.IsType<LoggingScopeHttpMessageHandler>(h), 63h => Assert.IsType<PolicyHttpMessageHandler>(h), 64h => Assert.IsType<LoggingHttpMessageHandler>(h)); 97h => Assert.IsType<LoggingScopeHttpMessageHandler>(h), 98h => Assert.IsType<PolicyHttpMessageHandler>(h), 99h => Assert.IsType<LoggingHttpMessageHandler>(h)); 135h => Assert.IsType<LoggingScopeHttpMessageHandler>(h), 136h => Assert.IsType<PolicyHttpMessageHandler>(h), 137h => Assert.IsType<LoggingHttpMessageHandler>(h)); 176h => Assert.IsType<LoggingScopeHttpMessageHandler>(h), 177h => Assert.IsType<PolicyHttpMessageHandler>(h), 178h => Assert.IsType<LoggingHttpMessageHandler>(h)); 220h => Assert.IsType<LoggingScopeHttpMessageHandler>(h), 221h => Assert.IsType<PolicyHttpMessageHandler>(h), 222h => Assert.IsType<LoggingHttpMessageHandler>(h)); 273h => Assert.IsType<LoggingScopeHttpMessageHandler>(h), 274h => Assert.IsType<PolicyHttpMessageHandler>(h), 275h => Assert.IsType<LoggingHttpMessageHandler>(h)); 318h => Assert.IsType<LoggingScopeHttpMessageHandler>(h), 319h => Assert.IsType<PolicyHttpMessageHandler>(h), 320h => Assert.IsType<LoggingHttpMessageHandler>(h)); 361h => Assert.IsType<LoggingScopeHttpMessageHandler>(h), 362h => Assert.IsType<PolicyHttpMessageHandler>(h), 363h => Assert.IsType<LoggingHttpMessageHandler>(h)); 432h => Assert.IsType<LoggingScopeHttpMessageHandler>(h), 433h => Assert.IsType<PolicyHttpMessageHandler>(h), 434h => Assert.IsType<LoggingHttpMessageHandler>(h));
Microsoft.Extensions.ObjectPool.Tests (2)
DefaultObjectPoolProviderTest.cs (2)
21Assert.IsType<DefaultObjectPool<object>>(pool); 34Assert.IsType<DisposableObjectPool<DisposableObject>>(pool);
Microsoft.Extensions.Options.Contextual.Tests (2)
ContextualOptionsServiceCollectionExtensionsTests.cs (2)
24Assert.IsType<ContextualOptions<object, WeatherForecastContext>>(provider.GetRequiredService<IContextualOptions<object, WeatherForecastContext>>()); 25Assert.IsType<ContextualOptions<object, WeatherForecastContext>>(provider.GetRequiredService<INamedContextualOptions<object, WeatherForecastContext>>());
Microsoft.Extensions.SecretManager.Tools.Tests (1)
SetCommandTest.cs (1)
84Assert.IsType<SetCommand.ForOneValueStrategy>(options.Command);
Microsoft.Extensions.Telemetry.Tests (2)
Enrichment\ApplicationEnricherExtensionsTests.cs (1)
87Assert.IsType<ApplicationLogEnricher>(enricher);
Enrichment\ProcessEnricherExtensionsTests.cs (1)
85Assert.IsType<ProcessLogEnricher>(enricher);
Microsoft.JSInterop.Tests (6)
Infrastructure\DotNetDispatcherTest.cs (3)
145var resultDto2 = Assert.IsType<DotNetObjectReference<TestDTO>>(jsRuntime.GetObjectReference(property.GetInt64())).Value; 609var resultJson = Assert.IsType<string>(jsRuntime.LastCompletionResult.ResultJson); 802var value = Assert.IsType<TestDTO>(Assert.Single(result));
JSRuntimeTest.cs (3)
201var exception = Assert.IsType<AggregateException>(task.AsTask().Exception); 202var jsException = Assert.IsType<JSException>(exception.InnerException); 314var error = Assert.IsType<JSError>(call.ResultError);
Microsoft.ML.IntegrationTests (14)
ModelFiles.cs (12)
180Assert.Empty(Assert.IsType<TransformerChain<ITransformer>>(t)); 181Assert.Empty(Assert.IsType<TransformerChain<ITransformer>>(t1)); 195Assert.IsType<GamBinaryModelParameters>( 209var fromComposite = Assert.Single(Assert.IsType<TransformerChain<ITransformer>>( 210Assert.IsType<CompositeDataLoader<IMultiStreamSource, ITransformer>>(loadedCompositeLoader).Transformer)); 399Assert.Empty(Assert.IsType<TransformerChain<ITransformer>>(loadedWithSchema)); 400Assert.Empty(Assert.IsType<TransformerChain<ITransformer>>(loadedWithLoader)); 414var compositeLoader = Assert.IsType<CompositeDataLoader<IMultiStreamSource, ITransformer>>(loadedLoaderWithTransformer); 416Assert.IsType<NormalizingTransformer>(Assert.Single(compositeLoader.Transformer)); 443Assert.IsType<NormalizingTransformer>(loadedWithSchema); 444Assert.IsType<NormalizingTransformer>(loadedWithLoader); 445Assert.IsType<TextLoader>(loadedLoaderWithTransformer);
Validation.cs (2)
48Assert.IsType<RegressionMetrics>(cvResult[0].Metrics); 49Assert.IsType<TransformerChain<RegressionPredictionTransformer<OlsModelParameters>>>(cvResult[0].Model);
System.Drawing.Common.Tests (54)
System\Drawing\BitmapTests.cs (1)
472using Bitmap clone = Assert.IsType<Bitmap>(bitmap.Clone());
System\Drawing\BrushesTests.cs (1)
159SolidBrush brush = Assert.IsType<SolidBrush>(getBrush());
System\Drawing\Drawing2D\AdjustableArrowCapTests.cs (1)
105using AdjustableArrowCap clone = Assert.IsType<AdjustableArrowCap>(arrowCap.Clone());
System\Drawing\Drawing2D\GraphicsPathTests.cs (13)
103using GraphicsPath clone = Assert.IsType<GraphicsPath>(gp.Clone()); 1149using GraphicsPath clone = Assert.IsType<GraphicsPath>(gp.Clone()); 1158using GraphicsPath clone = Assert.IsType<GraphicsPath>(gp.Clone()); 1167using GraphicsPath clone = Assert.IsType<GraphicsPath>(gp.Clone()); 1176using GraphicsPath clone = Assert.IsType<GraphicsPath>(gp.Clone()); 1186using GraphicsPath clone = Assert.IsType<GraphicsPath>(gp.Clone()); 1196using GraphicsPath clone = Assert.IsType<GraphicsPath>(gp.Clone()); 1211using GraphicsPath clone = Assert.IsType<GraphicsPath>(gp.Clone()); 1226using GraphicsPath clone = Assert.IsType<GraphicsPath>(gp.Clone()); 1236using GraphicsPath clone = Assert.IsType<GraphicsPath>(gp.Clone()); 1246using GraphicsPath clone = Assert.IsType<GraphicsPath>(gp.Clone()); 1256using GraphicsPath clone = Assert.IsType<GraphicsPath>(gp.Clone()); 1271using GraphicsPath clone = Assert.IsType<GraphicsPath>(gp.Clone());
System\Drawing\Drawing2D\HatchBrushTests.cs (3)
60HatchBrush clone = Assert.IsType<HatchBrush>(brush.Clone()); 71SolidBrush brush = Assert.IsType<SolidBrush>(Brushes.Bisque); 72SolidBrush clone = Assert.IsType<SolidBrush>(brush.Clone());
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (1)
236LinearGradientBrush clone = Assert.IsType<LinearGradientBrush>(brush.Clone());
System\Drawing\Drawing2D\MatrixTests.cs (1)
162using Matrix clone = Assert.IsType<Matrix>(matrix.Clone());
System\Drawing\Drawing2D\PathGradientBrushTests.cs (1)
123using PathGradientBrush clone = Assert.IsType<PathGradientBrush>(brush.Clone());
System\Drawing\FontTests.cs (1)
396Font clone = Assert.IsType<Font>(font.Clone());
System\Drawing\Graphics_GetContextTests.cs (3)
17Assert.IsType<object[]>(info); 20Assert.IsType<Region>(infoArray[0]); 21Assert.IsType<Matrix>(infoArray[1]);
System\Drawing\IconTests.cs (2)
282using Icon clone = Assert.IsType<Icon>(icon.Clone()); 294using Icon clone = Assert.IsType<Icon>(icon.Clone());
System\Drawing\PenTests.cs (4)
71Assert.Equal(pen.Color, Assert.IsType<SolidBrush>(pen.Brush).Color); 155Assert.IsType<T>(pen.Brush); 211Pen clone = Assert.IsType<Pen>(pen.Clone()); 1204Assert.IsType<T>(pen.Brush);
System\Drawing\Printing\MarginsConverterTests.cs (4)
62Assert.IsType<Margins>(result); 91Assert.IsType<Margins>(result); 131Assert.IsType<string>(converted); 136Assert.IsType<InstanceDescriptor>(converted);
System\Drawing\Printing\MarginsTests.cs (1)
144Margins clonedMargins = Assert.IsType<Margins>(margins.Clone());
System\Drawing\RegionTests.cs (1)
262using (Region clone = Assert.IsType<Region>(region.Clone()))
System\Drawing\SolidBrushTests.cs (5)
26SolidBrush clone = Assert.IsType<SolidBrush>(brush.Clone()); 42SolidBrush brush = Assert.IsType<SolidBrush>(Brushes.Bisque); 43SolidBrush clone = Assert.IsType<SolidBrush>(brush.Clone()); 96SolidBrush brush = Assert.IsType<SolidBrush>(SystemBrushes.ActiveBorder); 111SolidBrush brush = Assert.IsType<SolidBrush>(SystemBrushes.ActiveBorder);
System\Drawing\StringFormatTests.cs (1)
102using StringFormat format = Assert.IsType<StringFormat>(original.Clone());
System\Drawing\SystemBrushesTests.cs (1)
51SolidBrush brush = Assert.IsType<SolidBrush>(getBrush());
System\Drawing\TextureBrushTests.cs (9)
25Bitmap brushImage = Assert.IsType<Bitmap>(brush.Image); 66Bitmap brushImage = Assert.IsType<Bitmap>(brush.Image); 93Bitmap brushImage = Assert.IsType<Bitmap>(brush.Image); 114Bitmap brushImage = Assert.IsType<Bitmap>(brush.Image); 147Bitmap brushImage = Assert.IsType<Bitmap>(brush.Image); 168Bitmap brushImage = Assert.IsType<Bitmap>(brush.Image); 202Bitmap brushImage = Assert.IsType<Bitmap>(brush.Image); 224Bitmap brushImage = Assert.IsType<Bitmap>(brush.Image); 304TextureBrush clone = Assert.IsType<TextureBrush>(brush.Clone());
System.Private.Windows.Core.TestUtilities (1)
BinarySerialization.cs (1)
66return Assert.IsType<T>(@object);
System.ServiceModel.Http.Tests (1)
Channels\HttpRequestMessagePropertyTest.cs (1)
38Assert.IsType<HttpRequestMessageProperty>(copyMessageProperty);
System.ServiceModel.Primitives.Tests (39)
IdentityModel\SecurityTokenManagerTest.cs (7)
26Assert.IsType<SecurityTokenAuthenticatorImpl>(authenticator); 27Assert.IsType<SecurityTokenResolverImpl>(resolver); 28Assert.IsType<SecurityTokenProviderSyncImpl>(provider); 29Assert.IsType<SecurityTokenSerializerImpl>(serializer); 37Assert.IsType<SecurityTokenRequirement>(tokenRequirement); 44Assert.IsType<SecurityTokenRequirement>(tokenRequirement); 50Assert.IsType<SecurityTokenVersionImpl>(tokenVersion);
IdentityModel\SecurityTokenProviderTest.cs (28)
24Assert.IsType<DummySecurityToken>(token); 27Assert.IsType<DummySecurityToken>(token); 34Assert.IsType<DummySecurityToken>(token); 38Assert.IsType<DummySecurityToken>(token); 45Assert.IsType<DummySecurityToken>(token); 48Assert.IsType<DummySecurityToken>(token); 60Assert.IsType<DummySecurityToken>(token); 63Assert.IsType<DummySecurityToken>(token); 70Assert.IsType<DummySecurityToken>(token); 74Assert.IsType<DummySecurityToken>(token); 81Assert.IsType<DummySecurityToken>(token); 84Assert.IsType<DummySecurityToken>(token); 98Assert.IsType<DummySecurityToken>(token); 101Assert.IsType<DummySecurityToken>(token); 108Assert.IsType<DummySecurityToken>(token); 112Assert.IsType<DummySecurityToken>(token); 119Assert.IsType<DummySecurityToken>(token); 122Assert.IsType<DummySecurityToken>(token); 140Assert.IsType<DummySecurityToken>(tokenToBeRenewed); 146Assert.IsType<DummySecurityToken>(token); 174Assert.IsType<DummySecurityToken>(tokenToBeRenewed); 180Assert.IsType<DummySecurityToken>(tokenToBeRenewed); 193Assert.IsType<DummySecurityToken>(token); 199Assert.IsType<DummySecurityToken>(token); 228Assert.IsType<DummySecurityToken>(tokenToBeRenewed); 234Assert.IsType<DummySecurityToken>(tokenToBeRenewed); 240Assert.IsType<DummySecurityToken>(token); 246Assert.IsType<DummySecurityToken>(token);
IdentityModel\SecurityTokenSerializerTest.cs (3)
39Assert.IsType<DummySecurityToken>(token); 40Assert.IsType<SecurityKeyIdentifier>(identifier); 41Assert.IsType<SecurityKeyIdentifierClauseImpl>(identifierClause);
ServiceModel\FaultExceptionTest.cs (1)
190Assert.IsType<FaultException<FaultDetail>>(exception);
System.Windows.Forms.Design.Tests (244)
Serialization\PrimitiveCodeDomSerializerTests.cs (1)
49Assert.IsType<CodePrimitiveExpression>(cast.Expression);
System\ComponentModel\Design\ArrayEditorTests.cs (2)
131Assert.IsType<TargetException>(ex.InnerException); 183int[] result = Assert.IsType<int[]>(editor.SetItems(editValue, value));
System\ComponentModel\Design\ByteViewerTests.cs (2)
46ColumnStyle columnStyle = Assert.IsType<ColumnStyle>(Assert.Single(control.ColumnStyles)); 110RowStyle rowStyle = Assert.IsType<RowStyle>(Assert.Single(control.RowStyles));
System\ComponentModel\Design\CollectionEditorTests.cs (4)
177Assert.IsType<Component>(editor.CreateInstance(typeof(Component))); 286Assert.IsType<Component>(editor.CreateInstance(typeof(Component))); 813Assert.IsType<TargetException>(ex.InnerException); 893Assert.IsType<ArrayList>(objects);
System\ComponentModel\Design\CollectionFormTests.cs (2)
528Assert.IsType<Component>(form.CreateInstance(typeof(Component))); 639Assert.IsType<Component>(form.CreateInstance(typeof(Component)));
System\ComponentModel\Design\ComponentDesignerTests.cs (2)
2442Assert.True(Assert.IsType<ReadOnlyAttribute>(result.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly); 2882Assert.True(Assert.IsType<ReadOnlyAttribute>(result.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly);
System\ComponentModel\Design\DesignerActionHeaderItemTests.cs (2)
24Assert.IsType<HybridDictionary>(item.Properties); 42Assert.IsType<HybridDictionary>(item.Properties);
System\ComponentModel\Design\DesignerActionItemTests.cs (1)
24Assert.IsType<HybridDictionary>(item.Properties);
System\ComponentModel\Design\DesignerActionListTests.cs (8)
72DesignerActionMethodItem item1 = Assert.IsType<DesignerActionMethodItem>(items[0]); 78DesignerActionPropertyItem item2 = Assert.IsType<DesignerActionPropertyItem>(items[1]); 84DesignerActionMethodItem item3 = Assert.IsType<DesignerActionMethodItem>(items[2]); 90DesignerActionPropertyItem item4 = Assert.IsType<DesignerActionPropertyItem>(items[3]); 96DesignerActionMethodItem item5 = Assert.IsType<DesignerActionMethodItem>(items[4]); 102DesignerActionPropertyItem item6 = Assert.IsType<DesignerActionPropertyItem>(items[5]); 108DesignerActionMethodItem item7 = Assert.IsType<DesignerActionMethodItem>(items[6]); 114DesignerActionPropertyItem item8 = Assert.IsType<DesignerActionPropertyItem>(items[7]);
System\ComponentModel\Design\DesignerActionMethodItemTests.cs (6)
32Assert.IsType<HybridDictionary>(item.Properties); 58Assert.IsType<HybridDictionary>(item.Properties); 84Assert.IsType<HybridDictionary>(item.Properties); 110Assert.IsType<HybridDictionary>(item.Properties); 136Assert.IsType<HybridDictionary>(item.Properties); 162Assert.IsType<HybridDictionary>(item.Properties);
System\ComponentModel\Design\DesignerActionPropertyItemTests.cs (3)
25Assert.IsType<HybridDictionary>(item.Properties); 45Assert.IsType<HybridDictionary>(item.Properties); 65Assert.IsType<HybridDictionary>(item.Properties);
System\ComponentModel\Design\DesignerActionServiceTests.cs (1)
513Assert.IsType<HybridDictionary>(actionItem.Properties);
System\ComponentModel\Design\DesignerActionTextItemTests.cs (1)
24Assert.IsType<HybridDictionary>(item.Properties);
System\ComponentModel\Design\DesignerHostTests.cs (1)
2254Assert.IsType<RootDesigner>(host.GetDesigner(component));
System\ComponentModel\Design\DesignSurfaceTests.cs (17)
87Assert.IsType<RootDesignerComponent>(surface.Host.RootComponent); 109Assert.IsType<RootDesignerComponent>(surface.Host.RootComponent); 156Assert.IsType<RootDesignerComponent>(surface.Host.RootComponent); 470Exception error = Assert.IsType<InvalidOperationException>(Assert.Single(surface.LoadErrors)); 935Assert.IsType<RootDesignerComponent>(host.RootComponent); 991Assert.IsType<ComponentDocumentDesigner>(surface.CreateDesigner(component, rootDesigner: true)); 992Assert.IsType<ComponentDesigner>(surface.CreateDesigner(component, rootDesigner: false)); 1000Assert.IsType<RootComponentDesigner>(surface.CreateDesigner(component, rootDesigner: true)); 1001Assert.IsType<ComponentDesigner>(surface.CreateDesigner(component, rootDesigner: false)); 1025ComponentWithPublicConstructor instance = Assert.IsType<ComponentWithPublicConstructor>(surface.CreateComponent(typeof(ComponentWithPublicConstructor))); 1033ComponentWithPrivateDefaultConstructor instance = Assert.IsType<ComponentWithPrivateDefaultConstructor>(surface.CreateComponent(typeof(ComponentWithPrivateDefaultConstructor))); 1041ComponentWithIContainerConstructor instance = Assert.IsType<ComponentWithIContainerConstructor>(surface.CreateComponent(typeof(ComponentWithIContainerConstructor))); 1076Assert.IsType<ClassWithPublicConstructor>(surface.CreateInstance(typeof(ClassWithPublicConstructor))); 1083Assert.IsType<ClassWithPrivateDefaultConstructor>(surface.CreateInstance(typeof(ClassWithPrivateDefaultConstructor))); 1090ComponentWithPublicConstructor instance = Assert.IsType<ComponentWithPublicConstructor>(surface.CreateInstance(typeof(ComponentWithPublicConstructor))); 1098ComponentWithPrivateDefaultConstructor instance = Assert.IsType<ComponentWithPrivateDefaultConstructor>(surface.CreateInstance(typeof(ComponentWithPrivateDefaultConstructor))); 1106ComponentWithIContainerConstructor instance = Assert.IsType<ComponentWithIContainerConstructor>(surface.CreateInstance(typeof(ComponentWithIContainerConstructor)));
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationServiceTests.cs (158)
55return Assert.IsType<Dictionary<string, CodeDomComponentSerializationState>>(info.GetValue("State", typeof(Dictionary<string, CodeDomComponentSerializationService.CodeDomComponentSerializationState>))); 151]), Assert.IsType<CodeStatementCollection>(valueState1.Code)); 165]), Assert.IsType<CodeStatementCollection>(valueState2.Code)); 168List<string> names = Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))); 171AssemblyName[] assemblies = Assert.IsType<AssemblyName[]>(info.GetValue("Assemblies", typeof(AssemblyName[]))); 175Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 253]), Assert.IsType<CodeStatementCollection>(valueState.Code)); 256List<string> names = Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))); 259AssemblyName[] assemblies = Assert.IsType<AssemblyName[]>(info.GetValue("Assemblies", typeof(AssemblyName[]))); 263Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 355]), Assert.IsType<CodeStatementCollection>(valueState.Code)); 358List<string> names = Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))); 361AssemblyName[] assemblies = Assert.IsType<AssemblyName[]>(info.GetValue("Assemblies", typeof(AssemblyName[]))); 365Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 400]), Assert.IsType<CodeStatementCollection>(valueState.Code)); 403List<string> names = Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))); 406AssemblyName[] assemblies = Assert.IsType<AssemblyName[]>(info.GetValue("Assemblies", typeof(AssemblyName[]))); 410Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 446]), Assert.IsType<CodeStatementCollection>(valueState.Code)); 449List<string> names = Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))); 452AssemblyName[] assemblies = Assert.IsType<AssemblyName[]>(info.GetValue("Assemblies", typeof(AssemblyName[]))); 456Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 492]), Assert.IsType<CodeStatementCollection>(valueState.Code)); 495List<string> names = Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))); 498AssemblyName[] assemblies = Assert.IsType<AssemblyName[]>(info.GetValue("Assemblies", typeof(AssemblyName[]))); 502Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 541]), Assert.IsType<CodeStatementCollection>(valueState.Code)); 544List<string> names = Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))); 547AssemblyName[] assemblies = Assert.IsType<AssemblyName[]>(info.GetValue("Assemblies", typeof(AssemblyName[]))); 551Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 590]), Assert.IsType<CodeStatementCollection>(valueState.Code)); 593List<string> names = Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))); 596AssemblyName[] assemblies = Assert.IsType<AssemblyName[]>(info.GetValue("Assemblies", typeof(AssemblyName[]))); 600Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 649Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>)))); 652Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 667Assert.NotEmpty(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>)))); 670Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 720string nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 724Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 731nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 735Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 757string nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 761Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 770nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 774Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 805string nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 809Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 819nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 823Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 864string nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 868Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 877nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 881Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 928string nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 932Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 939nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 943Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 965string nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 969Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 978nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 982Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1013string nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1017Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1027nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1031Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1072string nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1076Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1085nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1089Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1138string nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1142Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1149nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1153Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1160nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1164Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1188string nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1192Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1201nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1205Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1214nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1218Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1251string nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1255Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1265nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1269Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1279nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1283Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1326string nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1330Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1339nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1343Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1352nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1356Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1417string nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1421Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1428nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1432Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1439nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1443Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1467string nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1471Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1480nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1484Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1493nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1497Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1530string nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1534Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1544nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1548Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1558nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1562Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1605string nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1609Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1618nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1622Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>)))); 1631nameResult = Assert.IsType<string>(Assert.Single(Assert.IsType<List<string>>(info.GetValue("Names", typeof(List<string>))))); 1635Assert.Empty(Assert.IsType<List<string>>(info.GetValue("Shim", typeof(List<string>))));
System\ComponentModel\Design\Serialization\DesignerSerializationManagerTests.cs (5)
211Assert.IsType<Int64Converter>(property.Converter); 582Assert.IsType<PublicDesignerSerializationProvider>(serializer1); 588Assert.IsType<PublicDesignerSerializationProvider>(serializer2); 1763Assert.IsType<PublicDesignerSerializationProvider>(serializer1); 1769Assert.IsType<PublicDesignerSerializationProvider>(serializer2);
System\Drawing\Design\BitmapEditorTests.cs (2)
77Bitmap result = Assert.IsType<Bitmap>(editor.LoadFromStream(stream)); 90Bitmap result = Assert.IsType<Bitmap>(editor.LoadFromStream(stream));
System\Drawing\Design\ImageEditorTests.cs (1)
133Bitmap result = Assert.IsType<Bitmap>(editor.LoadFromStream(stream));
System\Drawing\Design\MetafileEditorTests.cs (1)
68Metafile result = Assert.IsType<Metafile>(editor.LoadFromStream(stream));
System\Drawing\Design\ToolboxItemTests.cs (8)
382Assert.IsType<Component>(Assert.Single(e.Components)); 389Assert.IsType<Component>(Assert.Single(item.CreateComponents())); 393Assert.IsType<Component>(Assert.Single(item.CreateComponents(null))); 401Assert.IsType<Component>(Assert.Single(item.CreateComponents(null))); 717Assert.IsType<Component>(Assert.Single(e.Components)); 724Assert.IsType<Component>(Assert.Single(item.CreateComponentsCore(null))); 732Assert.IsType<Component>(Assert.Single(item.CreateComponentsCore(null))); 1163Assert.Equal(expectedName.FullName, Assert.IsType<AssemblyName>(actual).FullName);
System\Resources\Tools\StronglyTypedResourceBuilderTests.cs (8)
638byte[] resourceByte = Assert.IsType<byte[]>(mediaPlayerPropertyInfo.GetValue(obj: null)); 639AxHost.State state = Assert.IsType<AxHost.State>(converter.ConvertFrom(resourceByte)); 675byte[] resourceBytes = Assert.IsType<byte[]>(imagePropertyInfo.GetValue(obj: null)); 676using Bitmap resourceBitmap = Assert.IsType<Bitmap>(converter.ConvertFrom(resourceBytes)); 683byte[] resourceByte = Assert.IsType<byte[]>(iconPropertyInfo.GetValue(obj: null)); 684using Icon resourceIcon = Assert.IsType<Icon>(converter.ConvertFrom(resourceByte)); 690string resourceTxtFileContents = Assert.IsType<string>(txtFilePropertyInfo.GetValue(obj: null)); 697Assert.IsType<UnmanagedMemoryStream>(audioPropertyInfo.GetValue(obj: null));
System\Windows\Forms\Design\ImageListImageEditorTests.cs (1)
23var resultImage = Assert.IsType<Bitmap>(result.Image);
System\Windows\Forms\Design\WindowsFormsDesignerOptionServiceTests.cs (5)
33DesignerOptionService.DesignerOptionCollection childCollection = Assert.IsType<DesignerOptionService.DesignerOptionCollection>(Assert.Single(service.Options)); 56DesignerOptionService.DesignerOptionCollection childCollection = Assert.IsType<DesignerOptionService.DesignerOptionCollection>(Assert.Single(service.Options)); 73DesignerOptionService.DesignerOptionCollection childCollection = Assert.IsType<DesignerOptionService.DesignerOptionCollection>(Assert.Single(service.Options)); 80DesignerOptionService.DesignerOptionCollection otherChildCollection = Assert.IsType<DesignerOptionService.DesignerOptionCollection>(Assert.Single(service.Options)); 96DesignerOptionService.DesignerOptionCollection childCollection = Assert.IsType<DesignerOptionService.DesignerOptionCollection>(Assert.Single(service.Options));
ToolStripDesignerTests.cs (2)
51Assert.IsType<Rectangle>(toolStripDesigner.DragBoxFromMouseDown); 59Assert.IsType<int>(toolStripDesigner.IndexOfItemUnderMouseToDrag);
System.Windows.Forms.Interop.Tests (1)
AccessibleObjectTests.cs (1)
461Assert.Equal(1, Assert.IsType<int>(retreivedItem));
System.Windows.Forms.Primitives.Tests (26)
Interop\Oleaut32\VARIANTTests.cs (26)
2008Assert.IsType<byte[]>(array); 2097Assert.IsType<sbyte[]>(array); 2204Assert.IsType<short[]>(array); 2319Assert.IsType<ushort[]>(array); 2434Assert.IsType<int[]>(array); 2549Assert.IsType<int[]>(array); 2651Assert.IsType<uint[]>(array); 2766Assert.IsType<uint[]>(array); 2868Assert.IsType<int[]>(array); 2983Assert.IsType<int[]>(array); 3085Assert.IsType<uint[]>(array); 3200Assert.IsType<uint[]>(array); 3302Assert.IsType<long[]>(array); 3416Assert.IsType<ulong[]>(array); 3531Assert.IsType<float[]>(array); 3646Assert.IsType<double[]>(array); 3761Assert.IsType<uint[]>(array); 3883Assert.IsType<bool[]>(array); 4016Assert.IsType<decimal[]>(array); 4145Assert.IsType<decimal[]>(array); 4265Assert.IsType<DateTime[]>(array); 4395Assert.IsType<string[]>(array); 4527Assert.IsType<object[]>(array); 4709Assert.IsType<object[]>(array); 4892Assert.IsType<object[]>(array); 5098Assert.IsType<object[]>(array);
System.Windows.Forms.Tests (631)
BindingNavigatorTests.cs (3)
117Assert.IsType<ToolStripSeparator>(bn.Items[index++]); 121Assert.IsType<ToolStripSeparator>(bn.Items[index++]); 125Assert.IsType<ToolStripSeparator>(bn.Items[index++]);
System\Resources\ResxDataNodeTests.cs (2)
36Bitmap result = Assert.IsType<Bitmap>(converter.ConvertFrom(bitmapBytes!)); 51var result = Assert.IsType<Bitmap>(converter.ConvertFrom(bitmapBytes!));
System\Windows\Forms\AccessibleObjects\ButtonBase.ButtonBaseAccessibleObjectTests.cs (3)
87ButtonBase.ButtonBaseAccessibleObject instance = Assert.IsType<ButtonBase.ButtonBaseAccessibleObject>(control.CreateAccessibilityInstance()); 106ButtonBase.ButtonBaseAccessibleObject instance = Assert.IsType<ButtonBase.ButtonBaseAccessibleObject>(control.CreateAccessibilityInstance()); 122ButtonBase.ButtonBaseAccessibleObject instance = Assert.IsType<ButtonBase.ButtonBaseAccessibleObject>(control.CreateAccessibilityInstance());
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (1)
70ComboBox.ComboBoxAccessibleObject accessibleObject = Assert.IsType<ComboBox.ComboBoxAccessibleObject>(control.AccessibilityObject);
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (2)
118Assert.IsType<Control.ControlAccessibleObject>(accessibleObject); 138Assert.IsType<Control.ControlAccessibleObject>(accessibleObject);
System\Windows\Forms\AccessibleObjects\HScrollBar.HScrollBarAccessibleObjectTests.cs (2)
48Assert.IsType<ScrollBarAccessibleObject>(scrollBar.AccessibilityObject); 63Assert.IsType<ScrollBarAccessibleObject>(scrollBar.AccessibilityObject);
System\Windows\Forms\AccessibleObjects\ListBox.ListBoxItemAccessibleObjectTests.cs (7)
31Assert.IsType<ListBox.ListBoxAccessibleObject>(control.AccessibilityObject); 41Assert.IsType<ListBox.ListBoxItemAccessibleObject>(itemAccessibleObject); 56Assert.IsType<ListBox.ListBoxItemAccessibleObject>(itemAccessibleObject); 79Assert.IsType<ListBox.ListBoxItemAccessibleObject>(itemAccessibleObject); 95Assert.IsType<ListBox.ListBoxItemAccessibleObject>(itemAccessibleObject); 112Assert.IsType<ListBox.ListBoxItemAccessibleObject>(itemAccessibleObject); 128Assert.IsType<ListBox.ListBoxItemAccessibleObject>(itemAccessibleObject);
System\Windows\Forms\AccessibleObjects\ListVIew.ListViewAccessibleObjectTests.cs (2)
100Assert.IsType<ListViewGroupAccessibleObject>(firstChild); 101Assert.IsType<ListViewGroupAccessibleObject>(lastChild);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemAccessibleObjectTests.cs (10)
1664Assert.IsType<ListViewItemDetailsAccessibleObject>(listView.Items[0].AccessibilityObject); 1667Assert.IsType<ListViewItemLargeIconAccessibleObject>(listView.Items[0].AccessibilityObject); 1670Assert.IsType<ListViewItemListAccessibleObject>(listView.Items[0].AccessibilityObject); 1673Assert.IsType<ListViewItemSmallIconAccessibleObject>(listView.Items[0].AccessibilityObject); 1676Assert.IsType<ListViewItemTileAccessibleObject>(listView.Items[0].AccessibilityObject); 1712Assert.IsType<ListViewItemDetailsAccessibleObject>(listView.Items[0].AccessibilityObject); 1715Assert.IsType<ListViewItemLargeIconAccessibleObject>(listView.Items[0].AccessibilityObject); 1718Assert.IsType<ListViewItemListAccessibleObject>(listView.Items[0].AccessibilityObject); 1721Assert.IsType<ListViewItemSmallIconAccessibleObject>(listView.Items[0].AccessibilityObject); 1724Assert.IsType<ListViewItemTileAccessibleObject>(listView.Items[0].AccessibilityObject);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemImageAccessibleObjectTests.cs (1)
32Assert.IsType<ListViewItemImageAccessibleObject>(imageAccessibleObject);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemWithImageAccessibleObjectTests.cs (3)
51Assert.IsType<ListViewItemImageAccessibleObject>(firstChild); 52Assert.IsType<ListViewItemImageAccessibleObject>(lastChild); 89Assert.IsType<ListViewItemImageAccessibleObject>(listViewItemAccessibleObject.GetChild(0));
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (1)
42Assert.IsType<ListViewSubItemAccessibleObject>(accessibleObject);
System\Windows\Forms\AccessibleObjects\TabControl.TabControlAccessibleObjectTests.cs (38)
84TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 109TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 127TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 138TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 150TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 164TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 180TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 199TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 218TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 239TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 263TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 278TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 292TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 310TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 328TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 345TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 360TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 375TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 391TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 411TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 430TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 459TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 481TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 497TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 509TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 520TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 531TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 542TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 557TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 572TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 587TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 601TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 637TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 648TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 661TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 679TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 699TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 719TabControlAccessibleObject accessibleObject = Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject);
System\Windows\Forms\AccessibleObjects\TabPage.TabAccessibleObjectTests.cs (58)
26TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 61TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 75TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 90TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 111TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 130TabAccessibleObject accessibleObject1 = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 131TabAccessibleObject accessibleObject2 = Assert.IsType<TabAccessibleObject>(pages[1].TabAccessibilityObject); 147TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 161TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 175TabAccessibleObject accessibleObject1 = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 176TabAccessibleObject accessibleObject2 = Assert.IsType<TabAccessibleObject>(pages[1].TabAccessibilityObject); 202TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 217TabAccessibleObject accessibleObject1 = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 218TabAccessibleObject accessibleObject2 = Assert.IsType<TabAccessibleObject>(pages[1].TabAccessibilityObject); 238TabAccessibleObject accessibleObject1 = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 239TabAccessibleObject accessibleObject2 = Assert.IsType<TabAccessibleObject>(pages[1].TabAccessibilityObject); 264TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 278TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 292TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 306TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 320TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 334TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 349TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[1].TabAccessibilityObject); 368TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[1].TabAccessibilityObject); 388TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[1].TabAccessibilityObject); 408TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[1].TabAccessibilityObject); 427TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[1].TabAccessibilityObject); 447TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[1].TabAccessibilityObject); 467TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[1].TabAccessibilityObject); 486TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[1].TabAccessibilityObject); 506TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[1].TabAccessibilityObject); 532TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 558TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 574TabAccessibleObject accessibleObject1 = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 575TabAccessibleObject accessibleObject2 = Assert.IsType<TabAccessibleObject>(pages[1].TabAccessibilityObject); 596TabAccessibleObject accessibleObject1 = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 597TabAccessibleObject accessibleObject2 = Assert.IsType<TabAccessibleObject>(pages[1].TabAccessibilityObject); 619Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 642Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 686Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 705Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 751Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 773Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 816Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 838Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 878Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 943Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 967Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 1010Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 1034Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 1059TabAccessibleObject accessibleObject1 = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 1060TabAccessibleObject accessibleObject2 = Assert.IsType<TabAccessibleObject>(pages[1].TabAccessibilityObject); 1084Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 1085TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 1099Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 1100TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject); 1114Assert.IsType<TabControlAccessibleObject>(tabControl.AccessibilityObject); 1115TabAccessibleObject accessibleObject = Assert.IsType<TabAccessibleObject>(pages[0].TabAccessibilityObject);
System\Windows\Forms\AccessibleObjects\TabPage.TabPageAccessibleObjectTests.cs (22)
93TabPageAccessibleObject accessibleObject = Assert.IsType<TabPageAccessibleObject>(tabPage.AccessibilityObject); 113TabPageAccessibleObject accessibleObject = Assert.IsType<TabPageAccessibleObject>(tabPage.AccessibilityObject); 128TabPageAccessibleObject accessibleObject = Assert.IsType<TabPageAccessibleObject>(tabPage.AccessibilityObject); 160TabPageAccessibleObject accessibleObject = Assert.IsType<TabPageAccessibleObject>(tabPage.AccessibilityObject); 180TabPageAccessibleObject accessibleObject = Assert.IsType<TabPageAccessibleObject>(tabPage.AccessibilityObject); 192TabPageAccessibleObject accessibleObject = Assert.IsType<TabPageAccessibleObject>(tabPage.AccessibilityObject); 209TabPageAccessibleObject accessibleObject = Assert.IsType<TabPageAccessibleObject>(pages[0].AccessibilityObject); 228TabPageAccessibleObject accessibleObject = Assert.IsType<TabPageAccessibleObject>(pages[0].AccessibilityObject); 247TabPageAccessibleObject accessibleObject = Assert.IsType<TabPageAccessibleObject>(pages[0].AccessibilityObject); 268TabPageAccessibleObject accessibleObject1 = Assert.IsType<TabPageAccessibleObject>(pages[0].AccessibilityObject); 269TabPageAccessibleObject accessibleObject2 = Assert.IsType<TabPageAccessibleObject>(pages[1].AccessibilityObject); 270TabPageAccessibleObject accessibleObject3 = Assert.IsType<TabPageAccessibleObject>(pages[2].AccessibilityObject); 344TabPageAccessibleObject accessibleObject = Assert.IsType<TabPageAccessibleObject>(tabPage.AccessibilityObject); 355TabPageAccessibleObject accessibleObject = Assert.IsType<TabPageAccessibleObject>(tabPage.AccessibilityObject); 366TabPageAccessibleObject accessibleObject = Assert.IsType<TabPageAccessibleObject>(tabPage.AccessibilityObject); 377TabPageAccessibleObject accessibleObject = Assert.IsType<TabPageAccessibleObject>(tabPage.AccessibilityObject); 388TabPageAccessibleObject accessibleObject = Assert.IsType<TabPageAccessibleObject>(tabPage.AccessibilityObject); 399TabPageAccessibleObject accessibleObject = Assert.IsType<TabPageAccessibleObject>(tabPage.AccessibilityObject); 416TabPageAccessibleObject accessibleObject = Assert.IsType<TabPageAccessibleObject>(pages[0].AccessibilityObject); 435TabPageAccessibleObject accessibleObject = Assert.IsType<TabPageAccessibleObject>(tabPage.AccessibilityObject); 455TabPageAccessibleObject accessibleObject = Assert.IsType<TabPageAccessibleObject>(tabPage.AccessibilityObject); 475TabPageAccessibleObject accessibleObject = Assert.IsType<TabPageAccessibleObject>(tabPage.AccessibilityObject);
System\Windows\Forms\AccessibleObjects\VScrollBar.VScrollBarAccessibleObjectTests.cs (2)
47Assert.IsType<ScrollBarAccessibleObject>(scrollBar.AccessibilityObject); 62Assert.IsType<ScrollBarAccessibleObject>(scrollBar.AccessibilityObject);
System\Windows\Forms\AxHost.AxPropertyDescriptorTests.cs (81)
25Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 26Assert.Equal("Misc", Assert.IsType<CategoryAttribute>(property.Attributes[typeof(CategoryAttribute)]).Category); 27Assert.Empty(Assert.IsType<DescriptionAttribute>(property.Attributes[typeof(DescriptionAttribute)]).Description); 28Assert.False(Assert.IsType<ReadOnlyAttribute>(property.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly); 41Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 42Assert.Equal("Misc", Assert.IsType<CategoryAttribute>(property.Attributes[typeof(CategoryAttribute)]).Category); 43Assert.Empty(Assert.IsType<DescriptionAttribute>(property.Attributes[typeof(DescriptionAttribute)]).Description); 44Assert.False(Assert.IsType<ReadOnlyAttribute>(property.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly); 45Assert.Equal(PInvokeCore.DISPID_TEXT, Assert.IsType<DispIdAttribute>(property.Attributes[typeof(DispIdAttribute)]).Value); 57Assert.False(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 58Assert.Equal("Misc", Assert.IsType<CategoryAttribute>(property.Attributes[typeof(CategoryAttribute)]).Category); 59Assert.Empty(Assert.IsType<DescriptionAttribute>(property.Attributes[typeof(DescriptionAttribute)]).Description); 60Assert.False(Assert.IsType<ReadOnlyAttribute>(property.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly); 61Assert.Equal(PInvokeCore.DISPID_TEXT, Assert.IsType<DispIdAttribute>(property.Attributes[typeof(DispIdAttribute)]).Value); 73Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 74Assert.Equal("Misc", Assert.IsType<CategoryAttribute>(property.Attributes[typeof(CategoryAttribute)]).Category); 75Assert.Empty(Assert.IsType<DescriptionAttribute>(property.Attributes[typeof(DescriptionAttribute)]).Description); 76Assert.True(Assert.IsType<ReadOnlyAttribute>(property.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly); 77Assert.Equal(PInvokeCore.DISPID_TEXT, Assert.IsType<DispIdAttribute>(property.Attributes[typeof(DispIdAttribute)]).Value); 89Assert.False(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 90Assert.Equal("Misc", Assert.IsType<CategoryAttribute>(property.Attributes[typeof(CategoryAttribute)]).Category); 91Assert.Empty(Assert.IsType<DescriptionAttribute>(property.Attributes[typeof(DescriptionAttribute)]).Description); 92Assert.True(Assert.IsType<ReadOnlyAttribute>(property.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly); 93Assert.Equal(PInvokeCore.DISPID_TEXT, Assert.IsType<DispIdAttribute>(property.Attributes[typeof(DispIdAttribute)]).Value); 137Assert.IsType<StringConverter>(property.Converter); 148Assert.IsType<StringConverter>(property.Converter); 168Assert.IsType<StringConverter>(property.Converter); 175Assert.IsType<StringConverter>(property.Converter); 189Assert.IsType<CustomTypeConverter>(property.Converter); 200Assert.IsType<CustomTypeConverter>(property.Converter); 379Assert.IsType<CustomEditor>(property.GetEditor(typeof(object))); 395Assert.IsType<CustomUITypeEditor>(property.GetEditor(typeof(UITypeEditor))); 439Assert.IsType<CustomEditor>(property.GetEditor(typeof(object))); 467Assert.IsType<CustomUITypeEditor>(property.GetEditor(typeof(UITypeEditor))); 503Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 504Assert.Equal("Misc", Assert.IsType<CategoryAttribute>(property.Attributes[typeof(CategoryAttribute)]).Category); 505Assert.Empty(Assert.IsType<DescriptionAttribute>(property.Attributes[typeof(DescriptionAttribute)]).Description); 506Assert.False(Assert.IsType<ReadOnlyAttribute>(property.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly); 526Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 544Assert.Equal("CustomProperty", Assert.IsType<DataSource>(property.GetValue(control)).Value); 545Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 571Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 572Assert.Equal("Misc", Assert.IsType<CategoryAttribute>(property.Attributes[typeof(CategoryAttribute)]).Category); 573Assert.Empty(Assert.IsType<DescriptionAttribute>(property.Attributes[typeof(DescriptionAttribute)]).Description); 574Assert.False(Assert.IsType<ReadOnlyAttribute>(property.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly); 605Assert.Equal("CustomProperty", Assert.IsType<DataSource>(property.GetValue(control)).Value); 606Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 636Assert.Equal("CustomProperty", Assert.IsType<DataSource>(property.GetValue(control)).Value); 637Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 658Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 685Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 706Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 733Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 788Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 789Assert.Equal("Misc", Assert.IsType<CategoryAttribute>(property.Attributes[typeof(CategoryAttribute)]).Category); 790Assert.Empty(Assert.IsType<DescriptionAttribute>(property.Attributes[typeof(DescriptionAttribute)]).Description); 791Assert.False(Assert.IsType<ReadOnlyAttribute>(property.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly); 809Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 826Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 853Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 854Assert.Equal("Misc", Assert.IsType<CategoryAttribute>(property.Attributes[typeof(CategoryAttribute)]).Category); 855Assert.Empty(Assert.IsType<DescriptionAttribute>(property.Attributes[typeof(DescriptionAttribute)]).Description); 856Assert.False(Assert.IsType<ReadOnlyAttribute>(property.Attributes[typeof(ReadOnlyAttribute)]).IsReadOnly); 885Assert.Equal("CustomProperty", Assert.IsType<DataSource>(control.DataSourceProperty).Value); 886Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 915Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 944Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 973Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 991Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 1016Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 1035Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 1060Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 1087Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 1112Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 1137Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 1160Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 1185Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 1208Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 1236Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 1262Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable); 1290Assert.True(Assert.IsType<BrowsableAttribute>(property.Attributes[typeof(BrowsableAttribute)]).Browsable);
System\Windows\Forms\AxHostTests.cs (4)
1623var result = Assert.IsType<Bitmap>(SubAxHost.GetPictureFromIPictureDisp(disp)); 1647var result = Assert.IsType<Metafile>(SubAxHost.GetPictureFromIPictureDisp(disp)); 1688var result = Assert.IsType<Bitmap>(SubAxHost.GetPictureFromIPicture(iPicture)); 1715var result = Assert.IsType<Metafile>(SubAxHost.GetPictureFromIPicture(iPicture));
System\Windows\Forms\BindingContextTests.cs (36)
43WeakReference reference1 = Assert.IsType<WeakReference>(array.Single(p => ((WeakReference)p.Value).Target == manager1).Value); 44WeakReference reference2 = Assert.IsType<WeakReference>(array.Single(p => ((WeakReference)p.Value).Target == manager2).Value); 173Assert.NotNull(Assert.IsType<DictionaryEntry>(array[1]).Key); 174Assert.Equal(source.CurrencyManager, Assert.IsType<WeakReference>(Assert.IsType<DictionaryEntry>(array[1]).Value).Target); 189WeakReference reference1 = Assert.IsType<WeakReference>(array.Single(p => ((WeakReference)p.Value).Target == manager1).Value); 190WeakReference reference2 = Assert.IsType<WeakReference>(array.Single(p => ((WeakReference)p.Value).Target == manager2).Value); 202Assert.IsType<DictionaryEntry>(destArray[1]); 203Assert.IsType<DictionaryEntry>(destArray[2]); 218WeakReference reference1 = Assert.IsType<WeakReference>(array.Single(p => ((WeakReference)p.Value).Target == manager1).Value); 219WeakReference reference2 = Assert.IsType<WeakReference>(array.Single(p => ((WeakReference)p.Value).Target == manager2).Value); 230Assert.IsType<DictionaryEntry>(enumerator.Current); 232Assert.IsType<DictionaryEntry>(enumerator.Current); 406PropertyManager manager = Assert.IsType<PropertyManager>(context[dataSource]); 419CurrencyManager manager = Assert.IsType<CurrencyManager>(context[dataSource]); 433CurrencyManager manager = Assert.IsType<CurrencyManager>(context[dataSource]); 452CurrencyManager manager = Assert.IsType<CurrencyManager>(context[mockIListSource.Object]); 497PropertyManager manager = Assert.IsType<PropertyManager>(context[mockCurrencyManagerProvider.Object]); 548PropertyManager manager = Assert.IsType<PropertyManager>(context[dataSource, dataMember]); 685PropertyManager parentManager = Assert.IsType<PropertyManager>(Assert.IsType<WeakReference>(Assert.IsType<DictionaryEntry>(Assert.Single(context)).Value).Target); 713PropertyManager manager = Assert.IsType<PropertyManager>(context[dataSource]); 714WeakReference reference = Assert.IsType<WeakReference>(Assert.IsType<DictionaryEntry>(Assert.Single(context)).Value); 721PropertyManager newManager = Assert.IsType<PropertyManager>(context[dataSource]); 780DictionaryEntry entry1 = Assert.IsType<DictionaryEntry>(Assert.Single(context1)); 781DictionaryEntry entry2 = Assert.IsType<DictionaryEntry>(Assert.Single(context2)); 782DictionaryEntry entry3 = Assert.IsType<DictionaryEntry>(Assert.Single(context3)); 783DictionaryEntry entry4 = Assert.IsType<DictionaryEntry>(Assert.Single(context3)); 804PropertyManager manager = Assert.IsType<PropertyManager>(context[dataSource]); 822CurrencyManager manager = Assert.IsType<CurrencyManager>(context[dataSource]); 886PropertyManager manager1 = Assert.IsType<PropertyManager>(context1[dataSource]); 892PropertyManager manager2 = Assert.IsType<PropertyManager>(context2[dataSource]); 917CurrencyManager manager1 = Assert.IsType<CurrencyManager>(context1[dataSource]); 924CurrencyManager manager2 = Assert.IsType<CurrencyManager>(context2[dataSource]);
System\Windows\Forms\BindingSourceTests.cs (2)
43Assert.IsType<BindingList<object>>(source.List); 506Assert.IsType<BindingList<object>>(source.List);
System\Windows\Forms\ClipboardTests.cs (1)
436Bitmap result = Assert.IsType<Bitmap>(Clipboard.GetImage());
System\Windows\Forms\ColumnHeaderConverterTests.cs (1)
97InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(value, typeof(InstanceDescriptor)));
System\Windows\Forms\ColumnHeaderTests.cs (3)
1472using ColumnHeader header = Assert.IsType<ColumnHeader>(source.Clone()); 1511using ColumnHeader header = Assert.IsType<ColumnHeader>(source.Clone()); 1547using SubColumnHeader header = Assert.IsType<SubColumnHeader>(source.Clone());
System\Windows\Forms\ComboBoxTests.cs (6)
2200Assert.IsType<AutomationEventCountingComboBoxAccessibleObject>(comboBox.AccessibilityObject); 2242Assert.IsType<AutomationEventCountingComboBoxAccessibleObject>(comboBox.AccessibilityObject); 2305Assert.IsType<AutomationEventCountingComboBoxAccessibleObject>(comboBox.AccessibilityObject); 2345Assert.IsType<AutomationEventCountingComboBoxAccessibleObject>(comboBox.AccessibilityObject); 2390Assert.IsType<AutomationEventCountingComboBoxAccessibleObject>(comboBox.AccessibilityObject); 2408Assert.IsType<AutomationEventCountingComboBoxAccessibleObject>(comboBox.AccessibilityObject);
System\Windows\Forms\ComponentModel\Com2Interop\ComNativeDescriptorTests.cs (2)
48Assert.IsType<Com2PropertyDescriptor>(handleProperty); 131Assert.IsType<Com2PropertyDescriptor>(urlProperty);
System\Windows\Forms\ControlTests.ControlCollection.cs (1)
1354var collection = Assert.IsType<Control.ControlCollection>(iCloneable.Clone());
System\Windows\Forms\ControlTests.Methods.cs (1)
612Control.ControlCollection controls = Assert.IsType<Control.ControlCollection>(control.CreateControlsInstance());
System\Windows\Forms\ControlTests.Properties.cs (2)
28Control.ControlAccessibleObject accessibleObject = Assert.IsType<Control.ControlAccessibleObject>(control.AccessibilityObject); 46Control.ControlAccessibleObject accessibleObject = Assert.IsType<Control.ControlAccessibleObject>(control.AccessibilityObject);
System\Windows\Forms\CursorConverterTests.cs (3)
38using Cursor cursor = Assert.IsType<Cursor>(converter.ConvertFrom(data)); 101InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(Cursors.AppStarting, typeof(InstanceDescriptor))); 162Assert.Empty(Assert.IsType<byte[]>(converter.ConvertTo(null, typeof(byte[]))));
System\Windows\Forms\DataGridViewCellStyleTests.cs (2)
792DataGridViewCellStyle style = Assert.IsType<DataGridViewCellStyle>(source.Clone()); 818DataGridViewCellStyle style = Assert.IsType<DataGridViewCellStyle>(source.Clone());
System\Windows\Forms\DataGridViewCellTests.cs (3)
3328SubDataGridViewCell cell = Assert.IsType<SubDataGridViewCell>(source.Clone()); 3367SubDataGridViewCell cell = Assert.IsType<SubDataGridViewCell>(source.Clone()); 3419DataGridViewCellAccessibleObject accessibleObject = Assert.IsType<DataGridViewCellAccessibleObject>(cell.AccessibilityObject);
System\Windows\Forms\DataGridViewColumnTests.cs (4)
29Assert.IsType<DataGridViewColumnHeaderCell>(column.HeaderCell); 31Assert.IsType<DataGridViewColumnHeaderCell>(column.HeaderCellCore); 1348Assert.IsType<DataGridViewColumnHeaderCell>(column.HeaderCell); 1360Assert.IsType<DataGridViewColumnHeaderCell>(column.HeaderCellCore);
System\Windows\Forms\DataGridViewHeaderCellTests.cs (10)
130DataGridViewCell cell = Assert.IsType<DataGridViewHeaderCell>(row.Cells[0]); 251DataGridViewCell cell = Assert.IsType<DataGridViewHeaderCell>(row.Cells[0]); 292DataGridViewCell cell = Assert.IsType<DataGridViewHeaderCell>(row.Cells[0]); 430DataGridViewCell cell = Assert.IsType<DataGridViewHeaderCell>(row.Cells[0]); 503DataGridViewCell cell = Assert.IsType<DataGridViewHeaderCell>(row.Cells[0]); 539DataGridViewCell cell = Assert.IsType<DataGridViewHeaderCell>(row.Cells[0]); 2033DataGridViewHeaderCell cell = Assert.IsType<DataGridViewHeaderCell>(source.Clone()); 2072DataGridViewHeaderCell cell = Assert.IsType<DataGridViewHeaderCell>(source.Clone()); 2119SubDataGridViewHeaderCell cell = Assert.IsType<SubDataGridViewHeaderCell>(source.Clone()); 2158SubDataGridViewHeaderCell cell = Assert.IsType<SubDataGridViewHeaderCell>(source.Clone());
System\Windows\Forms\DataGridViewRowConverterTests.cs (1)
30Assert.IsType<InstanceDescriptor>(descriptor);
System\Windows\Forms\DataGridViewRowTests.cs (14)
29Assert.IsType<DataGridViewRowHeaderCell>(row.HeaderCell); 31Assert.IsType<DataGridViewRowHeaderCell>(row.HeaderCellCore); 1375Assert.IsType<DataGridViewRowHeaderCell>(row.HeaderCell); 1393Assert.IsType<DataGridViewRowHeaderCell>(row.HeaderCell); 1411Assert.IsType<DataGridViewRowHeaderCell>(row.HeaderCell); 1422Assert.IsType<DataGridViewRowHeaderCell>(row.HeaderCellCore); 1440Assert.IsType<DataGridViewRowHeaderCell>(row.HeaderCellCore); 1458Assert.IsType<DataGridViewRowHeaderCell>(row.HeaderCellCore); 3903using DataGridViewRow row = Assert.IsType<DataGridViewRow>(source.Clone()); 3940using DataGridViewRow row = Assert.IsType<DataGridViewRow>(source.Clone()); 3983using SubDataGridViewRow row = Assert.IsType<SubDataGridViewRow>(source.Clone()); 4032using DataGridViewRow row = Assert.IsType<DataGridViewRow>(source.Clone()); 5804DataGridViewRowAccessibleObject accessibilityObject = Assert.IsType<DataGridViewRowAccessibleObject>(AccessibilityObject); 5811DataGridViewRowAccessibleObject accessibilityObject = Assert.IsType<DataGridViewRowAccessibleObject>(CreateAccessibilityInstance());
System\Windows\Forms\DataGridViewTests.cs (4)
1770DataGridViewHeaderCell cell = Assert.IsType<DataGridViewTopLeftHeaderCell>(control.TopLeftHeaderCell); 1840DataGridViewHeaderCell cell = Assert.IsType<DataGridViewTopLeftHeaderCell>(control.TopLeftHeaderCell); 1868DataGridViewHeaderCell cell = Assert.IsType<DataGridViewTopLeftHeaderCell>(control.TopLeftHeaderCell); 1896DataGridViewHeaderCell cell = Assert.IsType<DataGridViewTopLeftHeaderCell>(control.TopLeftHeaderCell);
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (3)
68Assert.Empty(Assert.IsType<string>(control.EditingControlFormattedValue)); 1082Assert.Empty(Assert.IsType<string>(control.GetEditingControlFormattedValue(context))); 1094Assert.Equal("text", Assert.IsType<string>(control.GetEditingControlFormattedValue(context)));
System\Windows\Forms\DockPaddingEdgesTests.cs (2)
260return Assert.IsType<ScrollableControl.DockPaddingEdges>(cloneable.Clone()); 488Assert.IsType<ScrollableControl.DockPaddingEdgesConverter>(TypeDescriptor.GetConverter(typeof(ScrollableControl.DockPaddingEdges)));
System\Windows\Forms\FlowLayoutSettingsTests.cs (10)
29FlowLayoutSettings settings = Assert.IsType<FlowLayoutSettings>(control.LayoutSettings); 51FlowLayoutSettings settings = Assert.IsType<FlowLayoutSettings>(control.LayoutSettings); 64FlowLayoutSettings settings = Assert.IsType<FlowLayoutSettings>(control.LayoutSettings); 99FlowLayoutSettings settings = Assert.IsType<FlowLayoutSettings>(control.LayoutSettings); 110FlowLayoutSettings settings = Assert.IsType<FlowLayoutSettings>(control.LayoutSettings); 121FlowLayoutSettings settings = Assert.IsType<FlowLayoutSettings>(control.LayoutSettings); 133FlowLayoutSettings settings = Assert.IsType<FlowLayoutSettings>(control.LayoutSettings); 173FlowLayoutSettings settings = Assert.IsType<FlowLayoutSettings>(control.LayoutSettings); 236FlowLayoutSettings settings = Assert.IsType<FlowLayoutSettings>(control.LayoutSettings); 248FlowLayoutSettings settings = Assert.IsType<FlowLayoutSettings>(control.LayoutSettings);
System\Windows\Forms\HtmlDocumentTests.cs (10)
2008Assert.IsType<HtmlElementEventArgs>(e); 2046Assert.IsType<HtmlElementEventArgs>(e); 2084Assert.IsType<HtmlElementEventArgs>(e); 2122Assert.IsType<HtmlElementEventArgs>(e); 2160Assert.IsType<HtmlElementEventArgs>(e); 2198Assert.IsType<HtmlElementEventArgs>(e); 2236Assert.IsType<HtmlElementEventArgs>(e); 2274Assert.IsType<HtmlElementEventArgs>(e); 2312Assert.IsType<HtmlElementEventArgs>(e); 2350Assert.IsType<HtmlElementEventArgs>(e);
System\Windows\Forms\HtmlElementTests.cs (19)
2556Assert.IsType<HtmlElementEventArgs>(e); 2597Assert.IsType<HtmlElementEventArgs>(e); 2638Assert.IsType<HtmlElementEventArgs>(e); 2679Assert.IsType<HtmlElementEventArgs>(e); 2720Assert.IsType<HtmlElementEventArgs>(e); 2761Assert.IsType<HtmlElementEventArgs>(e); 2802Assert.IsType<HtmlElementEventArgs>(e); 2843Assert.IsType<HtmlElementEventArgs>(e); 2884Assert.IsType<HtmlElementEventArgs>(e); 2925Assert.IsType<HtmlElementEventArgs>(e); 2966Assert.IsType<HtmlElementEventArgs>(e); 3007Assert.IsType<HtmlElementEventArgs>(e); 3048Assert.IsType<HtmlElementEventArgs>(e); 3089Assert.IsType<HtmlElementEventArgs>(e); 3130Assert.IsType<HtmlElementEventArgs>(e); 3171Assert.IsType<HtmlElementEventArgs>(e); 3212Assert.IsType<HtmlElementEventArgs>(e); 3253Assert.IsType<HtmlElementEventArgs>(e); 3294Assert.IsType<HtmlElementEventArgs>(e);
System\Windows\Forms\ImageList.ImageCollectionTests.cs (21)
64Bitmap bitmap1 = Assert.IsType<Bitmap>(collection[0]); 69Bitmap bitmap2 = Assert.IsType<Bitmap>(collection[1]); 74Bitmap bitmap3 = Assert.IsType<Bitmap>(collection[2]); 79Bitmap bitmap4 = Assert.IsType<Bitmap>(collection[3]); 84Bitmap bitmap5 = Assert.IsType<Bitmap>(collection[4]); 112Bitmap bitmap1 = Assert.IsType<Bitmap>(collection[0]); 117Bitmap bitmap2 = Assert.IsType<Bitmap>(collection[1]); 122Bitmap bitmap3 = Assert.IsType<Bitmap>(collection[2]); 127Bitmap bitmap4 = Assert.IsType<Bitmap>(collection[3]); 132Bitmap bitmap5 = Assert.IsType<Bitmap>(collection[4]); 207Bitmap resultImage = Assert.IsType<Bitmap>(collection[1]); 270Bitmap bitmap = Assert.IsType<Bitmap>(collection[0]); 292Bitmap bitmap = Assert.IsType<Bitmap>(collection[0]); 358Bitmap result1 = Assert.IsType<Bitmap>(collection[key]); 364Bitmap result2 = Assert.IsType<Bitmap>(collection[key]); 1170Bitmap result1 = Assert.IsType<Bitmap>(enumerator.Current); 1176Bitmap result2 = Assert.IsType<Bitmap>(enumerator.Current); 1208Bitmap result1 = Assert.IsType<Bitmap>(enumerator.Current); 1214Bitmap result2 = Assert.IsType<Bitmap>(enumerator.Current); 1643Bitmap bitmap = Assert.IsType<Bitmap>(collection[0]); 1665Bitmap bitmap = Assert.IsType<Bitmap>(collection[0]);
System\Windows\Forms\Layout\TableLayoutSettingsTests.cs (52)
34TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 170TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 186TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 202TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 221TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 241TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 260TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 276TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 292TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 310TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 327TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 343TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 361TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 377TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 393TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 411TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 427TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 443TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 552TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 578TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 633TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 655TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 671TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 775TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 805TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 853TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 879TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 895TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 912TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1008TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1036TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1084TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1110TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1127TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1148TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1251TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1281TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1329TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1355TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1371TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1388TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1484TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1512TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1560TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1586TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1602TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1623TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1644TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1696TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 1728TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(control.LayoutSettings); 1793TableLayoutSettings result = Assert.IsType<TableLayoutSettings>(formatter.Deserialize(stream)); // CodeQL [SM03722] : Testing legacy feature. This is a safe use of BinaryFormatter because the data is trusted and the types are controlled and validated. 1846TableLayoutSettings result = Assert.IsType<TableLayoutSettings>(formatter.Deserialize(stream)); // CodeQL [SM03722] : Testing legacy feature. This is a safe use of BinaryFormatter because the data is trusted and the types are controlled and validated.
System\Windows\Forms\Layout\TableLayoutSettingsTypeConverterTests.cs (17)
31TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom( 104TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(value)); 163TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 165string result = Assert.IsType<string>(converter.ConvertTo(settings, typeof(string))); 175TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 188string result = Assert.IsType<string>(converter.ConvertTo(settings, typeof(string))); 197TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(panel.LayoutSettings); 206string result = Assert.IsType<string>(converter.ConvertTo(settings, typeof(string))); 214TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 215string result = Assert.IsType<string>(converter.ConvertTo(settings, typeof(string))); 223TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 229string result = Assert.IsType<string>(converter.ConvertTo(settings, typeof(string))); 237var settings = Assert.IsType<TableLayoutSettings>(control.LayoutSettings); 249TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 251string result = Assert.IsType<string>(converter.ConvertTo(settings, typeof(string))); 259TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 270TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings);
System\Windows\Forms\LinkAreaConverterTests.cs (2)
85InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(new LinkArea(1, 2), typeof(InstanceDescriptor))); 117LinkArea area = Assert.IsType<LinkArea>(converter.CreateInstance(
System\Windows\Forms\LinkAreaTests.cs (1)
99Assert.IsType<LinkArea.LinkAreaConverter>(TypeDescriptor.GetConverter(area));
System\Windows\Forms\LinkConverterTests.cs (2)
83InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(new LinkLabel.Link(1, 2), typeof(InstanceDescriptor))); 93InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(new LinkLabel.Link(1, 2, "linkData"), typeof(InstanceDescriptor)));
System\Windows\Forms\ListBoxTests.cs (1)
4773ListBox.ObjectCollection items = Assert.IsType<ListBox.ObjectCollection>(control.CreateItemCollection());
System\Windows\Forms\ListViewGroupConverterTests.cs (1)
203InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(value, typeof(InstanceDescriptor)));
System\Windows\Forms\ListViewGroupTests.cs (1)
1346ListViewGroup result = Assert.IsType<ListViewGroup>(formatter.Deserialize(stream)); // CodeQL [SM03722] : Deserialization is performed on trusted data and the types are controlled and validated.
System\Windows\Forms\ListViewItemConverterTests.cs (1)
258InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(value, typeof(InstanceDescriptor)));
System\Windows\Forms\ListViewSubItemConverterTests.cs (1)
71InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(value, typeof(InstanceDescriptor)));
System\Windows\Forms\ListViewSubItemTests.cs (1)
589ListViewItem.ListViewSubItem result = Assert.IsType<ListViewItem.ListViewSubItem>(formatter.Deserialize(stream)); // CodeQL[SM03722] : Testing legacy feature. This is a safe use of BinaryFormatter because the data is trusted and the types are controlled and validated.
System\Windows\Forms\MdiClientTests.cs (1)
41Assert.Same(control, Assert.IsType<MdiClient.ControlCollection>(control.Controls).Owner);
System\Windows\Forms\MenuStripTests.cs (3)
125Assert.IsType<ToolStripProfessionalRenderer>(control.Renderer); 450ToolStripMenuItem item = Assert.IsType<ToolStripMenuItem>(control.CreateDefaultItem(text, image, onClick)); 468ToolStripSeparator separator = Assert.IsType<ToolStripSeparator>(control.CreateDefaultItem("-", image, onClick));
System\Windows\Forms\MessageTests.cs (1)
199TestStruct lparam = Assert.IsType<TestStruct>(message.GetLParam(typeof(TestStruct)));
System\Windows\Forms\OpacityConverterTests.cs (2)
41Assert.Equal(expected, Assert.IsType<double>(converter.ConvertFrom(value)), 5); 42Assert.Equal(expected, Assert.IsType<double>(converter.ConvertFrom(null, null, value)), 5);
System\Windows\Forms\OwnerDrawPropertyBagTests.cs (1)
122OwnerDrawPropertyBag bag = Assert.IsType<OwnerDrawPropertyBag>(formatter.Deserialize(stream)); // CodeQL[SM03722] : Testing legacy feature. This is a safe use of BinaryFormatter because the data is trusted and the types are controlled and validated.
System\Windows\Forms\PaddingConverterTests.cs (5)
88InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(new Padding(1, 2, 3, 4), typeof(InstanceDescriptor))); 97InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(new Padding(1, 1, 1, 1), typeof(InstanceDescriptor))); 145Padding padding = Assert.IsType<Padding>(converter.CreateInstance( 162Padding padding = Assert.IsType<Padding>(converter.CreateInstance( 387Padding padding = Assert.IsType<Padding>(converter.CreateInstance(mockContext.Object, propertyValues));
System\Windows\Forms\PaddingTests.cs (1)
423Assert.IsType<PaddingConverter>(TypeDescriptor.GetConverter(padding));
System\Windows\Forms\PropertyGridTests.cs (2)
145Assert.IsType<PropertiesTab>(control.SelectedTab); 3958Assert.IsType<TypeConverter>(typeConverter);
System\Windows\Forms\PropertyGridToolStripButtonTests.cs (2)
14Assert.IsType<PropertyGridToolStripButton.PropertyGridToolStripButtonAccessibleObject>(toolStripButtons[0].AccessibilityObject); 15Assert.IsType<PropertyGridToolStripButton.PropertyGridToolStripButtonAccessibleObject>(toolStripButtons[1].AccessibilityObject);
System\Windows\Forms\PropertyManagerTests.cs (4)
28PropertyManager manager = Assert.IsType<PropertyManager>(context[new DataSource()]); 38PropertyManager manager = Assert.IsType<PropertyManager>(context[new DataSource()]); 395PropertyManager manager = Assert.IsType<PropertyManager>(context[new DataSource()]); 405PropertyManager manager = Assert.IsType<PropertyManager>(context[new DataSource()]);
System\Windows\Forms\RadioButtonTests.cs (9)
407RadioButton.RadioButtonAccessibleObject instance = Assert.IsType<RadioButton.RadioButtonAccessibleObject>(control.CreateAccessibilityInstance()); 428RadioButton.RadioButtonAccessibleObject instance = Assert.IsType<RadioButton.RadioButtonAccessibleObject>(control.CreateAccessibilityInstance()); 451RadioButton.RadioButtonAccessibleObject instance = Assert.IsType<RadioButton.RadioButtonAccessibleObject>(control.CreateAccessibilityInstance()); 473RadioButton.RadioButtonAccessibleObject instance = Assert.IsType<RadioButton.RadioButtonAccessibleObject>(control.CreateAccessibilityInstance()); 515RadioButton.RadioButtonAccessibleObject instance = Assert.IsType<RadioButton.RadioButtonAccessibleObject>(control.CreateAccessibilityInstance()); 538RadioButton.RadioButtonAccessibleObject instance = Assert.IsType<RadioButton.RadioButtonAccessibleObject>(control.CreateAccessibilityInstance()); 560RadioButton.RadioButtonAccessibleObject instance = Assert.IsType<RadioButton.RadioButtonAccessibleObject>(control.CreateAccessibilityInstance()); 588RadioButton.RadioButtonAccessibleObject instance = Assert.IsType<RadioButton.RadioButtonAccessibleObject>(control.CreateAccessibilityInstance()); 609RadioButton.RadioButtonAccessibleObject instance = Assert.IsType<RadioButton.RadioButtonAccessibleObject>(control.CreateAccessibilityInstance());
System\Windows\Forms\StatusStripTests.cs (5)
103Assert.IsType<TableLayoutSettings>(control.LayoutSettings); 485Assert.IsType<ToolStripSystemRenderer>(control.Renderer); 505Assert.IsType<ToolStripSystemRenderer>(control.Renderer); 542Assert.IsType<ToolStripSystemRenderer>(control.Renderer); 885ToolStripStatusLabel button = Assert.IsType<ToolStripStatusLabel>(control.CreateDefaultItem(text, image, onClick));
System\Windows\Forms\TabControl.ControlCollectionTests.cs (17)
47TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 170TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 330TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 471TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 665TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 699TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 722TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 733TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 764TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 832TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 1121TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 1233TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 1357TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 1394TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 1428TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 1473TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 1531TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls);
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (8)
896TabPage page = Assert.IsType<TabPage>(Assert.Single(collection)); 917TabPage page = Assert.IsType<TabPage>(Assert.Single(collection)); 938TabPage page = Assert.IsType<TabPage>(Assert.Single(collection)); 959TabPage page = Assert.IsType<TabPage>(Assert.Single(collection)); 2710TabPage page = Assert.IsType<TabPage>(Assert.Single(collection)); 2730TabPage page = Assert.IsType<TabPage>(Assert.Single(collection)); 2750TabPage page = Assert.IsType<TabPage>(Assert.Single(collection)); 2770TabPage page = Assert.IsType<TabPage>(Assert.Single(collection));
System\Windows\Forms\TabControlTests.cs (4)
2994Control.ControlCollection controls = Assert.IsType<TabControl.ControlCollection>(control.CreateControlsInstance()); 3833object[] result = Assert.IsType<TabPage[]>(control.GetItems()); 3846object[] result = Assert.IsType<TabPage[]>(control.GetItems()); 3886object[] result = Assert.IsType<SubTabPage[]>(control.GetItems(typeof(SubTabPage)));
System\Windows\Forms\TableLayoutColumnStyleCollectionTests.cs (8)
12TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 24TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 36TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 48TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 62TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 72TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 87TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 100TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings);
System\Windows\Forms\TableLayoutPanelCellPositionTests.cs (2)
175InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(new TableLayoutPanelCellPosition(1, 2), typeof(InstanceDescriptor))); 208TableLayoutPanelCellPosition position = Assert.IsType<TableLayoutPanelCellPosition>(converter.CreateInstance(null, new Dictionary<string, object>
System\Windows\Forms\TableLayoutPanelTests.cs (5)
413TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 445TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 481TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 545TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(converter.ConvertFrom(@"<?xml version=""1.0"" encoding=""utf-16""?><Root />")); 629TableLayoutControlCollection controls = Assert.IsType<TableLayoutControlCollection>(control.CreateControlsInstance());
System\Windows\Forms\TableLayoutRowStyleCollectionTests.cs (8)
12TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 24TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 36TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 48TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 62TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 72TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 87TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 100TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings);
System\Windows\Forms\TableLayoutStyleCollectionTests.cs (23)
14TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 27TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 39TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 51TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 61TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 70TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 82TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 96TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 105TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 114TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 125TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 139TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 155TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 166TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 176TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 188TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 203TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 215TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 224TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 239TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 257TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 271TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings); 285TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.LayoutSettings);
System\Windows\Forms\TableLayoutStyleTests.cs (1)
139InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(value, typeof(InstanceDescriptor)));
System\Windows\Forms\TabPageTests.cs (3)
54Assert.IsType<TabPage.TabPageControlCollection>(control.Controls); 163Assert.IsType<TabPage.TabPageControlCollection>(control.Controls); 3744Control.ControlCollection controls = Assert.IsType<TabPage.TabPageControlCollection>(control.CreateControlsInstance());
System\Windows\Forms\TabPageTests.TabPageControlCollection.cs (1)
30TabPage.TabPageControlCollection collection = Assert.IsType<TabPage.TabPageControlCollection>(owner.Controls);
System\Windows\Forms\ToolStripContentPanelTests.cs (5)
100Assert.IsType<ToolStripSystemRenderer>(control.Renderer); 1120Assert.IsType<ToolStripSystemRenderer>(control.Renderer); 1303Assert.IsType<ToolStripSystemRenderer>(control.Renderer); 1357Assert.IsType<ToolStripProfessionalRenderer>(control.Renderer); 1389Assert.IsType<ToolStripSystemRenderer>(control.Renderer);
System\Windows\Forms\ToolStripControlHostTests.cs (3)
355Assert.IsType<ObjectDisposedException>(ex.InnerException); 1031Assert.IsType<ObjectDisposedException>(ex.InnerException); 1174Assert.IsType<ObjectDisposedException>(ex.InnerException);
System\Windows\Forms\ToolStripDropDownTests.cs (8)
109Assert.IsType<FlowLayoutSettings>(control.LayoutSettings); 133Assert.IsType<ToolStripProfessionalRenderer>(control.Renderer); 2925ToolStripDropDown.ToolStripDropDownAccessibleObject instance = Assert.IsType<ToolStripDropDown.ToolStripDropDownAccessibleObject>(control.CreateAccessibilityInstance()); 2940ToolStripDropDown.ToolStripDropDownAccessibleObject instance = Assert.IsType<ToolStripDropDown.ToolStripDropDownAccessibleObject>(control.CreateAccessibilityInstance()); 2962ToolStripButton button = Assert.IsType<ToolStripButton>(control.CreateDefaultItem(text, image, onClick)); 2980ToolStripSeparator separator = Assert.IsType<ToolStripSeparator>(control.CreateDefaultItem("-", image, onClick)); 3004FlowLayoutSettings settings = Assert.IsType<FlowLayoutSettings>(toolStrip.CreateLayoutSettings(ToolStripLayoutStyle.Flow)); 3015TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.CreateLayoutSettings(ToolStripLayoutStyle.Table));
System\Windows\Forms\ToolStripRendererTests.cs (1)
15Image result = Assert.IsType<Bitmap>(ToolStripRenderer.CreateDisabledImage(image));
System\Windows\Forms\ToolStripTests.cs (11)
141Assert.IsType<ToolStripProfessionalRenderer>(control.Renderer); 296Assert.IsType<ToolStripProfessionalRenderer>(control.Renderer); 3311Assert.IsType<ToolStripProfessionalRenderer>(control.Renderer); 3331Assert.IsType<ToolStripProfessionalRenderer>(control.Renderer); 3368Assert.IsType<ToolStripProfessionalRenderer>(control.Renderer); 4208ToolStrip.ToolStripAccessibleObject instance = Assert.IsType<ToolStrip.ToolStripAccessibleObject>(control.CreateAccessibilityInstance()); 4223ToolStrip.ToolStripAccessibleObject instance = Assert.IsType<ToolStrip.ToolStripAccessibleObject>(control.CreateAccessibilityInstance()); 4280ToolStripButton button = Assert.IsType<ToolStripButton>(control.CreateDefaultItem(text, image, onClick)); 4298ToolStripSeparator separator = Assert.IsType<ToolStripSeparator>(control.CreateDefaultItem("-", image, onClick)); 4322FlowLayoutSettings settings = Assert.IsType<FlowLayoutSettings>(toolStrip.CreateLayoutSettings(ToolStripLayoutStyle.Flow)); 4333TableLayoutSettings settings = Assert.IsType<TableLayoutSettings>(toolStrip.CreateLayoutSettings(ToolStripLayoutStyle.Table));
System\Windows\Forms\WebBrowserTests.cs (1)
536MemoryStream documentStream = Assert.IsType<MemoryStream>(control.DocumentStream);
System\Windows\Forms\WindowsFormsSynchronizationContextTests.cs (1)
14WindowsFormsSynchronizationContext copy = Assert.IsType<WindowsFormsSynchronizationContext>(context.CreateCopy());
TextBoxTests.cs (2)
460Control.ControlAccessibleObject instance = Assert.IsType<TextBox.TextBoxAccessibleObject>(control.CreateAccessibilityInstance()); 477Control.ControlAccessibleObject instance = Assert.IsType<TextBox.TextBoxAccessibleObject>(control.CreateAccessibilityInstance());
System.Xaml.Tests (19)
System\Windows\Markup\ArrayExtensionTests.cs (3)
17Assert.IsType<ArrayList>(extension.Items); 28Assert.IsType<ArrayList>(extension.Items); 56Assert.IsType<ArrayList>(extension.Items);
System\Windows\Markup\StaticExtensionTests.cs (2)
216InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(extension, typeof(InstanceDescriptor))); 226InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(extension, typeof(InstanceDescriptor)));
System\Windows\Markup\TypeExtensionTests.cs (2)
177InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(extension, typeof(InstanceDescriptor))); 187InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(extension, typeof(InstanceDescriptor)));
System\Windows\Markup\ValueSerializerTests.cs (12)
135Assert.IsType<DateTimeValueSerializer>(ValueSerializer.GetSerializerFor(typeof(DateTime))); 136Assert.IsType<DateTimeValueSerializer>(ValueSerializer.GetSerializerFor(typeof(DateTime), null)); 142Assert.IsType<CustomValueSerializer>(ValueSerializer.GetSerializerFor(typeof(ClassWithValueSerializerAttribute))); 143Assert.IsType<CustomValueSerializer>(ValueSerializer.GetSerializerFor(typeof(ClassWithValueSerializerAttribute), null)); 220Assert.IsType<DateTimeValueSerializer>(ValueSerializer.GetSerializerFor(typeof(DateTime))); 222Assert.IsType<DateTimeValueSerializer>(ValueSerializer.GetSerializerFor(typeof(DateTime))); 251Assert.IsType<CustomValueSerializer>(ValueSerializer.GetSerializerFor(typeof(ClassWithValueSerializerAttribute), context)); 258Assert.IsType<DateTimeValueSerializer>(ValueSerializer.GetSerializerFor(descriptor)); 259Assert.IsType<DateTimeValueSerializer>(ValueSerializer.GetSerializerFor(descriptor, null)); 266Assert.IsType<CustomValueSerializer>(ValueSerializer.GetSerializerFor(descriptor)); 267Assert.IsType<CustomValueSerializer>(ValueSerializer.GetSerializerFor(descriptor, null)); 319Assert.IsType<CustomValueSerializer>(ValueSerializer.GetSerializerFor(descriptor, context));