2307 references to Same
Aspire.Components.Common.Tests (3)
Aspire.Hosting.Tests (2)
Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests (1)
Aspire.MySqlConnector.Tests (1)
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (1)
Aspire.Npgsql.Tests (1)
Aspire.Oracle.EntityFrameworkCore.Tests (1)
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (1)
Client.ChannelLayer.IntegrationTests (2)
IIS.Tests (2)
InMemory.FunctionalTests (34)
EventSourceTests.cs (20)
87Assert.Same(KestrelEventSource.Log, connectionStart.EventSource);
95Assert.Same(KestrelEventSource.Log, firstRequestStart.EventSource);
103Assert.Same(KestrelEventSource.Log, firstRequestStop.EventSource);
113Assert.Same(KestrelEventSource.Log, secondRequestStart.EventSource);
121Assert.Same(KestrelEventSource.Log, secondRequestStop.EventSource);
130Assert.Same(KestrelEventSource.Log, connectionStop.EventSource);
211Assert.Same(KestrelEventSource.Log, connectionStart.EventSource);
219Assert.Same(KestrelEventSource.Log, tlsHandshakeStart.EventSource);
228Assert.Same(KestrelEventSource.Log, tlsHandshakeStop.EventSource);
239Assert.Same(KestrelEventSource.Log, requestStart.EventSource);
247Assert.Same(KestrelEventSource.Log, requestStop.EventSource);
257Assert.Same(KestrelEventSource.Log, connectionStop.EventSource);
316Assert.Same(KestrelEventSource.Log, connectionStart.EventSource);
323Assert.Same(KestrelEventSource.Log, tlsHandshakeStart.EventSource);
331Assert.Same(KestrelEventSource.Log, tlsHandshakeFailed.EventSource);
339Assert.Same(KestrelEventSource.Log, tlsHandshakeStop.EventSource);
347Assert.Same(KestrelEventSource.Log, connectionStop.EventSource);
397Assert.Same(KestrelEventSource.Log, connectionStart.EventSource);
404Assert.Same(KestrelEventSource.Log, connectionRejected.EventSource);
412Assert.Same(KestrelEventSource.Log, connectionStop.EventSource);
InProcessWebSite (4)
Interop.FunctionalTests (4)
Microsoft.AspNetCore.App.Analyzers.Test (56)
RouteEmbeddedLanguage\RoutePatternAnalyzerTests.cs (11)
45Assert.Same(DiagnosticDescriptors.RoutePatternIssue, diagnostic.Descriptor);
77Assert.Same(DiagnosticDescriptors.RoutePatternIssue, diagnostic.Descriptor);
110Assert.Same(DiagnosticDescriptors.RoutePatternIssue, diagnostic.Descriptor);
138Assert.Same(DiagnosticDescriptors.RoutePatternIssue, diagnostic.Descriptor);
166Assert.Same(DiagnosticDescriptors.RoutePatternIssue, diagnostic.Descriptor);
195Assert.Same(DiagnosticDescriptors.RoutePatternIssue, diagnostic.Descriptor);
227Assert.Same(DiagnosticDescriptors.RoutePatternIssue, d.Descriptor);
232Assert.Same(DiagnosticDescriptors.RoutePatternIssue, d.Descriptor);
294Assert.Same(DiagnosticDescriptors.RoutePatternIssue, d.Descriptor);
334Assert.Same(DiagnosticDescriptors.RoutePatternUnusedParameter, d.Descriptor);
488Assert.Same(DiagnosticDescriptors.RoutePatternUnusedParameter, d.Descriptor);
Microsoft.AspNetCore.Authentication.Core.Test (10)
Microsoft.AspNetCore.Authentication.Test (4)
Microsoft.AspNetCore.Authorization.Test (8)
Microsoft.AspNetCore.Components.Analyzers.Tests (11)
ComponentInternalUsageDiagnosticsAnalyzerTest.cs (11)
34Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
39Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
44Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
49Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
54Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
59Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
78Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
83Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
88Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
93Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
98Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
Microsoft.AspNetCore.Components.Authorization.Tests (4)
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
Microsoft.AspNetCore.Components.Forms.Tests (24)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (11)
ComponentInternalUsageDiagnosticsAnalyzerTest.cs (11)
34Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
39Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
44Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
49Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
54Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
59Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
78Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
83Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
88Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
93Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
98Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
Microsoft.AspNetCore.Components.Server.Tests (7)
Microsoft.AspNetCore.Components.Tests (164)
DependencyInjectionTest.cs (10)
94Assert.Same(serviceInstance, instance.MyService);
108Assert.Same(serviceInstance, instance.MyService);
127Assert.Same(serviceInstance, instance.PublicReadWrite);
128Assert.Same(serviceInstance, instance.PublicReadOnly);
129Assert.Same(serviceInstance, instance.PrivateValue);
130Assert.Same(otherServiceInstance, instance.DifferentServiceType);
131Assert.Same(concreteServiceInstance, instance.ConcreteServiceType);
132Assert.Same(serviceInstance, instance.KeyedService);
146Assert.Same(serviceInstance, instance.MyService);
160Assert.Same(serviceInstance, instance.PrivateMyService);
EventCallbackFactoryTest.cs (64)
22Assert.Same(@delegate, callback.Delegate);
23Assert.Same(component, callback.Receiver);
38Assert.Same(@delegate, callback.Delegate);
39Assert.Same(component, callback.Receiver);
56Assert.Same(@delegate, callback.Delegate);
57Assert.Same(component, callback.Receiver);
74Assert.Same(@delegate, callback.Delegate);
75Assert.Same(anotherComponent, callback.Receiver);
90Assert.Same(component, callback.Receiver);
105Assert.Same(@delegate, callback.Delegate);
106Assert.Same(component, callback.Receiver);
123Assert.Same(@delegate, callback.Delegate);
124Assert.Same(component, callback.Receiver);
141Assert.Same(@delegate, callback.Delegate);
142Assert.Same(anotherComponent, callback.Receiver);
157Assert.Same(component, callback.Receiver);
172Assert.Same(@delegate, callback.Delegate);
173Assert.Same(component, callback.Receiver);
190Assert.Same(@delegate, callback.Delegate);
191Assert.Same(component, callback.Receiver);
208Assert.Same(@delegate, callback.Delegate);
209Assert.Same(anotherComponent, callback.Receiver);
224Assert.Same(@delegate, callback.Delegate);
225Assert.Same(component, callback.Receiver);
240Assert.Same(component, callback.Receiver);
257Assert.Same(@delegate, callback.Delegate);
258Assert.Same(component, callback.Receiver);
275Assert.Same(@delegate, callback.Delegate);
276Assert.Same(anotherComponent, callback.Receiver);
291Assert.Same(component, callback.Receiver);
309Assert.Same(@delegate, callback.Delegate);
310Assert.Same(component, callback.Receiver);
325Assert.Same(@delegate, callback.Delegate);
326Assert.Same(component, callback.Receiver);
343Assert.Same(@delegate, callback.Delegate);
344Assert.Same(component, callback.Receiver);
361Assert.Same(@delegate, callback.Delegate);
362Assert.Same(anotherComponent, callback.Receiver);
377Assert.Same(component, callback.Receiver);
392Assert.Same(@delegate, callback.Delegate);
393Assert.Same(component, callback.Receiver);
410Assert.Same(@delegate, callback.Delegate);
411Assert.Same(component, callback.Receiver);
426Assert.Same(component, callback.Receiver);
443Assert.Same(@delegate, callback.Delegate);
444Assert.Same(anotherComponent, callback.Receiver);
459Assert.Same(@delegate, callback.Delegate);
460Assert.Same(component, callback.Receiver);
477Assert.Same(@delegate, callback.Delegate);
478Assert.Same(component, callback.Receiver);
495Assert.Same(@delegate, callback.Delegate);
496Assert.Same(anotherComponent, callback.Receiver);
511Assert.Same(component, callback.Receiver);
526Assert.Same(@delegate, callback.Delegate);
527Assert.Same(component, callback.Receiver);
544Assert.Same(@delegate, callback.Delegate);
545Assert.Same(component, callback.Receiver);
562Assert.Same(@delegate, callback.Delegate);
563Assert.Same(anotherComponent, callback.Receiver);
578Assert.Same(component, callback.Receiver);
593Assert.Same(@delegate, callback.Delegate);
594Assert.Same(component, callback.Receiver);
609Assert.Same(@delegate, callback.Delegate);
610Assert.Same(component, callback.Receiver);
RendererTest.cs (32)
595Assert.Same(eventArgs, receivedArgs);
618Assert.Same(typeof(DerivedEventArgs), eventArgsType);
641Assert.Same(typeof(EventArgs), eventArgsType);
749Assert.Same(eventArgs, receivedArgs);
818Assert.Same(eventArgs, receivedArgs);
856Assert.Same(eventArgs, receivedArgs);
899Assert.Same(eventArgs, receivedArgs);
996Assert.Same(eventArgs, receivedArgs);
2096Assert.Same(objectThatWillNotChange, childComponentInstance.ObjectProperty);
2105Assert.Same(objectThatWillNotChange, childComponentInstance.ObjectProperty);
2338Assert.Same(exception1, aex);
2461Assert.Same(exception1, aex);
2604Assert.Same(exception1, ex);
2611Assert.Same(exception2, ex);
3678Assert.Same(exception, Assert.Single(renderer.HandledExceptions).GetBaseException());
3694Assert.Same(exception, Assert.Single(renderer.HandledExceptions).GetBaseException());
3734Assert.Same(exception, Assert.Single(renderer.HandledExceptions).GetBaseException());
3901Assert.Same(exception, Assert.Single(renderer.HandledExceptions).GetBaseException());
3957Assert.Same(exception, Assert.Single(renderer.HandledExceptions).GetBaseException());
3977Assert.Same(ConstructorThrowingComponent.Exception, Assert.Single(renderer.HandledExceptions).GetBaseException());
4017Assert.Same(AttachThrowingComponent.Exception, Assert.Single(renderer.HandledExceptions).GetBaseException());
4286Assert.Same(exception1, handledException);
4319Assert.Same(exception1, handledException);
4487Assert.Same(parameterValue, capturingComponent.SomeParam);
4566component => Assert.Same(exception, component.ReceivedException));
4602component => Assert.Same(exception, component.ReceivedException));
4642component => Assert.Same(exception, component.ReceivedException));
4680component => Assert.Same(exception, component.ReceivedException));
4724component => Assert.Same(exception, component.ReceivedException));
4779component => Assert.Same(exception, component.ReceivedException));
4927Assert.Same(exception1, Assert.Single(renderer.HandledExceptions));
4935Assert.Same(exception2, renderer.HandledExceptions[1]);
RenderTreeDiffBuilderTest.cs (14)
244Assert.Same(oldComponent, newComponents[1]);
281Assert.Same(oldComponents[1], newComponent);
313Assert.Same(oldComponents[1], newComponent);
342Assert.Same(oldComponents[0], newComponents[1]);
1606Assert.Same(testObject, componentInstance.ObjectProperty);
1643Assert.Same(originalFakeComponentInstance, newFrame1.Component);
1644Assert.Same(originalFakeComponent2Instance, newFrame2.Component);
1725Assert.Same(originalComponentInstance, newComponentInstance);
1727Assert.Same(objectWillNotChange, newComponentInstance.ObjectProperty);
1775Assert.Same(originalComponentInstance, newComponentInstance);
1919Assert.Same(capturedInstance1, capturedInstance2);
1932Assert.Same(capturedInstance1, frame.Component);
2055Assert.Same(oldComponents[0], newComponents[1]);
2056Assert.Same(oldComponents[1], newComponents[0]);
Microsoft.AspNetCore.Components.Web.Tests (7)
Microsoft.AspNetCore.Cors.Test (7)
Microsoft.AspNetCore.Cryptography.Internal.Tests (6)
Microsoft.AspNetCore.DataProtection.Abstractions.Tests (7)
Microsoft.AspNetCore.DataProtection.Tests (46)
KeyManagement\DefaultKeyResolverTests.cs (12)
42Assert.Same(key1, resolution.DefaultKey);
58Assert.Same(key2, resolution.DefaultKey);
73Assert.Same(key1, resolution.DefaultKey);
88Assert.Same(key1, resolution.DefaultKey);
105Assert.Same(key1, resolution.DefaultKey);
152Assert.Same(key1, resolution.DefaultKey);
184Assert.Same(key3, resolution.DefaultKey);
202Assert.Same(key2, resolution.FallbackKey);
220Assert.Same(key2, resolution.FallbackKey);
237Assert.Same(key2, resolution.FallbackKey);
264Assert.Same(key1, resolution.DefaultKey);
291Assert.Same(key2, resolution.DefaultKey);
KeyManagement\KeyRingProviderTests.cs (13)
593Assert.Same(expectedKeyRing, retVal1);
594Assert.Same(expectedKeyRing, retVal2);
633Assert.Same(expectedKeyRing1, retVal1);
634Assert.Same(expectedKeyRing1, retVal2);
635Assert.Same(expectedKeyRing2, retVal3);
667Assert.Same(expectedKeyRing1, retVal1);
668Assert.Same(expectedKeyRing2, retVal2);
716Assert.Same(expectedKeyRing, foregroundRetVal);
740Assert.Same(originalKeyRing, keyRingProvider.GetCurrentKeyRingCore(originalKeyRingTime));
743Assert.Same(originalKeyRing, keyRingProvider.GetCurrentKeyRingCore(throwKeyRingTime)); // Seeing the exception didn't clobber the cache
744Assert.Same(updatedKeyRing, keyRingProvider.GetCurrentKeyRingCore(updatedKeyRingTime, forceRefresh: true)); // forceRefresh to wait for updated value
835Assert.Same(expectedKeyRing1, keyRingProvider.GetCurrentKeyRingCore(time1)); // Ensure the cache is populated
871Assert.Same(expectedKeyRing1, updatedKeyRing);
KeyManagement\KeyRingTests.cs (7)
26Assert.Same(expectedEncryptorInstance, keyRing.DefaultAuthenticatedEncryptor);
28Assert.Same(expectedEncryptorInstance, keyRing.DefaultAuthenticatedEncryptor);
77Assert.Same(expectedEncryptorInstance1, keyRing.GetAuthenticatedEncryptorByKeyId(key1.KeyId, out var isRevoked));
80Assert.Same(expectedEncryptorInstance1, keyRing.GetAuthenticatedEncryptorByKeyId(key1.KeyId, out isRevoked));
84Assert.Same(expectedEncryptorInstance2, keyRing.GetAuthenticatedEncryptorByKeyId(key2.KeyId, out isRevoked));
87Assert.Same(expectedEncryptorInstance2, keyRing.GetAuthenticatedEncryptorByKeyId(key2.KeyId, out isRevoked));
90Assert.Same(expectedEncryptorInstance2, keyRing.DefaultAuthenticatedEncryptor);
Microsoft.AspNetCore.HeaderPropagation.Tests (1)
Microsoft.AspNetCore.Hosting.Tests (7)
Microsoft.AspNetCore.Html.Abstractions.Tests (2)
Microsoft.AspNetCore.Http.Abstractions.Tests (14)
RouteValueDictionaryTests.cs (10)
73Assert.Same(otherStorage, storage);
421Assert.Same(StringComparer.OrdinalIgnoreCase, dict.Comparer);
1610Assert.Same(value, removedValue);
1627Assert.Same(value, removedValue);
1666Assert.Same(value, removedValue);
1686Assert.Same(value, removedValue);
1708Assert.Same(value, removedValue);
1733Assert.Same(value, removedValue);
1758Assert.Same(value, removedValue);
2157Assert.Same(Array.Empty<KeyValuePair<string, object?>>(), value._arrayStorage);
Microsoft.AspNetCore.Http.Connections.Tests (11)
Microsoft.AspNetCore.Http.Extensions.Tests (35)
RequestDelegateFactoryTests.cs (9)
1209Assert.Same(httpContext, httpContextArgument);
1950Assert.Same(exception, logMessage.Exception);
1983Assert.Same(exception, logMessage.Exception);
2569m => Assert.Same(customMetadata, m),
2882Assert.Same(options.EndpointBuilder.Metadata, result.EndpointMetadata);
3061Assert.Same(initialRequestDelegate, result.RequestDelegate);
3077Assert.Same(options.EndpointBuilder.RequestDelegate, result.RequestDelegate);
3078Assert.Same(options.EndpointBuilder.Metadata, result.EndpointMetadata);
3094Assert.Same(Results.Empty, response);
Microsoft.AspNetCore.Http.Results.Tests (6)
Microsoft.AspNetCore.Http.Tests (45)
DefaultHttpContextTests.cs (13)
40Assert.Same(session, context.Session);
56Assert.Same(session, context.Session);
115Assert.Same(items, context.Items);
118Assert.Same(item, context.Items["foo"]);
129Assert.Same(traceIdentifier, context.TraceIdentifier);
132Assert.Same("Hello", context.TraceIdentifier);
143Assert.Same(items, context.Items);
146Assert.Same(item, context.Items["foo"]);
200Assert.Same(serviceProvider, context.RequestServices);
379Assert.Same(features, field.GetValue(value));
384Assert.Same(features[field.FieldType], v);
397Assert.Same(features, property.GetValue(value));
404Assert.Same(features[property.PropertyType], v);
Features\FormFeatureTests.cs (17)
25Assert.Same(FormCollection.Empty, formCollection);
75Assert.Same(formFeature.Form, formCollection);
112Assert.Same(formFeature.Form, formCollection);
219Assert.Same(formCollection, formFeature.Form);
220Assert.Same(formCollection, await context.Request.ReadFormAsync());
254Assert.Same(formCollection, formFeature.Form);
255Assert.Same(formCollection, await context.Request.ReadFormAsync());
291Assert.Same(formFeature.Form, formCollection);
292Assert.Same(formCollection, context.Request.Form);
339Assert.Same(formCollection, formFeature.Form);
340Assert.Same(formCollection, await context.Request.ReadFormAsync());
376Assert.Same(formFeature.Form, formCollection);
377Assert.Same(formCollection, context.Request.Form);
424Assert.Same(formFeature.Form, formCollection);
425Assert.Same(formCollection, context.Request.Form);
573Assert.Same(formFeature.Form, formCollection);
574Assert.Same(formCollection, context.Request.Form);
Microsoft.AspNetCore.Identity.Test (7)
Microsoft.AspNetCore.InternalTesting.Tests (2)
Microsoft.AspNetCore.JsonPatch.Tests (8)
Microsoft.AspNetCore.Localization.Tests (1)
Microsoft.AspNetCore.Mvc.Abstractions.Test (19)
ModelBinding\BindingInfoTest.cs (14)
26Assert.Same("Test", bindingInfo.BinderModelName);
27Assert.Same(BindingSource.Query, bindingInfo.BindingSource);
45Assert.Same(bindAttribute, bindingInfo.PropertyFilterProvider);
79Assert.Same("PropertyPrefix", bindingInfo.BinderModelName);
119Assert.Same(typeof(ComplexObjectModelBinder), bindingInfo.BinderType);
120Assert.Same("Test", bindingInfo.BinderModelName);
168Assert.Same(typeof(ComplexObjectModelBinder), bindingInfo.BinderType);
169Assert.Same("Different", bindingInfo.BinderModelName);
170Assert.Same(BindingSource.Custom, bindingInfo.BindingSource);
191Assert.Same(typeof(ComplexObjectModelBinder), bindingInfo.BinderType);
217Assert.Same(BindingSource.Services, bindingInfo.BindingSource);
244Assert.Same(propertyFilterProvider, bindingInfo.PropertyFilterProvider);
309Assert.Same(BindingSource.Services, bindingInfo.BindingSource);
310Assert.Same(key, bindingInfo.ServiceKey);
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (61)
DefaultApiDescriptionProviderTest.cs (61)
73Assert.Same(action, description.ActionDescriptor);
1203Assert.Same(formatters[0], apiResponseFormat.Formatter);
1306Assert.Same(formatters[1], format.Formatter);
1325Assert.Same(BindingSource.ModelBinding, parameter.Source);
1329Assert.Same(BindingSource.ModelBinding, parameter.Source);
1333Assert.Same(BindingSource.ModelBinding, parameter.Source);
1350Assert.Same(BindingSource.ModelBinding, parameter.Source);
1370Assert.Same(BindingSource.Path, parameter.Source);
1387Assert.Same(BindingSource.Query, parameter.Source);
1404Assert.Same(BindingSource.Body, parameter.Source);
1423Assert.Same(BindingSource.Form, parameter.Source);
1427Assert.Same(BindingSource.Form, parameter.Source);
1431Assert.Same(BindingSource.Form, parameter.Source);
1453Assert.Same(BindingSource.FormFile, parameter.Source);
1474Assert.Same(BindingSource.Header, parameter.Source);
1506Assert.Same(BindingSource.Custom, parameter.Source);
1525Assert.Same(BindingSource.ModelBinding, parameter.Source);
1529Assert.Same(BindingSource.ModelBinding, parameter.Source);
1533Assert.Same(BindingSource.ModelBinding, parameter.Source);
1552Assert.Same(BindingSource.Path, id.Source);
1556Assert.Same(BindingSource.Body, product.Source);
1560Assert.Same(BindingSource.Header, userId.Source);
1564Assert.Same(BindingSource.ModelBinding, comments.Source);
1583Assert.Same(BindingSource.Query, id.Source);
1602Assert.Same(BindingSource.Query, id.Source);
1621Assert.Same(BindingSource.Query, id.Source);
1640Assert.Same(BindingSource.Query, id.Source);
1659Assert.Same(BindingSource.Query, id.Source);
1678Assert.Same(BindingSource.Query, id.Source);
1697Assert.Same(BindingSource.Query, id.Source);
1716Assert.Same(BindingSource.Query, id.Source);
1720Assert.Same(BindingSource.Query, product.Source);
1740Assert.Same(BindingSource.Path, id.Source);
1744Assert.Same(BindingSource.Body, product.Source);
1748Assert.Same(BindingSource.Header, userId.Source);
1752Assert.Same(BindingSource.Query, comments.Source);
1771Assert.Same(BindingSource.Path, id.Source);
1775Assert.Same(BindingSource.ModelBinding, quantity.Source);
1779Assert.Same(BindingSource.ModelBinding, productId.Source);
1783Assert.Same(BindingSource.Query, price.Source);
1803Assert.Same(BindingSource.Path, id.Source);
1807Assert.Same(BindingSource.Query, quantity.Source);
1811Assert.Same(BindingSource.Query, productId.Source);
1815Assert.Same(BindingSource.Query, productPrice.Source);
1838Assert.Same(BindingSource.Query, id.Source);
1842Assert.Same(BindingSource.Query, name.Source);
1869Assert.Same(BindingSource.Query, id.Source);
1873Assert.Same(BindingSource.Query, name.Source);
1892Assert.Same(BindingSource.Query, c.Source);
1910Assert.Same(BindingSource.Query, products.Source);
1929Assert.Same(BindingSource.ModelBinding, items.Source);
1951Assert.Same(BindingSource.Query, id.Source);
1955Assert.Same(BindingSource.Query, name.Source);
1973Assert.Same(BindingSource.Header, name.Source);
1977Assert.Same(BindingSource.Form, id.Source);
1996Assert.Same(BindingSource.Query, name.Source);
2000Assert.Same(BindingSource.Path, id.Source);
2004Assert.Same(BindingSource.Body, product.Source);
2008Assert.Same(BindingSource.Header, userId.Source);
2012Assert.Same(BindingSource.ModelBinding, comments.Source);
2161Assert.Same(defaultValue, description.DefaultValue);
Microsoft.AspNetCore.Mvc.Core.Test (424)
ActionConstraints\ActionConstraintCacheTest.cs (11)
38a => Assert.Same(action.ActionConstraints[0], a), // Copied by provider
39a => Assert.Same(action.ActionConstraints[1], a)); // Copied by provider
44Assert.Same(actionConstraints1, actionConstraints2);
48a => Assert.Same(actionConstraints1[0], a), // Cached
49a => Assert.Same(actionConstraints1[1], a)); // Cached
76a => Assert.Same(action.ActionConstraints[1], a)); // Copied by provider
81Assert.Same(actionConstraints1, actionConstraints2);
85a => Assert.Same(actionConstraints1[0], a), // Cached
86a => Assert.Same(actionConstraints1[1], a)); // Cached
113a => Assert.Same(action.ActionConstraints[1], a)); // Copied by provider
123a => Assert.Same(actionConstraints1[1], a)); // Cached
ApplicationModels\DefaultApplicationModelProviderTest.cs (11)
82Assert.Same(controllerModel, property.Controller);
91Assert.Same(controllerModel, property.Controller);
99Assert.Same(controllerModel, property.Controller);
108Assert.Same(controllerModel, property.Controller);
134Assert.Same(controllerModel, property.Controller);
143Assert.Same(controllerModel, property.Controller);
151Assert.Same(controllerModel, property.Controller);
160Assert.Same(controllerModel, property.Controller);
187Assert.Same(action, parameter.Action);
196Assert.Same(action, parameter.Action);
204Assert.Same(action, parameter.Action);
ApplicationModels\InferParameterBindingInfoConventionTest.cs (46)
31Assert.Same(BindingSource.Custom, parameterModel.BindingInfo.BindingSource);
131Assert.Same(BindingSource.Body, bindingInfo.BindingSource);
165Assert.Same(BindingSource.Body, bindingInfo.BindingSource);
191Assert.Same(BindingSource.Body, bindingInfo.BindingSource);
217Assert.Same(BindingSource.Body, bindingInfo.BindingSource);
238Assert.Same(BindingSource.Query, bindingInfo.BindingSource);
259Assert.Same(BindingSource.Custom, bindingInfo.BindingSource);
280Assert.Same(BindingSource.Custom, bindingInfo.BindingSource);
296Assert.Same(BindingSource.Path, result);
311Assert.Same(BindingSource.Path, result);
326Assert.Same(BindingSource.Path, result);
341Assert.Same(BindingSource.Body, result);
356Assert.Same(BindingSource.Path, result);
371Assert.Same(BindingSource.Path, result);
386Assert.Same(BindingSource.Path, result);
401Assert.Same(BindingSource.Path, result);
416Assert.Same(BindingSource.Path, result);
431Assert.Same(BindingSource.Query, result);
446Assert.Same(BindingSource.Path, result);
461Assert.Same(BindingSource.Path, result);
476Assert.Same(BindingSource.Path, result);
491Assert.Same(BindingSource.Query, result);
506Assert.Same(BindingSource.Body, result);
528Assert.Same(BindingSource.Body, model.BindingInfo.BindingSource);
531Assert.Same(BindingSource.Special, cancellationToken.BindingInfo.BindingSource);
546Assert.Same(BindingSource.Query, result);
561Assert.Same(BindingSource.Body, result);
576Assert.Same(BindingSource.Body, result);
591Assert.Same(BindingSource.Body, result);
606Assert.Same(BindingSource.Body, result);
624Assert.Same(BindingSource.Services, result);
642Assert.Same(BindingSource.Services, result);
662Assert.Same(BindingSource.Query, bindingInfo.BindingSource);
683Assert.Same(BindingSource.Query, bindingInfo.BindingSource);
704Assert.Same(BindingSource.Query, bindingInfo.BindingSource);
724Assert.Same(BindingSource.Query, bindingInfo.BindingSource);
745Assert.Same(BindingSource.Query, bindingInfo.BindingSource);
766Assert.Same(BindingSource.Query, bindingInfo.BindingSource);
787Assert.Same(BindingSource.Query, bindingInfo.BindingSource);
808Assert.Same(BindingSource.Path, bindingInfo.BindingSource);
829Assert.Same(BindingSource.Path, bindingInfo.BindingSource);
850Assert.Same(BindingSource.Path, bindingInfo.BindingSource);
870Assert.Same(BindingSource.Path, bindingInfo.BindingSource);
893Assert.Same(BindingSource.Query, bindingInfo.BindingSource);
894Assert.Same(expectedPredicate, bindingInfo.RequestPredicate);
895Assert.Same(expectedPropertyFilter, bindingInfo.PropertyFilterProvider.PropertyFilter);
ControllerBaseTest.cs (50)
54Assert.Same(url, result.Url);
71Assert.Same(url, result.Url);
88Assert.Same(url, result.Url);
105Assert.Same(url, result.Url);
152Assert.Same(url, result.Url);
169Assert.Same(url, result.Url);
186Assert.Same(url, result.Url);
203Assert.Same(url, result.Url);
884Assert.Same(routeName, resultTemporary.RouteName);
901Assert.Same(routeName, resultTemporary.RouteName);
918Assert.Same(routeName, resultPermanent.RouteName);
935Assert.Same(routeName, resultPermanent.RouteName);
955Assert.Same(routeName, resultTemporary.RouteName);
976Assert.Same(routeName, resultTemporary.RouteName);
997Assert.Same(routeName, resultPermanent.RouteName);
1222Assert.Same(url, result.PageName);
1242Assert.Same(pageName, resultPermanent.PageName);
1263Assert.Same(routeName, resultPermanent.PageName);
1284Assert.Same(routeName, resultPermanent.RouteName);
1301Assert.Same(uri, result.Location);
1438Assert.Same(routeName, result.RouteName);
1479Assert.Same(routeName, result.RouteName);
1510Assert.Same(value, result.Value);
1526Assert.Same(uri, result.Location);
1658Assert.Same(routeName, result.RouteName);
1674Assert.Same(fileContents, result.FileContents);
1692Assert.Same(fileContents, result.FileContents);
1716Assert.Same(fileContents, result.FileContents);
1736Assert.Same(fileContents, result.FileContents);
1760Assert.Same(fileContents, result.FileContents);
1873Assert.Same(fileStream, result.FileStream);
1902Assert.Same(fileStream, result.FileStream);
1926Assert.Same(fileStream, result.FileStream);
1954Assert.Same(fileStream, result.FileStream);
2222Assert.Same(Encoding.UTF8, MediaType.GetEncoding(actualContentResult.ContentType));
2617Assert.Same(valueProvider, Assert.IsType<CompositeValueProvider>(context.ValueProvider)[0]);
2645Assert.Same(valueProvider, Assert.IsType<CompositeValueProvider>(context.ValueProvider)[0]);
2672Assert.Same(valueProvider, context.ValueProvider);
2728Assert.Same(valueProvider, Assert.IsType<CompositeValueProvider>(context.ValueProvider)[0]);
2761Assert.Same(valueProvider, context.ValueProvider);
2793Assert.Same(
2827Assert.Same(valueProvider.Object, context.ValueProvider);
2857Assert.Same(
2911Assert.Same(valueProvider, context.ValueProvider);
2941Assert.Same(valueProvider, Assert.IsType<CompositeValueProvider>(context.ValueProvider)[0]);
2969Assert.Same(valueProvider, Assert.IsType<CompositeValueProvider>(context.ValueProvider)[0]);
3004Assert.Same(serviceProvider, innerServiceProvider);
3024Assert.Same(request, innerRequest);
3044Assert.Same(response, innerResponse);
3060Assert.Same(routeData, innerRouteData);
Filters\FilterFactoryTest.cs (16)
72f => Assert.Same(staticFilter1, f),
73f => Assert.Same(staticFilter2, f));
84f => Assert.Same(staticFilter1, f),
85f => Assert.Same(staticFilter2, f));
109f => Assert.Same(filter2, f),
110f => Assert.Same(filter3, f),
111f => Assert.Same(filter1, f));
139f => Assert.Same(filter2, f),
140f => Assert.Same(filter3, f),
141f => Assert.Same(filter1, f));
163Assert.Same(staticFilter, filters[1]); // Cached and the same statically created filter instance
170Assert.Same(currentFactoryCreatedFilter, cachedFactoryCreatedFilter); // Cached
171Assert.Same(staticFilter, filters[1]); // Cached
198Assert.Same(staticFilter, filters[1]); // Cached
238Assert.Same(staticFilter, filters[1]); // Cached and the same statically created filter instance
250Assert.Same(staticFilter, filters[1]); // Cached and the same statically created filter instance
Infrastructure\ActionSelectorTest.cs (14)
62Assert.Collection(candidates, (a) => Assert.Same(actions[0], a));
105Assert.Collection(candidates, (a) => Assert.Same(actions[0], a));
352Assert.Same(actions[0], action);
386Assert.Same(actions[0], action);
420Assert.Same(actions[0], action);
454Assert.Same(actions[0], action);
488Assert.Same(actions[0], action);
546Assert.Same(action, actionWithConstraints);
644Assert.Same(action, actionWithConstraints);
670Assert.Same(action, nullConstraint);
700Assert.Same(action, actionWithConstraints);
733Assert.Same(action, best);
770Assert.Same(action, best);
808Assert.Same(action, best);
Infrastructure\ControllerActionInvokerTest.cs (16)
224Assert.Same(valueProviderFactory1, controllerContext.ValueProviderFactories[0]);
225Assert.Same(valueProviderFactory2, controllerContext.ValueProviderFactories[1]);
256Assert.Same(valueProviderFactory2, controllerContext.ValueProviderFactories[0]);
285Assert.Same(Result, result);
314Assert.Same(Result, result);
371Assert.Same(context.Result, result.Object);
440Assert.Same(context.Result, result.Object);
554Assert.Same(Exception, context.Exception);
597Assert.Same(exception, context.Exception);
640Assert.Same(exception, context.Exception);
719Assert.Same(expected, context.Result);
757Assert.Same(expected, context.Exception);
758Assert.Same(expected, context.ExceptionDispatchInfo.SourceException);
796Assert.Same(expected, context.Exception);
797Assert.Same(expected, context.ExceptionDispatchInfo.SourceException);
814Assert.Same(Exception, context.Exception);
Infrastructure\DefaultActionDescriptorCollectionProviderTest.cs (9)
36descriptor => Assert.Same(expected1, descriptor),
37descriptor => Assert.Same(expected2, descriptor),
38descriptor => Assert.Same(expected3, descriptor));
62Assert.Same(collection1, collection2);
116item => Assert.Same(expected1, item));
135Assert.Same(captured, collection2);
138item => Assert.Same(expected2, item));
152Assert.Same(captured, collection3);
155item => Assert.Same(expected3, item));
ModelBinding\Metadata\DefaultModelMetadataProviderTest.cs (15)
38Assert.Same(metadata1, metadata2);
39Assert.Same(metadata1.Attributes, metadata2.Attributes);
40Assert.Same(metadata1.BindingMetadata, metadata2.BindingMetadata);
41Assert.Same(metadata1.DisplayMetadata, metadata2.DisplayMetadata);
42Assert.Same(metadata1.ValidationMetadata, metadata2.ValidationMetadata);
56Assert.Same(metadata1, metadata2);
129Assert.Same(properties1[i], properties2[i]);
130Assert.Same(properties1[i].Attributes, properties2[i].Attributes);
131Assert.Same(properties1[i].BindingMetadata, properties2[i].BindingMetadata);
132Assert.Same(properties1[i].DisplayMetadata, properties2[i].DisplayMetadata);
133Assert.Same(properties1[i].ValidationMetadata, properties2[i].ValidationMetadata);
148Assert.Same(metadata1.Properties, metadata2.Properties);
261Assert.Same(metadata1, metadata2);
329Assert.Same(metadata1, metadata2);
412Assert.Same(metadata1, metadata2);
ModelBinding\Validation\DefaultComplexObjectValidationStrategyTest.cs (12)
36Assert.Same(metadata.Properties["Age"], entry.Metadata);
42Assert.Same(metadata.Properties["Id"], entry.Metadata);
48Assert.Same(metadata.Properties["Name"], entry.Metadata);
76Assert.Same(metadata.Properties["Age"], entry.Metadata);
82Assert.Same(metadata.Properties["Id"], entry.Metadata);
88Assert.Same(metadata.Properties["Name"], entry.Metadata);
110Assert.Same(metadata.Properties["Age"], entry.Metadata);
116Assert.Same(metadata.Properties["Id"], entry.Metadata);
122Assert.Same(metadata.Properties["Name"], entry.Metadata);
145Assert.Same(metadata.Properties["Age"], entry.Metadata);
151Assert.Same(metadata.Properties["Id"], entry.Metadata);
157Assert.Same(metadata.Properties["Name"], entry.Metadata);
ModelBinding\Validation\ExplicitIndexCollectionValidationStrategyTest.cs (13)
29Assert.Same(metadata.ElementMetadata, e.Metadata);
35Assert.Same(metadata.ElementMetadata, e.Metadata);
41Assert.Same(metadata.ElementMetadata, e.Metadata);
69Assert.Same(metadata.ElementMetadata, e.Metadata);
75Assert.Same(metadata.ElementMetadata, e.Metadata);
81Assert.Same(metadata.ElementMetadata, e.Metadata);
104Assert.Same(metadata.ElementMetadata, e.Metadata);
110Assert.Same(metadata.ElementMetadata, e.Metadata);
116Assert.Same(metadata.ElementMetadata, e.Metadata);
140Assert.Same(metadata.ElementMetadata, e.Metadata);
146Assert.Same(metadata.ElementMetadata, e.Metadata);
170Assert.Same(metadata.ElementMetadata, e.Metadata);
176Assert.Same(metadata.ElementMetadata, e.Metadata);
Routing\ControllerActionEndpointDataSourceTest.cs (15)
95Assert.Same(actions[1], e.Metadata.GetMetadata<ActionDescriptor>());
100Assert.Same(actions[1], e.Metadata.GetMetadata<ActionDescriptor>());
122Assert.Same(actions[0], e.Metadata.GetMetadata<ActionDescriptor>());
177Assert.Same(actions[1], e.Metadata.GetMetadata<ActionDescriptor>());
183Assert.Same(actions[1], e.Metadata.GetMetadata<ActionDescriptor>());
204Assert.Same(actions[0], e.Metadata.GetMetadata<ActionDescriptor>());
264Assert.Same(actions[1], e.Metadata.GetMetadata<ActionDescriptor>());
269Assert.Same(actions[1], e.Metadata.GetMetadata<ActionDescriptor>());
291Assert.Same(actions[0], e.Metadata.GetMetadata<ActionDescriptor>());
346Assert.Same(actions[1], e.Metadata.GetMetadata<ActionDescriptor>());
352Assert.Same(actions[1], e.Metadata.GetMetadata<ActionDescriptor>());
373Assert.Same(actions[0], e.Metadata.GetMetadata<ActionDescriptor>());
440Assert.Same(actions[1], e.Metadata.GetMetadata<ActionDescriptor>());
447Assert.Same(actions[1], e.Metadata.GetMetadata<ActionDescriptor>());
472Assert.Same(actions[0], e.Metadata.GetMetadata<ActionDescriptor>());
Microsoft.AspNetCore.Mvc.Core.TestCommon (38)
CommonResourceInvokerTest.cs (38)
112Assert.Same(Exception, exception);
158Assert.Same(Exception, exception);
727Assert.Same(expected, thrown);
879Assert.Same(Result, context.Result);
921Assert.Same(Result, context.Result);
1021Assert.Same(exception, context.Exception);
1063Assert.Same(exception, context.Exception);
1107Assert.Same(exception, context.Exception);
1149Assert.Same(exception, context.Exception);
1229Assert.Same(Result, context.Result);
1266Assert.Same(expected, context.Result);
1305Assert.Same(expected, context.Result);
1333Assert.Same(Exception, context.Exception);
1334Assert.Same(Exception, context.ExceptionDispatchInfo.SourceException);
1372Assert.Same(expected, context.Exception);
1373Assert.Same(expected, context.ExceptionDispatchInfo.SourceException);
1392Assert.Same(Exception, context.Exception);
1393Assert.Same(Exception, context.ExceptionDispatchInfo.SourceException);
1441Assert.Same(expected, exception);
1442Assert.Same(expected, context.Exception);
1443Assert.Same(expected, context.ExceptionDispatchInfo.SourceException);
1477Assert.Same(expected, exception);
1478Assert.Same(expected, context.Exception);
1479Assert.Same(expected, context.ExceptionDispatchInfo.SourceException);
1513Assert.Same(expected, exception);
1514Assert.Same(expected, context.Exception);
1515Assert.Same(expected, context.ExceptionDispatchInfo.SourceException);
1569Assert.Same(expected.Object, context.Result);
1666Assert.Same(expected.Object, context.Result);
1737.Callback<ResultExecutingContext>(c => Assert.Same(Result, c.Result))
1740.Callback<ResultExecutedContext>(c => Assert.Same(Result, c.Result))
1769Assert.Same(Result, c.Result);
1840.Callback<ResultExecutingContext>(c => Assert.Same(Result, c.Result))
1843.Callback<ResultExecutedContext>(c => Assert.Same(Result, c.Result))
1872Assert.Same(Result, c.Result);
1937.Callback<ResultExecutingContext>(c => Assert.Same(Result, c.Result))
1940.Callback<ResultExecutedContext>(c => Assert.Same(Result, c.Result))
1969Assert.Same(Result, c.Result);
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (10)
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (6)
Microsoft.AspNetCore.Mvc.IntegrationTests (9)
Microsoft.AspNetCore.Mvc.Localization.Test (2)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (8)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (5)
Microsoft.AspNetCore.Mvc.Razor.Test (74)
RazorPageActivatorTest.cs (20)
61Assert.Same(DiagnosticListener, instance.DiagnosticSource);
62Assert.Same(HtmlEncoder, instance.HtmlEncoder);
63Assert.Same(JsonHelper, instance.Json);
64Assert.Same(urlHelper, instance.Url);
65Assert.Same(viewContext.ViewData, instance.ViewData);
78Assert.Same(viewContext, service.ViewContext);
79Assert.Same(viewContext, keyedService.ViewContext);
99Assert.Same(DiagnosticListener, instance.DiagnosticSource);
100Assert.Same(HtmlEncoder, instance.HtmlEncoder);
126Assert.Same(DiagnosticListener, instance.DiagnosticSource);
127Assert.Same(HtmlEncoder, instance.HtmlEncoder);
128Assert.Same(JsonHelper, instance.Json);
129Assert.Same(urlHelper, instance.Url);
130Assert.Same(viewContext.ViewData, instance.ViewData);
150Assert.Same(viewContext, service.ViewContext);
151Assert.Same(viewContext, keyedService.ViewContext);
186Assert.Same(viewContext.ViewData, page.ViewData);
205Assert.Same(result1, result2);
220Assert.Same(result1, result2);
228Assert.Same(result3, result4);
RazorViewEngineTest.cs (31)
158Assert.Same(page, view.RazorPage);
190Assert.Same(page, view1.RazorPage);
201Assert.Same(page, view2.RazorPage);
325Assert.Same(page, view.RazorPage);
356Assert.Same(page, view.RazorPage);
522Assert.Same(page, view.RazorPage);
558Assert.Same(areaPage, view1.RazorPage);
572Assert.Same(nonAreaPage, view2.RazorPage);
584Assert.Same(areaPage, view3.RazorPage);
586Assert.Same(nonAreaPage, view4.RazorPage);
622Assert.Same(areaPage1, view1.RazorPage);
637Assert.Same(areaPage2, view2.RazorPage);
649Assert.Same(areaPage1, view3.RazorPage);
651Assert.Same(areaPage2, view4.RazorPage);
844Assert.Same(page, view1.RazorPage);
857Assert.Same(page, view2.RazorPage);
881Assert.Same(page, view1.RazorPage);
894Assert.Same(page, view2.RazorPage);
932Assert.Same(page1, view1.RazorPage);
941Assert.Same(page2, view2.RazorPage);
1055Assert.Same(page, view.RazorPage);
1190Assert.Same(page, result.Page);
1249Assert.Same(page, result.Page);
1309Assert.Same(page.Object, result.Page);
1435Assert.Same(page, result.Page);
1463Assert.Same(page, result.Page);
1491Assert.Same(page, result.Page);
1516Assert.Same(pagePath, result);
1569Assert.Same(pagePath, result);
2003Assert.Same(page, view.RazorPage);
2021Assert.Same(hotReloadedPage, view.RazorPage);
Microsoft.AspNetCore.Mvc.RazorPages.Test (228)
ApplicationModels\CompiledPageActionDescriptorBuilderTest.cs (21)
38Assert.Same(actionDescriptor.ActionConstraints, actual.ActionConstraints);
39Assert.Same(actionDescriptor.AttributeRouteInfo, actual.AttributeRouteInfo);
40Assert.Same(actionDescriptor.RelativePath, actual.RelativePath);
41Assert.Same(actionDescriptor.RouteValues, actual.RouteValues);
42Assert.Same(actionDescriptor.ViewEnginePath, actual.ViewEnginePath);
86Assert.Same(pageApplicationModel.PageType, actual.PageTypeInfo);
87Assert.Same(pageApplicationModel.DeclaredModelType, actual.DeclaredModelTypeInfo);
88Assert.Same(pageApplicationModel.ModelType, actual.ModelTypeInfo);
89Assert.Same(pageApplicationModel.HandlerType, actual.HandlerTypeInfo);
90Assert.Same(pageApplicationModel.Properties, actual.Properties);
174Assert.Same(globalFilters[0], filterDescriptor.Filter);
179Assert.Same(pageApplicationModel.Filters[0], filterDescriptor.Filter);
296Assert.Same(parameterModel2.BindingInfo, p.BindingInfo);
336Assert.Same(propertyModel.PropertyName, p.Name);
337Assert.Same(typeof(int), p.ParameterType);
338Assert.Same(propertyModel.PropertyInfo, p.Property);
339Assert.Same(propertyModel.BindingInfo, p.BindingInfo);
385Assert.Same(propertyModel1.PropertyName, p.Name);
386Assert.Same(typeof(int), p.ParameterType);
387Assert.Same(propertyModel1.PropertyInfo, p.Property);
388Assert.Same(propertyModel1.BindingInfo, p.BindingInfo);
ApplicationModels\DefaultPageApplicationModelProviderTest.cs (17)
457Assert.Same(typeof(EmptyPage).GetTypeInfo(), pageModel.HandlerType);
458Assert.Same(typeof(EmptyPage).GetTypeInfo(), pageModel.ModelType);
459Assert.Same(typeof(EmptyPage).GetTypeInfo(), pageModel.PageType);
478Assert.Same(typeof(EmptyPageModel).GetTypeInfo(), pageModel.DeclaredModelType);
479Assert.Same(typeof(EmptyPageModel).GetTypeInfo(), pageModel.ModelType);
480Assert.Same(typeof(EmptyPageModel).GetTypeInfo(), pageModel.HandlerType);
481Assert.Same(typeof(EmptyPageWithPageModel).GetTypeInfo(), pageModel.PageType);
591Assert.Same(typeof(ModelWithHandler).GetTypeInfo(), pageModel.HandlerType);
592Assert.Same(typeof(ModelWithHandler).GetTypeInfo(), pageModel.ModelType);
593Assert.Same(typeof(PageWithHandlerThatGetsIgnored).GetTypeInfo(), pageModel.PageType);
640Assert.Same(typeof(PageWithHandler).GetTypeInfo(), pageModel.HandlerType);
641Assert.Same(typeof(PocoModel).GetTypeInfo(), pageModel.ModelType);
642Assert.Same(typeof(PageWithHandler).GetTypeInfo(), pageModel.PageType);
785handler => Assert.Same(expected, handler.MethodInfo));
815handler => Assert.Same(expected, handler.MethodInfo));
843handler => Assert.Same(expected, handler.MethodInfo));
875Assert.Same(typeInfo.GetMethod(nameof(PageModelWithHandlerNames.OnPutDeleteAsync)), handler.MethodInfo);
Infrastructure\PageActionInvokerProviderTest.cs (11)
68Assert.Same(factory, entry.PageFactory);
69Assert.Same(releaser, entry.ReleasePage);
133Assert.Same(factory, entry.PageFactory);
134Assert.Same(releaser, entry.ReleasePage);
135Assert.Same(modelFactory, entry.ModelFactory);
136Assert.Same(modelDisposer, entry.ReleaseModel);
140Assert.Same(compiledPageActionDescriptor, pageContext.ActionDescriptor);
141Assert.Same(context.ActionContext.HttpContext, pageContext.HttpContext);
142Assert.Same(context.ActionContext.ModelState, pageContext.ModelState);
143Assert.Same(context.ActionContext.RouteData, pageContext.RouteData);
241Assert.Same(entry1, entry2);
Infrastructure\PageActionInvokerTest.cs (54)
112Assert.Same(valueProviderFactory1, pageContext.ValueProviderFactories[0]);
113Assert.Same(valueProviderFactory2, pageContext.ValueProviderFactories[1]);
146Assert.Same(valueProviderFactory2, pageContext.ValueProviderFactories[0]);
172Assert.Same(instance, c.HandlerInstance);
180Assert.Same(instance, c.Controller);
187Assert.Same(instance, c.Controller);
188Assert.Same(result, c.Result);
201Assert.Same(page, page.ViewContext.ViewData.Model);
204Assert.Same(page, pageResult.Page);
205Assert.Same(page, pageResult.Model);
206Assert.Same(page.ViewContext.ViewData, pageResult.ViewData);
228Assert.Same(instance, c.HandlerInstance);
236Assert.Same(instance, c.Controller);
243Assert.Same(instance, c.Controller);
244Assert.Same(result, c.Result);
260Assert.Same(page, pageResult.Page);
262Assert.Same(page.ViewContext.ViewData, pageResult.ViewData);
285Assert.Same(instance, c.HandlerInstance);
293Assert.Same(instance, c.Controller);
300Assert.Same(instance, c.Controller);
301Assert.Same(result, c.Result);
317Assert.Same(pageModel, pageModel.ViewData.Model);
321Assert.Same(pageModel, pageResult.Model);
322Assert.Same(pageModel.PageContext.ViewData, pageResult.ViewData);
371.Callback<PageHandlerExecutingContext>(c => Assert.Same(handler, c.HandlerMethod))
375.Callback<PageHandlerExecutedContext>(c => Assert.Same(handler, c.HandlerMethod))
381.Callback<PageHandlerSelectedContext>(c => Assert.Same(handler, c.HandlerMethod))
385.Callback<PageHandlerExecutingContext>(c => Assert.Same(handler, c.HandlerMethod))
389.Callback<PageHandlerExecutedContext>(c => Assert.Same(handler, c.HandlerMethod))
428Assert.Same(handler, c.HandlerMethod);
436.Callback<PageHandlerSelectedContext>(c => Assert.Same(handler, c.HandlerMethod))
443Assert.Same(handler, c.HandlerMethod);
517Assert.Same(Result, result);
547Assert.Same(Result, result);
579Assert.Same(expectedResult, pageResult);
613Assert.Same(expectedResult, pageResult);
648Assert.Same(expectedResult, pageResult);
682Assert.Same(expectedResult, pageResult);
717Assert.Same(expectedResult, pageResult);
751Assert.Same(expectedResult, pageResult);
787Assert.Same(expectedResult, pageResult);
822Assert.Same(expectedResult, pageResult);
885Assert.Same(context.Result, result.Object);
957Assert.Same(context.Result, result.Object);
1062Assert.Same(Exception, c.Exception);
1077Assert.Same(Exception, context.Exception);
1122Assert.Same(exception, context.Exception);
1167Assert.Same(exception, context.Exception);
1248Assert.Same(expected, context.Result);
1287Assert.Same(expected, context.Exception);
1288Assert.Same(expected, context.ExceptionDispatchInfo.SourceException);
1326Assert.Same(expected, context.Exception);
1327Assert.Same(expected, context.ExceptionDispatchInfo.SourceException);
1344Assert.Same(Exception, context.Exception);
PageModelTest.cs (33)
62Assert.Same(url, result.Url);
79Assert.Same(url, result.Url);
96Assert.Same(url, result.Url);
143Assert.Same(url, result.Url);
160Assert.Same(url, result.Url);
177Assert.Same(url, result.Url);
194Assert.Same(url, result.Url);
875Assert.Same(routeName, resultTemporary.RouteName);
892Assert.Same(routeName, resultTemporary.RouteName);
909Assert.Same(routeName, resultPermanent.RouteName);
926Assert.Same(routeName, resultPermanent.RouteName);
1242Assert.Same(url, result.PageName);
1262Assert.Same(pageName, resultPermanent.PageName);
1283Assert.Same(routeName, resultPermanent.PageName);
1304Assert.Same(routeName, resultTemporary.RouteName);
1325Assert.Same(routeName, resultTemporary.RouteName);
1346Assert.Same(routeName, resultPermanent.RouteName);
1367Assert.Same(routeName, resultPermanent.RouteName);
1383Assert.Same(fileContents, result.FileContents);
1400Assert.Same(fileContents, result.FileContents);
1461Assert.Same(fileStream, result.FileStream);
1487Assert.Same(fileStream, result.FileStream);
1607Assert.Same(Encoding.UTF8, MediaType.GetEncoding(actualContentResult.ContentType));
1743Assert.Same(pageContext, pageModel.PageContext);
1744Assert.Same(httpContext, pageModel.HttpContext);
1745Assert.Same(httpContext.Request, pageModel.Request);
1746Assert.Same(httpContext.Response, pageModel.Response);
1747Assert.Same(modelState, pageModel.ModelState);
1748Assert.Same(viewData, pageModel.ViewData);
1807Assert.Same(urlHelper, pageModel.Url);
2003Assert.Same(viewData, result.ViewData);
2025Assert.Same(viewData, result.ViewData);
2042Assert.Same(arguments, result.Arguments);
PageTest.cs (35)
42Assert.Same(pageContext, page.PageContext);
43Assert.Same(viewContext, page.ViewContext);
44Assert.Same(httpContext, page.HttpContext);
45Assert.Same(httpContext.Request, page.Request);
46Assert.Same(httpContext.Response, page.Response);
47Assert.Same(modelState, page.ModelState);
48Assert.Same(tempData, page.TempData);
65Assert.Same(url, result.Url);
82Assert.Same(url, result.Url);
99Assert.Same(url, result.Url);
116Assert.Same(url, result.Url);
163Assert.Same(url, result.Url);
180Assert.Same(url, result.Url);
197Assert.Same(url, result.Url);
214Assert.Same(url, result.Url);
895Assert.Same(routeName, resultTemporary.RouteName);
912Assert.Same(routeName, resultTemporary.RouteName);
929Assert.Same(routeName, resultPermanent.RouteName);
946Assert.Same(routeName, resultPermanent.RouteName);
966Assert.Same(routeName, resultTemporary.RouteName);
987Assert.Same(routeName, resultTemporary.RouteName);
1008Assert.Same(routeName, resultPermanent.RouteName);
1029Assert.Same(routeName, resultPermanent.RouteName);
1316Assert.Same(url, result.PageName);
1336Assert.Same(pageName, resultPermanent.PageName);
1357Assert.Same(routeName, resultPermanent.PageName);
1373Assert.Same(fileContents, result.FileContents);
1390Assert.Same(fileContents, result.FileContents);
1451Assert.Same(fileStream, result.FileStream);
1477Assert.Same(fileStream, result.FileStream);
1597Assert.Same(Encoding.UTF8, MediaType.GetEncoding(actualContentResult.ContentType));
1778Assert.Same(viewData, result.ViewData);
1800Assert.Same(viewData, result.ViewData);
1825Assert.Same(arguments, result.Arguments);
1826Assert.Same(viewData, result.ViewData);
Microsoft.AspNetCore.Mvc.Routing.Abstractions.Tests (3)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (13)
Microsoft.AspNetCore.Mvc.Test (1)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (185)
CachedExpressionCompilerTest.cs (15)
23Assert.Same(model, result);
39Assert.Same(func1, func2);
56Assert.Same(differentModel, result);
88Assert.Same(differentModel, result);
105Assert.Same(differentModel, result1);
112Assert.Same(differentModel, result2);
128Assert.Same(differentModel, result1);
136Assert.Same(differentModel, result2);
184Assert.Same(func1, func2);
218Assert.Same(func1, func2);
298Assert.Same(func1, func2);
541Assert.Same(func1, func2);
557Assert.Same(func1, func2);
833Assert.Same(differentModel, result);
850Assert.Same(differentModel, result);
ControllerTest.cs (33)
49Assert.Same(replacementViewData, controller.ViewData);
79Assert.Same(controller.ViewData, actualViewResult.ViewData);
80Assert.Same(controller.TempData, actualViewResult.TempData);
103Assert.Same(controller.ViewData, actualViewResult.ViewData);
104Assert.Same(controller.TempData, actualViewResult.TempData);
105Assert.Same(model, actualViewResult.ViewData.Model);
124Assert.Same(controller.ViewData, actualViewResult.ViewData);
125Assert.Same(controller.TempData, actualViewResult.TempData);
146Assert.Same(controller.ViewData, actualViewResult.ViewData);
147Assert.Same(controller.TempData, actualViewResult.TempData);
148Assert.Same(model, actualViewResult.ViewData.Model);
168Assert.Same(controller.ViewData, actualViewResult.ViewData);
169Assert.Same(controller.TempData, actualViewResult.TempData);
170Assert.Same(model, actualViewResult.ViewData.Model);
190Assert.Same(controller.ViewData, actualViewResult.ViewData);
191Assert.Same(controller.TempData, actualViewResult.TempData);
214Assert.Same(controller.ViewData, actualViewResult.ViewData);
215Assert.Same(controller.TempData, actualViewResult.TempData);
216Assert.Same(model, actualViewResult.ViewData.Model);
237Assert.Same(controller.ViewData, actualViewResult.ViewData);
238Assert.Same(controller.TempData, actualViewResult.TempData);
239Assert.Same(model, actualViewResult.ViewData.Model);
259Assert.Same(controller.ViewData, actualViewResult.ViewData);
260Assert.Same(controller.TempData, actualViewResult.TempData);
261Assert.Same(model, actualViewResult.ViewData.Model);
281Assert.Same(controller.ViewData, actualViewResult.ViewData);
282Assert.Same(controller.TempData, actualViewResult.TempData);
283Assert.Same(model, actualViewResult.ViewData.Model);
303Assert.Same(controller.ViewData, actualViewResult.ViewData);
304Assert.Same(controller.TempData, actualViewResult.TempData);
320Assert.Same(data, actualJsonResult.Value);
336Assert.Same(data, actualJsonResult.Value);
337Assert.Same(serializerSettings, actualJsonResult.SerializerSettings);
ControllerUnitTestabilityTests.cs (18)
32Assert.Same(model, viewResult.Model);
33Assert.Same(model, viewResult.ViewData.Model);
34Assert.Same(controller.ViewData, viewResult.ViewData);
35Assert.Same(controller.TempData, viewResult.TempData);
54Assert.Same(model, viewResult.Model);
55Assert.Same(model, viewResult.ViewData.Model);
56Assert.Same(controller.ViewData, viewResult.ViewData);
57Assert.Same(controller.TempData, viewResult.TempData);
202Assert.Same(model, jsonResult.Value);
234Assert.Same(model, jsonResult.Value);
302Assert.Same(error, httpBadRequest.Value);
337Assert.Same(value, createdAtRouteResult.Value);
373Assert.Same(value, acceptedAtRouteResult.Value);
411Assert.Same(value, createdAtActionResult.Value);
450Assert.Same(value, acceptedAtActionResult.Value);
611Assert.Same(httpContext, controller.HttpContext);
612Assert.Same(routeData, controller.RouteData);
614Assert.Same(actionDescriptor, controllerContext.ActionDescriptor);
ModelStateDictionaryExtensionsTest.cs (13)
92Assert.Same(exception, modelError.Exception);
112Assert.Same(exception, modelError.Exception);
130Assert.Same(exception, modelError.Exception);
150Assert.Same(exception, modelError.Exception);
168Assert.Same(exception, modelError.Exception);
188Assert.Same(exception, modelError.Exception);
207Assert.Same(exception, modelError.Exception);
228Assert.Same(exception, modelError.Exception);
306Assert.Same(expected, modelState.Value);
326Assert.Same(expected, modelState.Value);
345Assert.Same(expected, modelState.Value);
368Assert.Same(expected, modelState.Value);
390Assert.Same(expected, modelState.Value);
Rendering\ViewContextTests.cs (13)
38Assert.Same(replacementViewData, context.ViewData);
64Assert.Same(originalContext.ActionDescriptor, context.ActionDescriptor);
66Assert.Same(originalContext.ExecutingFilePath, context.ExecutingFilePath);
67Assert.Same(originalContext.FormContext, context.FormContext);
69Assert.Same(originalContext.HttpContext, context.HttpContext);
70Assert.Same(originalContext.ModelState, context.ModelState);
71Assert.Same(originalContext.RouteData, context.RouteData);
72Assert.Same(originalContext.TempData, context.TempData);
73Assert.Same(originalContext.ValidationMessageElement, context.ValidationMessageElement);
74Assert.Same(originalContext.ValidationSummaryMessageElement, context.ValidationSummaryMessageElement);
76Assert.Same(view, context.View);
77Assert.Same(viewData, context.ViewData);
78Assert.Same(writer, context.Writer);
ViewDataDictionaryOfTModelTest.cs (14)
22Assert.Same(modelState, viewData.ModelState);
51Assert.Same(model, viewData1.Model);
54Assert.Same(source.ModelMetadata, viewData1.ModelMetadata);
63Assert.Same(model, viewData2.Model);
66Assert.Same(source.ModelMetadata, viewData2.ModelMetadata);
93Assert.Same(source.ModelMetadata, viewData1.ModelMetadata);
105Assert.Same(source.ModelMetadata, viewData2.ModelMetadata);
126Assert.Same(model, viewData.Model);
129Assert.Same(source.ModelMetadata, viewData.ModelMetadata);
147Assert.Same(model, viewData.Model);
150Assert.Same(source.ModelMetadata, viewData.ModelMetadata);
279Assert.Same(source.ModelMetadata, viewData.ModelMetadata);
319Assert.Same(source.ModelExplorer, viewData.ModelExplorer);
320Assert.Same(source.ModelMetadata, viewData.ModelMetadata);
ViewDataDictionaryTest.cs (13)
40Assert.Same(modelState, viewData.ModelState);
181Assert.Same(model, vdd.Model);
205Assert.Same(model, viewData.Model);
208Assert.Same(source.ModelMetadata, viewData.ModelMetadata);
249Assert.Same(source.ModelMetadata, viewData.ModelMetadata);
263Assert.Same(source.ModelMetadata, viewData.ModelMetadata);
314Assert.Same(source.ModelMetadata, viewData.ModelMetadata);
338Assert.Same(originalMetadata, viewData.ModelMetadata);
387Assert.Same(metadata, viewData.ModelMetadata);
430Assert.Same(originalMetadata, viewData.ModelMetadata);
455Assert.Same(originalMetadata, viewData.ModelMetadata);
456Assert.Same(originalExplorer, viewData.ModelExplorer);
665Assert.Same(model, result);
Microsoft.AspNetCore.OpenApi.Tests (1)
Microsoft.AspNetCore.Owin.Tests (4)
Microsoft.AspNetCore.Razor.Runtime.Test (8)
Microsoft.AspNetCore.Razor.Test (9)
Microsoft.AspNetCore.ResponseCaching.Tests (1)
Microsoft.AspNetCore.Routing.Tests (225)
CompositeEndpointDataSourceTest.cs (21)
77Assert.Same(ex, Assert.Throws<Exception>(() => compositeDataSource.Endpoints));
78Assert.Same(ex, Assert.Throws<Exception>(() => compositeDataSource.Endpoints));
79Assert.Same(ex, Assert.Throws<Exception>(() => compositeDataSource.GetGroupedEndpoints(groupContext)));
80Assert.Same(ex, Assert.Throws<Exception>(() => compositeDataSource.GetGroupedEndpoints(groupContext)));
105(ep) => Assert.Same(endpoint1, ep),
106(ep) => Assert.Same(endpoint2, ep),
107(ep) => Assert.Same(endpoint3, ep),
108(ep) => Assert.Same(endpoint4, ep),
109(ep) => Assert.Same(endpoint5, ep));
125Assert.Same(endpoint1, endpoint);
136(ep) => Assert.Same(endpoint1, ep),
137(ep) => Assert.Same(endpoint2, ep));
148(ep) => Assert.Same(endpoint1, ep),
149(ep) => Assert.Same(endpoint2, ep),
150(ep) => Assert.Same(endpoint3, ep));
307Assert.Same(context, receivedContext);
312m => Assert.Same(metadata, m),
353Assert.Same(context, receivedContext);
408Assert.Same(context, receivedContext);
473receivedContext => Assert.Same(context, receivedContext),
474receivedContext => Assert.Same(context, receivedContext));
Matching\CandidateSetTest.cs (18)
35Assert.Same(endpoints[i], state.Endpoint);
71Assert.Same(endpoint, state.Endpoint);
72Assert.Same(values, state.Values);
139Assert.Same(endpoints[i], state.Endpoint);
178Assert.Same(replacements[0], candidateSet[0].Endpoint);
180Assert.Same(replacements[2], candidateSet[1].Endpoint);
182Assert.Same(replacements[1], candidateSet[2].Endpoint);
188Assert.Same(endpoints[i - 2], state.Endpoint);
231Assert.Same(endpoints[i], state.Endpoint);
235Assert.Same(replacements[0], candidateSet[5].Endpoint);
237Assert.Same(replacements[2], candidateSet[6].Endpoint);
239Assert.Same(replacements[1], candidateSet[7].Endpoint);
245Assert.Same(endpoints[i - 2], state.Endpoint);
288Assert.Same(endpoints[i], state.Endpoint);
292Assert.Same(replacements[0], candidateSet[9].Endpoint);
294Assert.Same(replacements[2], candidateSet[10].Endpoint);
296Assert.Same(replacements[1], candidateSet[11].Endpoint);
360Assert.Same(endpoints[i], state.Endpoint);
Matching\DfaMatcherBuilderTest.cs (17)
30Assert.Same(endpoint, Assert.Single(root.Matches));
99Assert.Same(endpoint, Assert.Single(c.Matches));
123Assert.Same(endpoint, Assert.Single(a.Matches));
130Assert.Same(endpoint, Assert.Single(catchAll.Matches));
132Assert.Same(catchAll, catchAll.Parameters);
133Assert.Same(catchAll, catchAll.CatchAll);
149Assert.Same(endpoint, Assert.Single(root.Matches));
155Assert.Same(endpoint, Assert.Single(catchAll.Matches));
157Assert.Same(catchAll, catchAll.Parameters);
2526e => Assert.Same(endpoint1, e));
2580e => Assert.Same(endpoint2, e));
2621e => Assert.Same(endpoint2, e));
2988Assert.Same(endpoint, Assert.Single(root.Matches));
3068Assert.Same(endpoint1, Assert.Single(root.Matches));
3128Assert.Same(endpoint, Assert.Single(root.Matches));
3396Assert.Same(constraint1.Value, constraint2.Value);
3419Assert.Same(constraint1.Value, constraint2.Value);
Matching\DfaMatcherTest.cs (17)
155Assert.Same(endpoint, httpContext.GetEndpoint());
220Assert.Same(endpoint, httpContext.GetEndpoint());
269Assert.Same(endpoint, httpContext.GetEndpoint());
304Assert.Same(endpoint1, httpContext.GetEndpoint());
312Assert.Same(endpoint2, httpContext.GetEndpoint());
338Assert.Same(endpoint, httpContext.GetEndpoint());
598Assert.Same(endpoint, httpContext.GetEndpoint());
653Assert.Same(endpoint1, cs[0].Endpoint);
658Assert.Same(endpoint2, cs[1].Endpoint);
699Assert.Same(endpoint1, cs[0].Endpoint);
704Assert.Same(endpoint2, cs[1].Endpoint);
746Assert.Same(endpoint1, cs[0].Endpoint);
751Assert.Same(endpoint2, cs[1].Endpoint);
909Assert.Same(endpointDataSource.Endpoints[0], httpContext.GetEndpoint());
978Assert.Same(dataSource.Endpoints[2], httpContext.GetEndpoint());
1013Assert.Same(dataSource.Endpoints[1], httpContext.GetEndpoint());
1062Assert.Same(dataSource.Endpoints[0], httpContext.GetEndpoint());
Matching\EndpointComparerTest.cs (10)
210e => Assert.Same(endpoint1, e),
211e => Assert.Same(endpoint2, e),
212e => Assert.Same(endpoint3, e),
213e => Assert.Same(endpoint4, e),
214e => Assert.Same(endpoint5, e),
215e => Assert.Same(endpoint6, e),
216e => Assert.Same(endpoint7, e));
237e => Assert.Same(endpoint1, e),
238e => Assert.Same(endpoint2, e),
239e => Assert.Same(endpoint3, e));
Patterns\RoutePatternFactoryTest.cs (14)
425Assert.Same(paramPartB, actual.Parameters[0]);
426Assert.Same(paramPartC, actual.Parameters[1]);
427Assert.Same(paramPartD, actual.Parameters[2]);
454Assert.Same(paramPartB, actual.Parameters[0]);
455Assert.Same(paramPartC, actual.Parameters[1]);
456Assert.Same(paramPartD, actual.Parameters[2]);
494Assert.Same(paramPartD, actual.Parameters[2]);
534Assert.Same(paramPartD, actual.Parameters[2]);
691Assert.Same(paramPartB, actual.Parts[0]);
692Assert.Same(paramPartC, actual.Parts[1]);
693Assert.Same(paramPartD, actual.Parts[2]);
712Assert.Same(paramPartB, actual.Parts[0]);
713Assert.Same(paramPartC, actual.Parts[1]);
714Assert.Same(paramPartD, actual.Parts[2]);
RouteTest.cs (38)
99Assert.Same(originalRouteDataValues, context.RouteData.Values);
103Assert.Same(originalDataTokens, context.RouteData.DataTokens);
497Assert.Same(target, context.RouteData.Routers[0]);
611Assert.Same(route, pathData.Router);
643Assert.Same(route, pathData.Router);
676Assert.Same(route, pathData.Router);
694Assert.Same(route, pathData.Router);
712Assert.Same(route, pathData.Router);
730Assert.Same(route, pathData.Router);
748Assert.Same(route, pathData.Router);
782Assert.Same(target.Object, pathData.Router);
823Assert.Same(route, pathData.Router);
847Assert.Same(route, pathData.Router);
863Assert.Same(route, pathData.Router);
904Assert.Same(route, pathData.Router);
945Assert.Same(route, pathData.Router);
979Assert.Same(route, pathData.Router);
1010Assert.Same(route, pathData.Router);
1041Assert.Same(route, pathData.Router);
1071Assert.Same(route, pathData.Router);
1102Assert.Same(route, pathData.Router);
1121Assert.Same(route, pathData.Router);
1153Assert.Same(route, pathData.Router);
1170Assert.Same(route, pathData.Router);
1202Assert.Same(route, pathData.Router);
1225Assert.Same(route, pathData.Router);
1247Assert.Same(route, pathData.Router);
1269Assert.Same(route, pathData.Router);
1291Assert.Same(route, pathData.Router);
1313Assert.Same(route, pathData.Router);
1335Assert.Same(route, pathData.Router);
1357Assert.Same(route, pathData.Router);
1379Assert.Same(route, pathData.Router);
1401Assert.Same(route, pathData.Router);
1425Assert.Same(route, pathData.Router);
1449Assert.Same(route, pathData.Router);
1473Assert.Same(route, pathData.Router);
1497Assert.Same(route, pathData.Router);
RouteValuesAddressSchemeTest.cs (15)
28Assert.Same(endpoint2, actual);
47Assert.Same(endpoint2, Assert.IsType<RouteEndpoint>(namedMatches[0].Match.Entry.Data));
48Assert.Same(endpoint3, Assert.IsType<RouteEndpoint>(namedMatches[1].Match.Entry.Data));
67Assert.Same(endpoint2, Assert.IsType<RouteEndpoint>(namedMatches[0].Match.Entry.Data));
68Assert.Same(endpoint3, Assert.IsType<RouteEndpoint>(namedMatches[1].Match.Entry.Data));
89Assert.Same(endpoint1, actual);
132Assert.Same(endpoint1, actual);
137Assert.Same(endpoint2, actual);
142Assert.Same(endpoint3, actual);
147Assert.Same(endpoint4, actual);
200Assert.Same(endpoint1, actual);
282Assert.Same(expected, actual);
305Assert.Same(expected, actual);
334Assert.Same(expected, actual);
412Assert.Same(endpoint, Assert.Single(allMatches).Entry.Data);
Tree\TreeRouterTest.cs (31)
820Assert.Same(route, result.Router);
843Assert.Same(route, result.Router);
875Assert.Same(route, result.Router);
907Assert.Same(route, result.Router);
942Assert.Same(route, result.Router);
988Assert.Same(route, result.Router);
1025Assert.Same(route, result.Router);
1055Assert.Same(route, result.Router);
1085Assert.Same(route, result.Router);
1143Assert.Same(route, result.Router);
1229Assert.Same(route, result.Router);
1249Assert.Same(route, pathData.Router);
1269Assert.Same(route, pathData.Router);
1306Assert.Same(route, pathData.Router);
1326Assert.Same(route, pathData.Router);
1346Assert.Same(route, pathData.Router);
1371Assert.Same(route, pathData.Router);
1391Assert.Same(route, pathData.Router);
1412Assert.Same(route, pathData.Router);
1450Assert.Same(route, pathData.Router);
1470Assert.Same(route, pathData.Router);
1492Assert.Same(route, pathData.Router);
1517Assert.Same(route, pathData.Router);
1542Assert.Same(route, pathData.Router);
1569Assert.Same(route, pathData.Router);
1596Assert.Same(route, pathData.Router);
1690Assert.Same(route, pathData.Router);
1913Assert.Same(route, pathData.Router);
1935Assert.Same(route, pathData.Router);
1957Assert.Same(route, pathData.Router);
1979Assert.Same(route, pathData.Router);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (9)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (90)
BodyControlTests.cs (13)
28Assert.Same(ex,
30Assert.Same(ex,
47Assert.Same(ex,
50Assert.Same(ex,
53Assert.Same(ex,
73Assert.Same(ex,
76Assert.Same(ex,
78Assert.Same(ex,
94Assert.Same(ex,
96Assert.Same(ex,
98Assert.Same(ex,
100Assert.Same(ex,
102Assert.Same(ex,
Http1\Http1HttpProtocolFeatureCollectionTests.cs (15)
52Assert.Same(featureLookup, featureIter.Value);
53Assert.Same(featureLookup, _collection);
75Assert.Same(_collection[type], feature.Value);
190Assert.Same(_collection.Get<IHttpRequestFeature>(), _collection[typeof(IHttpRequestFeature)]);
191Assert.Same(_collection.Get<IHttpRequestBodyDetectionFeature>(), _collection[typeof(IHttpRequestBodyDetectionFeature)]);
192Assert.Same(_collection.Get<IHttpResponseFeature>(), _collection[typeof(IHttpResponseFeature)]);
193Assert.Same(_collection.Get<IHttpResponseBodyFeature>(), _collection[typeof(IHttpResponseBodyFeature)]);
194Assert.Same(_collection.Get<IRequestBodyPipeFeature>(), _collection[typeof(IRequestBodyPipeFeature)]);
195Assert.Same(_collection.Get<IHttpRequestIdentifierFeature>(), _collection[typeof(IHttpRequestIdentifierFeature)]);
196Assert.Same(_collection.Get<IHttpRequestLifetimeFeature>(), _collection[typeof(IHttpRequestLifetimeFeature)]);
197Assert.Same(_collection.Get<IHttpConnectionFeature>(), _collection[typeof(IHttpConnectionFeature)]);
198Assert.Same(_collection.Get<IHttpMaxRequestBodySizeFeature>(), _collection[typeof(IHttpMaxRequestBodySizeFeature)]);
199Assert.Same(_collection.Get<IHttpMinRequestBodyDataRateFeature>(), _collection[typeof(IHttpMinRequestBodyDataRateFeature)]);
200Assert.Same(_collection.Get<IHttpMinResponseDataRateFeature>(), _collection[typeof(IHttpMinResponseDataRateFeature)]);
201Assert.Same(_collection.Get<IHttpBodyControlFeature>(), _collection[typeof(IHttpBodyControlFeature)]);
SniOptionsSelectorTests.cs (14)
408Assert.Same(options1, options2);
444Assert.Same(lastSeenSslOptions, options1);
447Assert.Same(lastSeenSslOptions, options2);
487Assert.Same(selectorCertificate, selectorOptions1.ServerCertificate);
490Assert.Same(selectorCertificate, selectorOptions2.ServerCertificate);
502Assert.Same(configOptions1, configOptions2);
546Assert.Same(fallbackOptions.ServerCertificate, options.ServerCertificate);
574Assert.Same(selectorCertificate, options.ServerCertificate);
878Assert.Same(options.CipherSuitesPolicy, clonedOptions.CipherSuitesPolicy);
890Assert.Same(options.RemoteCertificateValidationCallback, clonedOptions.RemoteCertificateValidationCallback);
894Assert.Same(options.ServerCertificate, clonedOptions.ServerCertificate);
897Assert.Same(options.ServerCertificateContext, clonedOptions.ServerCertificateContext);
900Assert.Same(options.ServerCertificateSelectionCallback, clonedOptions.ServerCertificateSelectionCallback);
903Assert.Same(options.CertificateChainPolicy, clonedOptions.CertificateChainPolicy);
StartLineTests.cs (24)
77Assert.Same(path, Http1Connection.Path);
78Assert.Same(query, Http1Connection.QueryString);
130Assert.Same(rawTarget, Http1Connection.RawTarget);
132Assert.Same(path, Http1Connection.Path);
133Assert.Same(query, Http1Connection.QueryString);
225Assert.Same(prevRequestUrl, Http1Connection.RawTarget);
226Assert.Same(prevPath, Http1Connection.Path);
227Assert.Same(prevQuery, Http1Connection.QueryString);
318Assert.Same(prevRequestUrl, Http1Connection.RawTarget);
319Assert.Same(prevPath, Http1Connection.Path);
320Assert.Same(prevQuery, Http1Connection.QueryString);
392Assert.Same(rawTarget, Http1Connection.RawTarget);
393Assert.Same(path, Http1Connection.Path);
394Assert.Same(query, Http1Connection.QueryString);
398Assert.Same(prevRequestUrl, Http1Connection.RawTarget);
399Assert.Same(prevPath, Http1Connection.Path);
400Assert.Same(prevQuery, Http1Connection.QueryString);
475Assert.Same(path, Http1Connection.Path);
476Assert.Same(query, Http1Connection.QueryString);
480Assert.Same(prevRequestUrl, Http1Connection.RawTarget);
481Assert.Same(prevPath, Http1Connection.Path);
482Assert.Same(prevQuery, Http1Connection.QueryString);
507Assert.Same(path, Http1Connection.Path);
508Assert.Same(query, Http1Connection.QueryString);
Microsoft.AspNetCore.Server.Kestrel.Tests (2)
Microsoft.AspNetCore.Shared.Tests (27)
ObjectMethodExecutorTest.cs (15)
173Assert.Same(typeof(TestObject), executor.AsyncResultType);
189Assert.Same(typeof(int), executor.AsyncResultType);
204Assert.Same(typeof(TestObject), executor.AsyncResultType);
221Assert.Same(typeof(int), executor.AsyncResultType);
243Assert.Same(typeof(void), executor.AsyncResultType);
258Assert.Same(typeof(string), executor.AsyncResultType);
273Assert.Same(typeof(string), executor.AsyncResultType);
288Assert.Same(typeof(int), executor.AsyncResultType);
303Assert.Same(typeof(string), executor.AsyncResultType);
318Assert.Same(typeof(int), executor.AsyncResultType);
334Assert.Same(typeof(string), executor.AsyncResultType);
352Assert.Same(typeof(string), executor.AsyncResultType);
370Assert.Same(typeof(string), executor.AsyncResultType);
388Assert.Same(typeof(string), executor.AsyncResultType);
403Assert.Same(typeof(string), executor.AsyncResultType);
Microsoft.AspNetCore.SignalR.Client.Tests (33)
HubConnectionTests.Reconnect.cs (24)
64Assert.Same(exception, await closedErrorTcs.Task.DefaultTimeout());
153Assert.Same(originalConnectionId, hubConnection.ConnectionId);
158Assert.Same(firstException, await reconnectingErrorTcs.Task.DefaultTimeout());
160Assert.Same(firstException, retryContexts[0].RetryReason);
167Assert.Same(reconnectedConnectionId, await reconnectedConnectionIdTcs.Task.DefaultTimeout());
170Assert.Same(reconnectException, retryContexts[1].RetryReason);
255Assert.Same(firstException, await reconnectingErrorTcs.Task.DefaultTimeout());
257Assert.Same(firstException, retryContexts[0].RetryReason);
268Assert.Same(reconnectException, retryContexts[1].RetryReason);
350Assert.Same(firstException, await reconnectingErrorTcs.Task.DefaultTimeout());
432Assert.Same(firstException, await reconnectingErrorTcs.Task.DefaultTimeout());
434Assert.Same(firstException, retryContexts[0].RetryReason);
450Assert.Same(secondException, await reconnectingErrorTcs.Task.DefaultTimeout());
452Assert.Same(secondException, retryContexts[1].RetryReason);
719Assert.Same(firstException, await Assert.ThrowsAsync<Exception>(() => startTask).DefaultTimeout());
799Assert.Same(firstException, await reconnectingErrorTcs.Task.DefaultTimeout());
801Assert.Same(firstException, retryContexts[0].RetryReason);
811Assert.Same(secondException, retryContexts[1].RetryReason);
906Assert.Same(firstException, await reconnectingErrorTcs.Task.DefaultTimeout());
908Assert.Same(firstException, retryContexts[0].RetryReason);
1026Assert.Same(firstException, await reconnectingErrorTcs.Task.DefaultTimeout());
1028Assert.Same(firstException, retryContexts[0].RetryReason);
1103Assert.Same(firstException, await reconnectingErrorTcs.Task.DefaultTimeout());
1105Assert.Same(firstException, retryContexts[0].RetryReason);
Microsoft.AspNetCore.SignalR.Common.Tests (1)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (2)
Microsoft.AspNetCore.SignalR.Tests (22)
Microsoft.AspNetCore.TestHost.Tests (1)
Microsoft.AspNetCore.Tests (15)
WebApplicationTests.cs (15)
188Assert.Same(app.Urls, urls);
206Assert.Same(app.Urls, urls);
300Assert.Same(hostedService, startOrder[0]);
301Assert.Same(server, startOrder[1]);
1213Assert.Same(builder.Configuration, app.Configuration);
1256Assert.Same(builder.Configuration, app.Configuration);
1282Assert.Same(builder.Configuration, app.Configuration);
1390Assert.Same(config, builder.Configuration);
1394Assert.Same(app.Configuration, builder.Configuration);
1407Assert.Same(config, builder.Configuration);
1411Assert.Same(app.Configuration, builder.Configuration);
2522Assert.Same(builder.Host.Properties, iHostApplicationBuilder.Properties);
2523Assert.Same(builder.Configuration, iHostApplicationBuilder.Configuration);
2524Assert.Same(builder.Logging, iHostApplicationBuilder.Logging);
2525Assert.Same(builder.Services, iHostApplicationBuilder.Services);
Microsoft.AspNetCore.WebSockets.Tests (1)
Microsoft.Build.Engine.OM.UnitTests (36)
ObjectModelRemoting\Helpers\ViewValidation.evaluation.cs (10)
35Assert.Same(result, this.GetSingleItemWithVerify(where, result.EvaluatedInclude));
86Assert.Same(added, toAdd.GetProperty(name));
123Assert.Same(context.Pair.View, view.Project);
124Assert.Same(context.Pair.Real, real.Project);
156Assert.Same(context?.Pair.View, view.Project);
157Assert.Same(context?.Pair.Real, real.Project);
200Assert.Same(context?.Pair.View, view.Project);
201Assert.Same(context?.Pair.Real, real.Project);
250Assert.Same(context.Pair.View, view.Project);
251Assert.Same(context.Pair.Real, real.Project);
Microsoft.Build.Engine.UnitTests (24)
Instance\HostServices_Tests.cs (4)
49Assert.Same(hostObject, hostServices.GetHostObject("foo.proj", "target", "task"));
50Assert.Same(hostObject2, hostServices.GetHostObject("foo.proj", "target2", "task"));
51Assert.Same(hostObject3, hostServices.GetHostObject("foo.proj", "target", "task2"));
102Assert.Same(hostObject, hostServices.GetHostObject("project", "target", "task"));
Microsoft.DotNet.Open.Api.Tools.Tests (1)
Microsoft.DotNet.XUnitAssert.Tests (27)
ExceptionAssertsTests.cs (19)
61 Assert.Same(thrown, ex.InnerException);
79 Assert.Same(thrown, ex.InnerException);
144 Assert.Same(thrown, ex.InnerException);
162 Assert.Same(thrown, ex.InnerException);
217 Assert.Same(thrown, ex.InnerException);
235 Assert.Same(thrown, ex.InnerException);
297 Assert.Same(thrown, ex.InnerException);
315 Assert.Same(thrown, ex.InnerException);
386 Assert.Same(thrown, ex.InnerException);
404 Assert.Same(thrown, ex.InnerException);
472 Assert.Same(thrown, ex.InnerException);
490 Assert.Same(thrown, ex.InnerException);
544 Assert.Same(thrown, ex.InnerException);
614 Assert.Same(thrown, ex.InnerException);
674 Assert.Same(thrown, ex.InnerException);
733 Assert.Same(thrown, ex.InnerException);
751 Assert.Same(thrown, ex.InnerException);
819 Assert.Same(thrown, ex.InnerException);
837 Assert.Same(thrown, ex.InnerException);
Microsoft.Extensions.Caching.Hybrid.Tests (3)
Microsoft.Extensions.Caching.SqlServer.Tests (1)
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (1)
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (4)
Microsoft.Extensions.FileProviders.Embedded.Tests (2)
Microsoft.Extensions.Http.Polly.Tests (25)
DependencyInjection\PollyHttpClientBuilderExtensionsTest.cs (11)
456Assert.Same(registry, services.GetService<IConcurrentPolicyRegistry<string>>());
457Assert.Same(registry, services.GetService<IReadOnlyPolicyRegistry<string>>());
472Assert.Same(registry, services.GetService<IConcurrentPolicyRegistry<string>>());
473Assert.Same(registry, services.GetService<IPolicyRegistry<string>>());
474Assert.Same(registry, services.GetService<IReadOnlyPolicyRegistry<string>>());
493Assert.Same(registry, services.GetService<IConcurrentPolicyRegistry<string>>());
494Assert.Same(registry, services.GetService<IReadOnlyPolicyRegistry<string>>());
512Assert.Same(existingRegistry, registry);
514Assert.Same(existingRegistry, services.GetService<IPolicyRegistry<string>>());
515Assert.Same(existingRegistry, services.GetService<IConcurrentPolicyRegistry<string>>());
516Assert.Same(existingRegistry, services.GetService<IReadOnlyPolicyRegistry<string>>());
PolicyHttpMessageHandlerTest.cs (12)
53Assert.Same(expected, response);
98Assert.Same(expected, response);
99Assert.Same(expectedRequest, policySelectorRequest);
146Assert.Same(expected, response);
198Assert.Same(expected, response);
268Assert.Same(expected, response);
284Assert.Same(context, req.GetPolicyExecutionContext());
296Assert.Same(expected, response);
314Assert.Same(c, req.GetPolicyExecutionContext());
325Assert.Same(expectedContext, context);
326Assert.Same(expectedContext, request.GetPolicyExecutionContext()); // We don't clean up the context if the caller or earlier delegating handlers had supplied it.
327Assert.Same(expected, response);
Microsoft.Extensions.Localization.Tests (2)
Microsoft.Extensions.ObjectPool.Tests (5)
Microsoft.Extensions.WebEncoders.Tests (9)
Microsoft.JSInterop.Tests (18)
Microsoft.Net.Http.Headers.Tests (19)
Mvc.Analyzers.Test (7)
Mvc.Api.Analyzers.Test (7)
System.Xaml.Tests (10)