12952 references to Same
Aspire.Azure.AI.OpenAI.Tests (1)
Aspire.Components.Common.Tests (3)
Aspire.Dashboard.Tests (2)
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.AsyncState.Tests (2)
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);
1780Assert.Same(originalComponentInstance, newComponentInstance);
1924Assert.Same(capturedInstance1, capturedInstance2);
1937Assert.Same(capturedInstance1, frame.Component);
2060Assert.Same(oldComponents[0], newComponents[1]);
2061Assert.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 (45)
KeyManagement\DefaultKeyResolverTests.cs (11)
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);
273Assert.Same(key1, 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);
718Assert.Same(expectedKeyRing, foregroundRetVal);
742Assert.Same(originalKeyRing, keyRingProvider.GetCurrentKeyRingCore(originalKeyRingTime));
745Assert.Same(originalKeyRing, keyRingProvider.GetCurrentKeyRingCore(throwKeyRingTime)); // Seeing the exception didn't clobber the cache
746Assert.Same(updatedKeyRing, keyRingProvider.GetCurrentKeyRingCore(updatedKeyRingTime, forceRefresh: true)); // forceRefresh to wait for updated value
837Assert.Same(expectedKeyRing1, keyRingProvider.GetCurrentKeyRingCore(time1)); // Ensure the cache is populated
873Assert.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.HeaderParsing.Tests (2)
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),
2888Assert.Same(options.EndpointBuilder.Metadata, result.EndpointMetadata);
3067Assert.Same(initialRequestDelegate, result.RequestDelegate);
3083Assert.Same(options.EndpointBuilder.RequestDelegate, result.RequestDelegate);
3084Assert.Same(options.EndpointBuilder.Metadata, result.EndpointMetadata);
3100Assert.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);
1205Assert.Same(formatters[0], apiResponseFormat.Formatter);
1308Assert.Same(formatters[1], format.Formatter);
1327Assert.Same(BindingSource.ModelBinding, parameter.Source);
1331Assert.Same(BindingSource.ModelBinding, parameter.Source);
1335Assert.Same(BindingSource.ModelBinding, parameter.Source);
1352Assert.Same(BindingSource.ModelBinding, parameter.Source);
1372Assert.Same(BindingSource.Path, parameter.Source);
1389Assert.Same(BindingSource.Query, parameter.Source);
1406Assert.Same(BindingSource.Body, parameter.Source);
1425Assert.Same(BindingSource.Form, parameter.Source);
1429Assert.Same(BindingSource.Form, parameter.Source);
1433Assert.Same(BindingSource.Form, parameter.Source);
1455Assert.Same(BindingSource.FormFile, parameter.Source);
1476Assert.Same(BindingSource.Header, parameter.Source);
1508Assert.Same(BindingSource.Custom, parameter.Source);
1527Assert.Same(BindingSource.ModelBinding, parameter.Source);
1531Assert.Same(BindingSource.ModelBinding, parameter.Source);
1535Assert.Same(BindingSource.ModelBinding, parameter.Source);
1554Assert.Same(BindingSource.Path, id.Source);
1558Assert.Same(BindingSource.Body, product.Source);
1562Assert.Same(BindingSource.Header, userId.Source);
1566Assert.Same(BindingSource.ModelBinding, comments.Source);
1585Assert.Same(BindingSource.Query, id.Source);
1604Assert.Same(BindingSource.Query, id.Source);
1623Assert.Same(BindingSource.Query, id.Source);
1642Assert.Same(BindingSource.Query, id.Source);
1661Assert.Same(BindingSource.Query, id.Source);
1680Assert.Same(BindingSource.Query, id.Source);
1699Assert.Same(BindingSource.Query, id.Source);
1718Assert.Same(BindingSource.Query, id.Source);
1722Assert.Same(BindingSource.Query, product.Source);
1742Assert.Same(BindingSource.Path, id.Source);
1746Assert.Same(BindingSource.Body, product.Source);
1750Assert.Same(BindingSource.Header, userId.Source);
1754Assert.Same(BindingSource.Query, comments.Source);
1773Assert.Same(BindingSource.Path, id.Source);
1777Assert.Same(BindingSource.ModelBinding, quantity.Source);
1781Assert.Same(BindingSource.ModelBinding, productId.Source);
1785Assert.Same(BindingSource.Query, price.Source);
1805Assert.Same(BindingSource.Path, id.Source);
1809Assert.Same(BindingSource.Query, quantity.Source);
1813Assert.Same(BindingSource.Query, productId.Source);
1817Assert.Same(BindingSource.Query, productPrice.Source);
1840Assert.Same(BindingSource.Query, id.Source);
1844Assert.Same(BindingSource.Query, name.Source);
1871Assert.Same(BindingSource.Query, id.Source);
1875Assert.Same(BindingSource.Query, name.Source);
1894Assert.Same(BindingSource.Query, c.Source);
1912Assert.Same(BindingSource.Query, products.Source);
1931Assert.Same(BindingSource.ModelBinding, items.Source);
1953Assert.Same(BindingSource.Query, id.Source);
1957Assert.Same(BindingSource.Query, name.Source);
1975Assert.Same(BindingSource.Header, name.Source);
1979Assert.Same(BindingSource.Form, id.Source);
1998Assert.Same(BindingSource.Query, name.Source);
2002Assert.Same(BindingSource.Path, id.Source);
2006Assert.Same(BindingSource.Body, product.Source);
2010Assert.Same(BindingSource.Header, userId.Source);
2014Assert.Same(BindingSource.ModelBinding, comments.Source);
2163Assert.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 (3)
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)
821Assert.Same(route, result.Router);
844Assert.Same(route, result.Router);
876Assert.Same(route, result.Router);
908Assert.Same(route, result.Router);
943Assert.Same(route, result.Router);
989Assert.Same(route, result.Router);
1026Assert.Same(route, result.Router);
1056Assert.Same(route, result.Router);
1086Assert.Same(route, result.Router);
1144Assert.Same(route, result.Router);
1230Assert.Same(route, result.Router);
1250Assert.Same(route, pathData.Router);
1270Assert.Same(route, pathData.Router);
1307Assert.Same(route, pathData.Router);
1327Assert.Same(route, pathData.Router);
1347Assert.Same(route, pathData.Router);
1372Assert.Same(route, pathData.Router);
1392Assert.Same(route, pathData.Router);
1413Assert.Same(route, pathData.Router);
1451Assert.Same(route, pathData.Router);
1471Assert.Same(route, pathData.Router);
1493Assert.Same(route, pathData.Router);
1518Assert.Same(route, pathData.Router);
1543Assert.Same(route, pathData.Router);
1570Assert.Same(route, pathData.Router);
1597Assert.Same(route, pathData.Router);
1691Assert.Same(route, pathData.Router);
1914Assert.Same(route, pathData.Router);
1936Assert.Same(route, pathData.Router);
1958Assert.Same(route, pathData.Router);
1980Assert.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)
69Assert.Same(_collection[type], feature.Value);
182Assert.Same(_collection.Get<IHttpRequestFeature>(), _collection[typeof(IHttpRequestFeature)]);
183Assert.Same(_collection.Get<IHttpRequestBodyDetectionFeature>(), _collection[typeof(IHttpRequestBodyDetectionFeature)]);
184Assert.Same(_collection.Get<IHttpResponseFeature>(), _collection[typeof(IHttpResponseFeature)]);
185Assert.Same(_collection.Get<IHttpResponseBodyFeature>(), _collection[typeof(IHttpResponseBodyFeature)]);
186Assert.Same(_collection.Get<IRequestBodyPipeFeature>(), _collection[typeof(IRequestBodyPipeFeature)]);
187Assert.Same(_collection.Get<IHttpRequestIdentifierFeature>(), _collection[typeof(IHttpRequestIdentifierFeature)]);
188Assert.Same(_collection.Get<IHttpRequestLifetimeFeature>(), _collection[typeof(IHttpRequestLifetimeFeature)]);
189Assert.Same(_collection.Get<IHttpConnectionFeature>(), _collection[typeof(IHttpConnectionFeature)]);
190Assert.Same(_collection.Get<IHttpMaxRequestBodySizeFeature>(), _collection[typeof(IHttpMaxRequestBodySizeFeature)]);
191Assert.Same(_collection.Get<IHttpMinRequestBodyDataRateFeature>(), _collection[typeof(IHttpMinRequestBodyDataRateFeature)]);
192Assert.Same(_collection.Get<IHttpMinResponseDataRateFeature>(), _collection[typeof(IHttpMinResponseDataRateFeature)]);
193Assert.Same(_collection.Get<IHttpBodyControlFeature>(), _collection[typeof(IHttpBodyControlFeature)]);
232Assert.Same(featureLookup, featureIter.Value);
233Assert.Same(featureLookup, _collection);
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 (15)
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.CodeAnalysis.CSharp.CommandLine.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (8)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (32)
CodeGen\CodeGenDeconstructTests.cs (9)
3582Assert.Same(symbol, model.GetDeclaredSymbol((SyntaxNode)decl));
3583Assert.Same(symbol, model.LookupSymbols(decl.SpanStart, name: decl.Identifier.ValueText).Single());
3602Assert.Same(symbol, model.GetSymbolInfo(reference).Symbol);
3603Assert.Same(symbol, model.LookupSymbols(reference.SpanStart, name: decl.Identifier.ValueText).Single());
3614Assert.Same(field, model.GetDeclaredSymbol((SyntaxNode)decl));
3615Assert.Same(field, model.LookupSymbols(decl.SpanStart, name: decl.Identifier.ValueText).Single());
3621Assert.Same(field, model.GetSymbolInfo(reference).Symbol);
3622Assert.Same(field, model.LookupSymbols(reference.SpanStart, name: decl.Identifier.ValueText).Single());
6054Assert.Same(symbol.Type, symbolClone.Type); // original symbol for System.Int32 has identity.
CodeGen\CodeGenTupleTest.cs (21)
3699Assert.Same(yType.TupleElements[1], yType.TupleElements[1].CorrespondingTupleField);
4507Assert.Same(vt2, unnamedTuple.ConstructedFrom);
4518Assert.Same(vt2, namedTuple.ConstructedFrom);
4519Assert.Same(vt2, namedTuple.OriginalDefinition);
5856Assert.Same(vt1, ((Symbols.PublicModel.NonErrorNamedTypeSymbol)tupleWithoutNames).UnderlyingNamedTypeSymbol);
5875Assert.Same(vt2, ((Symbols.PublicModel.NamedTypeSymbol)tupleWithoutNames).UnderlyingNamedTypeSymbol);
6058Assert.Same(vt8, ((Symbols.PublicModel.NamedTypeSymbol)tuple8WithoutNames).UnderlyingNamespaceOrTypeSymbol);
6193Assert.Same(vt2WithErrorType, tupleWithoutNames);
6228Assert.Same(comp.GlobalNamespace, ns.ContainingSymbol);
6229Assert.Same(comp.GlobalNamespace.ContainingAssembly, ns.ContainingAssembly);
6230Assert.Same(comp.GlobalNamespace.ContainingModule, ns.ContainingModule);
6236Assert.Same(comp.Assembly.GlobalNamespace, ns.ContainingSymbol);
6237Assert.Same(comp.Assembly.GlobalNamespace.ContainingAssembly, ns.ContainingAssembly);
6238Assert.Same(comp.Assembly.GlobalNamespace.ContainingModule, ns.ContainingModule);
6244Assert.Same(comp.SourceModule.GlobalNamespace, ns.ContainingSymbol);
6245Assert.Same(comp.SourceModule.GlobalNamespace.ContainingAssembly, ns.ContainingAssembly);
6246Assert.Same(comp.SourceModule.GlobalNamespace.ContainingModule, ns.ContainingModule);
11159Assert.Same(tupleType, m1Tuple.ConstructedFrom);
11161Assert.Same(tupleType, m1Tuple.OriginalDefinition);
11164Assert.Same(m1Tuple.ContainingSymbol, m1Tuple.ContainingSymbol);
11424Assert.Same(m1Tuple.OriginalDefinition, m1Tuple.ConstructedFrom);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (66)
Semantics\OutVarTests.cs (19)
971Assert.Same(symbol, model.GetDeclaredSymbol((SyntaxNode)variableDeclaratorSyntax));
980Assert.Same(symbol, other);
991Assert.Same(symbol, model.GetSymbolInfo(reference).Symbol);
992Assert.Same(symbol, model.LookupSymbols(reference.SpanStart, name: decl.Identifier().ValueText).Single());
1144Assert.Same(symbol, model.GetDeclaredSymbol((SyntaxNode)variableDesignationSyntax));
1166Assert.Same(symbol, model.LookupSymbols(reference.SpanStart, name: reference.Identifier.ValueText).Single());
1197Assert.Same(symbol, model.LookupSymbols(reference.SpanStart, name: reference.Identifier.ValueText).Single());
32688Assert.Same(symbol, model.GetDeclaredSymbol((SyntaxNode)variableDesignationSyntax));
32700Assert.Same(symbol, symbols.Single());
32729Assert.Same(symbol, referenceInfo.Symbol);
32730Assert.Same(symbol, symbols.Single());
35975Assert.Same(initializerOperation.Parent.Parent, blockBodyOperation.Parent);
35999Assert.Same(blockBodyOperation.Parent, model.GetOperation(expressionBodySyntax).Parent);
36003Assert.Same(blockBodyOperation.Parent, model.GetOperation(declarationSyntax));
36120Assert.Same(expressionBodyOperation.Parent, blockBodyOperation.Parent);
36128Assert.Same(expressionBodyOperation.Parent, model.GetOperation(declarationSyntax));
36368Assert.Same(symbolInfo.Symbol, speculativeModel.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Where(l => l.Identifier.ValueText == "M2").Single()));
36450Assert.Same(symbolInfo.Symbol, speculativeModel.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Where(l => l.Identifier.ValueText == "M2").Single()));
36523Assert.Same(symbolInfo.Symbol, speculativeModel.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Where(l => l.Identifier.ValueText == "M2").Single()));
Semantics\PatternMatchingTestBase.cs (13)
85Assert.Same(symbol, model.GetDeclaredSymbol((SyntaxNode)designation));
94Assert.Same(symbol, other);
125Assert.Same(symbol, model.GetSymbolInfo(reference).Symbol);
126Assert.Same(symbol, model.LookupSymbols(reference.SpanStart, name: designation.Identifier.ValueText).Single());
146Assert.Same(symbol, model.GetDeclaredSymbol((SyntaxNode)designation));
172Assert.Same(symbol, model.GetDeclaredSymbol((SyntaxNode)declarator));
186Assert.Same(symbol, model.GetDeclaredSymbol((SyntaxNode)designation));
197Assert.Same(symbol, model.LookupSymbols(reference.SpanStart, name: reference.Identifier.ValueText).Single());
211Assert.Same(symbol, other);
248Assert.Same(symbol, model.GetDeclaredSymbol((SyntaxNode)designation));
260Assert.Same(symbol, symbols.Single());
313Assert.Same(symbol, referenceInfo.Symbol);
314Assert.Same(symbol, symbols.Single());
Semantics\PrimaryConstructorTests.cs (18)
1013Assert.Same(symbol, model.LookupSymbols(x.SpanStart, name: "X").Single());
1080Assert.Same(symbol.ContainingSymbol, model.GetEnclosingSymbol(x.SpanStart));
1129Assert.Same(operation.Parent.Parent, model.GetOperation(baseWithargs.Parent.Parent));
1307Assert.Same(symbol.ContainingSymbol, model.GetEnclosingSymbol(x.SpanStart));
1320Assert.Same(symbol.ContainingSymbol, model.GetEnclosingSymbol(x.SpanStart));
1536Assert.Same(symbol.ContainingSymbol, model.GetEnclosingSymbol(x.SpanStart));
1625Assert.Same(symbol.ContainingSymbol, model.GetEnclosingSymbol(x.SpanStart));
1974Assert.Same(symbol.ContainingSymbol, model.GetEnclosingSymbol(x.SpanStart));
3802Assert.Same(literal.SyntaxTree, context.ContainingSymbol.DeclaringSyntaxReferences.Single().SyntaxTree);
3828Assert.Same(equalsValue.SyntaxTree, context.ContainingSymbol.DeclaringSyntaxReferences.Single().SyntaxTree);
3846Assert.Same(initializer.SyntaxTree, context.ContainingSymbol.DeclaringSyntaxReferences.Single().SyntaxTree);
3877Assert.Same(baseType.SyntaxTree, context.ContainingSymbol.DeclaringSyntaxReferences.Single().SyntaxTree);
3904Assert.Same(@class.SyntaxTree, context.ContainingSymbol.DeclaringSyntaxReferences.Single().SyntaxTree);
5291Assert.Same(literal.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree);
5309Assert.Same(equalsValue.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree);
5327Assert.Same(initializer.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree);
5356Assert.Same(record.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree);
7833Assert.Same(symbol, model.LookupSymbols(p1.SpanStart, name: "p1").Single());
Semantics\RecordTests.cs (12)
21152Assert.Same(symbol.ContainingSymbol, model.GetEnclosingSymbol(x.SpanStart));
21202Assert.Same(operation.Parent.Parent, model.GetOperation(baseWithargs.Parent.Parent));
21381Assert.Same(symbol.ContainingSymbol, model.GetEnclosingSymbol(x.SpanStart));
21394Assert.Same(symbol.ContainingSymbol, model.GetEnclosingSymbol(x.SpanStart));
21610Assert.Same(symbol.ContainingSymbol, model.GetEnclosingSymbol(x.SpanStart));
21699Assert.Same(symbol.ContainingSymbol, model.GetEnclosingSymbol(x.SpanStart));
22086Assert.Same(symbol.ContainingSymbol, model.GetEnclosingSymbol(x.SpanStart));
26242Assert.Same(literal.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree);
26268Assert.Same(equalsValue.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree);
26286Assert.Same(initializer.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree);
26317Assert.Same(baseType.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree);
26340Assert.Same(record.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree);
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (22)
IOperation\IOperationTests_IAnonymousFunctionExpression.cs (10)
418Assert.Same(variableTreeLambdaOperation, lambdaOperation);
426Assert.Same(variableTreeLambdaOperation, variableTreeLambdaOperationSecondRequest);
427Assert.Same(lambdaOperation, lambdaOperationSecondRequest);
861Assert.Same(graphM, graphD1.Parent);
863Assert.Same(graphD1, graphD1_FromExtension);
868Assert.Same(graphD1, graphD2.Parent);
919Assert.Same(graphM, graphD1.Parent);
922Assert.Same(graphM, graphD2.Parent);
925Assert.Same(graphD1, graphD1_FromExtension);
929Assert.Same(graphD1, graphD1_FromExtension);
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (5)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (178)
Semantics\NativeIntegerTests.cs (11)
240Assert.Same(type, type.ConstructedFrom);
255Assert.Same(underlyingType.ContainingSymbol, nativeIntegerType.ContainingSymbol);
256Assert.Same(underlyingType.Name, nativeIntegerType.Name);
263Assert.Same(underlyingType, nativeIntegerType.NativeIntegerUnderlyingType);
354Assert.Same(underlyingType.ContainingSymbol, nativeIntegerType.ContainingSymbol);
355Assert.Same(underlyingType.Name, nativeIntegerType.Name);
538Assert.Same(type, member.ContainingSymbol);
539Assert.Same(type, member.ContainingType);
1627Assert.Same(underlyingType, ((INamedTypeSymbol)type.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.None)).NativeIntegerUnderlyingType);
1628Assert.Same(underlyingType, ((INamedTypeSymbol)type.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.Annotated)).NativeIntegerUnderlyingType);
1629Assert.Same(underlyingType, ((INamedTypeSymbol)type.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.NotAnnotated)).NativeIntegerUnderlyingType);
Semantics\TopLevelStatementsTests.cs (131)
49Assert.Same(entryPoint, comp.GetEntryPoint(default));
199Assert.Same(refSymbol, model1.LookupSymbols(localRef.SpanStart, name: refSymbol.Name).Single());
237Assert.Same(declSymbol.ContainingSymbol, model1.GetDeclaredSymbol(unit1));
238Assert.Same(declSymbol.ContainingSymbol, model1.GetDeclaredSymbol((SyntaxNode)unit1));
239Assert.Same(refSymbol, declSymbol);
242Assert.Same(declSymbol, model1.LookupSymbols(localDecl.SpanStart, name: declSymbol.Name).Single());
361Assert.Same(declSymbol.ContainingSymbol, declMethod);
365Assert.Same(declSymbol, model2.LookupSymbols(localDecl.SpanStart, name: declSymbol.Name).Single());
486Assert.Same(declSymbol, model1.LookupSymbols(localDecl.SpanStart, name: declSymbol.Name).Single());
495Assert.Same(declSymbol, model1.LookupSymbols(localFuncRef.SpanStart, name: declSymbol.Name).Single());
538Assert.Same(declSymbol, model1.LookupSymbols(localDecl.SpanStart, name: declSymbol.Name).Single());
546Assert.Same(declSymbol, refSymbol);
549Assert.Same(declSymbol, model1.LookupSymbols(localRef.SpanStart, name: declSymbol.Name).Single());
578Assert.Same(declSymbol, model1.LookupSymbols(localDecl.SpanStart, name: declSymbol.Name).Single());
587Assert.Same(declSymbol, model1.LookupSymbols(localFuncRef.SpanStart, name: declSymbol.Name).Single());
593Assert.Same(declSymbol, refSymbol);
596Assert.Same(refSymbol, model1.LookupSymbols(localRef.SpanStart, name: refSymbol.Name).Single());
702Assert.Same(local, model.GetSymbolInfo(reference).Symbol);
873Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single()).Symbol);
879Assert.Same(symbol2, model2.GetSymbolInfo(tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Single()).Symbol);
987Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").First()).Symbol);
991Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "x").Skip(1).Single()).Symbol);
1042Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "args").Single()).Symbol);
1697Assert.Same(declSymbol, model1.LookupSymbols(localDecl.SpanStart, name: "Test").Single());
1702Assert.Same(testType, model1.LookupNamespacesAndTypes(localDecl.SpanStart, name: "Test").Single());
1710Assert.Same(declSymbol, model1.GetSymbolInfo(nameRef).Symbol);
1719Assert.Same(testType, model.GetSymbolInfo(nameRef).Symbol);
1730Assert.Same(testType, model.LookupSymbols(nameRef.SpanStart, name: "Test").Single());
1734Assert.Same(testType, model.GetSymbolInfo(nameRef).Symbol);
1740Assert.Same(declSymbol, model.GetSymbolInfo(nameRef).Symbol);
1745Assert.Same(testType, model.GetSymbolInfo(nameRef).Symbol);
1750Assert.Same(testType, model.GetSymbolInfo(nameRef).Symbol);
1756Assert.Same(declSymbol, model.GetSymbolInfo(nameRef).Symbol);
1767Assert.Same(declSymbol, model.LookupSymbols(nameRef.SpanStart, name: "Test").Single());
1772Assert.Same(testType, model.LookupNamespacesAndTypes(nameRef.SpanStart, name: "Test").Single());
1870Assert.Same(declSymbol, model1.LookupSymbols(localDecl.SpanStart, name: "Test").Single());
1875Assert.Same(testType, model1.LookupNamespacesAndTypes(localDecl.SpanStart, name: "Test").Single());
1887Assert.Same(testType, model2.GetSymbolInfo(nameRef).Symbol);
1898Assert.Same(testType, model2.LookupSymbols(nameRef.SpanStart, name: "Test").Single());
1902Assert.Same(testType, model2.GetSymbolInfo(nameRef).Symbol);
1908Assert.Same(declSymbol, model2.GetSymbolInfo(nameRef).Symbol);
1913Assert.Same(testType, model2.GetSymbolInfo(nameRef).Symbol);
1918Assert.Same(testType, model2.GetSymbolInfo(nameRef).Symbol);
1924Assert.Same(declSymbol, model2.GetSymbolInfo(nameRef).Symbol);
1935Assert.Same(declSymbol, model2.LookupSymbols(nameRef.SpanStart, name: "Test").Single());
1940Assert.Same(testType, model2.LookupNamespacesAndTypes(nameRef.SpanStart, name: "Test").Single());
2093Assert.Same(declSymbol, model1.LookupSymbols(localDecl.SpanStart, name: "Test").Single());
2098Assert.Same(testType, model1.LookupNamespacesAndTypes(localDecl.SpanStart, name: "Test").Single());
2105Assert.Same(testType, model1.GetSymbolInfo(nameRef).Symbol);
2113Assert.Same(testType, model1.LookupSymbols(nameRef.SpanStart, name: "Test").Single());
2117Assert.Same(testType, model1.GetSymbolInfo(nameRef).Symbol);
2122Assert.Same(declSymbol, model1.GetSymbolInfo(nameRef).Symbol);
2127Assert.Same(testType, model1.GetSymbolInfo(nameRef).Symbol);
2132Assert.Same(testType, model1.GetSymbolInfo(nameRef).Symbol);
2137Assert.Same(declSymbol, model1.GetSymbolInfo(nameRef).Symbol);
2148Assert.Same(declSymbol, model2.LookupSymbols(nameRef.SpanStart, name: "Test").Single());
2153Assert.Same(testType, model2.LookupNamespacesAndTypes(nameRef.SpanStart, name: "Test").Single());
2257Assert.Same(declSymbol, model1.LookupSymbols(localDecl.SpanStart, name: "Test").Single());
2262Assert.Same(testType, model1.LookupNamespacesAndTypes(localDecl.SpanStart, name: "Test").Single());
2271Assert.Same(testType, model2.GetSymbolInfo(nameRef).Symbol);
2279Assert.Same(testType, model2.LookupSymbols(nameRef.SpanStart, name: "Test").Single());
2283Assert.Same(testType, model2.GetSymbolInfo(nameRef).Symbol);
2288Assert.Same(declSymbol, model2.GetSymbolInfo(nameRef).Symbol);
2293Assert.Same(testType, model2.GetSymbolInfo(nameRef).Symbol);
2298Assert.Same(testType, model2.GetSymbolInfo(nameRef).Symbol);
2303Assert.Same(declSymbol, model2.GetSymbolInfo(nameRef).Symbol);
2314Assert.Same(declSymbol, model2.LookupSymbols(nameRef.SpanStart, name: "Test").Single());
2319Assert.Same(testType, model2.LookupNamespacesAndTypes(nameRef.SpanStart, name: "Test").Single());
2436Assert.Same(testType, model1.LookupSymbols(labelDecl.SpanStart, name: "Test").Single());
2441Assert.Same(testType, model1.LookupNamespacesAndTypes(labelDecl.SpanStart, name: "Test").Single());
2443Assert.Same(declSymbol, model1.LookupLabels(labelDecl.SpanStart).Single());
2444Assert.Same(declSymbol, model1.LookupLabels(labelDecl.SpanStart, name: "Test").Single());
2451Assert.Same(testType, model1.GetSymbolInfo(nameRef).Symbol);
2459Assert.Same(testType, model1.LookupSymbols(nameRef.SpanStart, name: "Test").Single());
2465Assert.Same(declSymbol, model1.GetSymbolInfo(nameRef).Symbol);
2474Assert.Same(testType, model1.LookupSymbols(nameRef.SpanStart, name: "Test").Single());
2475Assert.Same(declSymbol, model1.LookupLabels(nameRef.SpanStart).Single());
2476Assert.Same(declSymbol, model1.LookupLabels(nameRef.SpanStart, name: "Test").Single());
2480Assert.Same(testType, model1.GetSymbolInfo(nameRef).Symbol);
2490Assert.Same(testType, model1.GetSymbolInfo(nameRef).Symbol);
2495Assert.Same(testType, model1.GetSymbolInfo(nameRef).Symbol);
2511Assert.Same(testType, model2.LookupSymbols(nameRef.SpanStart, name: "Test").Single());
2516Assert.Same(testType, model2.LookupNamespacesAndTypes(nameRef.SpanStart, name: "Test").Single());
3946Assert.Same(testType, model.GetSymbolInfo(nameRef).Symbol);
3953Assert.Same(testType, model.LookupSymbols(nameRef.SpanStart, name: "args").Single());
3967Assert.Same(parameter, model.LookupSymbols(nameRef.SpanStart, name: "args").Single());
3972Assert.Same(testType, model.LookupNamespacesAndTypes(nameRef.SpanStart, name: "args").Single());
3976Assert.Same(testType, model.GetSymbolInfo(nameRef).Symbol);
3981Assert.Same(testType, model.GetSymbolInfo(nameRef).Symbol);
3986Assert.Same(testType, model.GetSymbolInfo(nameRef).Symbol);
3991Assert.Same(testType, model.GetSymbolInfo(nameRef).Symbol);
3996Assert.Same(testType, model.GetSymbolInfo(nameRef).Symbol);
4007Assert.Same(testType, model.LookupSymbols(nameRef.SpanStart, name: "args").Single());
4012Assert.Same(testType, model.LookupNamespacesAndTypes(nameRef.SpanStart, name: "args").Single());
4095Assert.Same(testType, model.GetSymbolInfo(nameRef).Symbol);
4102Assert.Same(testType, model.LookupSymbols(nameRef.SpanStart, name: "args").Single());
4106Assert.Same(testType, model.GetSymbolInfo(nameRef).Symbol);
4111Assert.Same(testType, model.GetSymbolInfo(nameRef).Symbol);
4116Assert.Same(testType, model.GetSymbolInfo(nameRef).Symbol);
4121Assert.Same(testType, model.GetSymbolInfo(nameRef).Symbol);
4126Assert.Same(testType, model.GetSymbolInfo(nameRef).Symbol);
4137Assert.Same(testType, model.LookupSymbols(nameRef.SpanStart, name: "args").Single());
4142Assert.Same(testType, model.LookupNamespacesAndTypes(nameRef.SpanStart, name: "args").Single());
4219Assert.Same(local, model.GetSymbolInfo(reference).Symbol);
4512Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local1").Single()).Symbol);
4518Assert.Same(symbol2, model2.GetSymbolInfo(tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local1").Single()).Symbol);
4576Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local1").First()).Symbol);
4580Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "local1").Skip(1).Single()).Symbol);
4625Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "args").Single()).Symbol);
4897Assert.Same(label, model.GetSymbolInfo(reference).Symbol);
4952Assert.Same(symbol1, model1.GetSymbolInfo(tree1.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "label1").Single()).Symbol);
4959Assert.Same(symbol2, model2.GetSymbolInfo(tree2.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(id => id.Identifier.ValueText == "label1").Single()).Symbol);
4982Assert.Same(label, model.GetSymbolInfo(reference).Symbol);
6040Assert.Same(declSymbol, refSymbol);
6043Assert.Same(declSymbol, model1.LookupSymbols(localRef.SpanStart, name: declSymbol.Name).Single());
6282Assert.Same(x, semanticModel.LookupSymbols(localDecl.SpanStart, name: "x").Single());
6283Assert.Same(x, semanticModel.GetSymbolInfo(localRef).Symbol);
6284Assert.Same(x, semanticModel.LookupSymbols(localRef.SpanStart, name: "x").Single());
6327Assert.Same(xDecl, semanticModel1.LookupSymbols(localDecl.SpanStart, name: "x").Single());
6329Assert.Same(xRef, semanticModel1.LookupSymbols(localRef.SpanStart, name: "x").Single());
6332Assert.Same(xDecl, xRef);
6378Assert.Same(xDecl, semanticModel1.LookupSymbols(localDecl.SpanStart, name: "x").Single());
6384Assert.Same(xRef, semanticModel2.LookupSymbols(localRef.SpanStart, name: "x").Single());
6386Assert.Same(xDecl, xRef);
6455Assert.Same(globalStatement.SyntaxTree, context.ContainingSymbol.DeclaringSyntaxReferences.Single().SyntaxTree);
6721Assert.Same(context.ContainingSymbol.DeclaringSyntaxReferences.Single().SyntaxTree, context.Operation.Syntax.SyntaxTree);
6742Assert.Same(context.ContainingSymbol.DeclaringSyntaxReferences.Single().GetSyntax(), context.Operation.Syntax);
7420Assert.Same(context.ContainingSymbol.DeclaringSyntaxReferences.Single().GetSyntax(), context.Operation.Syntax);
9052Assert.Same(entryPoint, comp.GetEntryPoint(default));
9107Assert.Same(entryPoint, comp.GetEntryPoint(default));
9149Assert.Same(entryPoint, comp.GetEntryPoint(default));
SourceGeneration\GeneratorDriverTests.cs (11)
766Assert.Same(oldDriver, driver);
811Assert.Same(parseOptions, passedOptions);
1148Assert.Same(rootFromGetRoot, rootFromTryGetRoot);
4253Assert.Same(generator, sourceGenerator);
4264Assert.Same(generator.GetType(), type);
4275Assert.Same(generator, incrementalGenerator);
4286Assert.Same(generator.GetType(), type);
4500Assert.Same(newParseOptions, result.GeneratedTrees[0].Options);
4501Assert.Same(parseOptions, result.GeneratedTrees[1].Options);
4508Assert.Same(newParseOptions, result.GeneratedTrees[0].Options);
4509Assert.Same(newParseOptions, result.GeneratedTrees[1].Options);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (184)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (14)
390Assert.Same(eventSymbol.AddMethod, model.GetDeclaredSymbol(accessorList[0]));
391Assert.Same(eventSymbol.RemoveMethod, model.GetDeclaredSymbol(accessorList[1]));
2877Assert.Same(explicitPropertySymbol.GetMethod, explicitPropertyGetterSymbol);
2887Assert.Same(explicitPropertySymbol.SetMethod, explicitPropertySetterSymbol);
2998Assert.Same(mems2[0], dsymc1);
2999Assert.Same(mems2[1], dsymc2);
3000Assert.Same(mems2[2], dsymc3);
3757Assert.Same(declSymbol, memSymbol);
3878Assert.Same(alias1, alias2);
3938Assert.Same(alias1, alias1b);
3942Assert.Same(alias2, alias2b);
5225Assert.Same(symbol1.ContainingSymbol, symbol2.ContainingSymbol);
5246Assert.Same(symbol1.ContainingSymbol, symbol2.ContainingSymbol);
5267Assert.Same(symbol1.ContainingSymbol, symbol2.ContainingSymbol);
Symbols\CompilationCreationTests.cs (37)
151Assert.Same(asm2[0], asm1[0]);
155Assert.Same(((PEAssemblySymbol)asm2[1]).Assembly, ((PEAssemblySymbol)asm1[1]).Assembly);
181Assert.Same(asm3[0], asm1[0]);
186Assert.Same(((PEAssemblySymbol)asm3[1]).Assembly, ((PEAssemblySymbol)asm1[1]).Assembly);
239Assert.Same(asm3[0], asm1[0]);
245Assert.Same(((PEAssemblySymbol)asm4[1]).Assembly, ((PEAssemblySymbol)asm1[1]).Assembly);
268Assert.Same(((PEAssemblySymbol)asm4[3]).Assembly, ((PEAssemblySymbol)asm3[3]).Assembly);
333Assert.Same(asm5[0], asm1[0]);
342Assert.Same(asm6[0], asm1[0]);
343Assert.Same(asm6[1], asm1[1]);
353Assert.Same(asm7[0], asm1[0]);
354Assert.Same(asm7[1], asm1[1]);
360Assert.Same(((PEAssemblySymbol)asm7[2]).Assembly, ((PEAssemblySymbol)asm3[3]).Assembly);
382Assert.Same(((PEAssemblySymbol)asm7[3]).Assembly, ((PEAssemblySymbol)asm4[4]).Assembly);
422Assert.Same(asm8[0], asm1[0]);
423Assert.Same(asm8[0], asm1[0]);
424Assert.Same(asm8[2], asm7[1]);
426Assert.Same(asm8[3], asm7[2]);
428Assert.Same(asm8[1], asm7[3]);
436Assert.Same(asm9[0], asm1[0]);
448Assert.Same(asm10[0], asm1[0]);
449Assert.Same(asm10[1], asm4[1]);
450Assert.Same(asm10[2], asm4[2]);
451Assert.Same(asm10[3], asm4[3]);
452Assert.Same(asm10[4], asm4[4]);
462Assert.Same(asm2[0], asm1[0]);
466Assert.Same(((PEAssemblySymbol)asm2[1]).Assembly, ((PEAssemblySymbol)asm1[1]).Assembly);
483Assert.Same(asm3[0], asm1[0]);
488Assert.Same(((PEAssemblySymbol)asm3[1]).Assembly, ((PEAssemblySymbol)asm1[1]).Assembly);
531Assert.Same(asm3[0], asm1[0]);
537Assert.Same(((PEAssemblySymbol)asm4[1]).Assembly, ((PEAssemblySymbol)asm1[1]).Assembly);
560Assert.Same(((PEAssemblySymbol)asm4[3]).Assembly, ((PEAssemblySymbol)asm3[3]).Assembly);
619Assert.Same(asm7[0], asm1[0]);
620Assert.Same(asm7[1], asm1[1]);
626Assert.Same(((PEAssemblySymbol)asm7[2]).Assembly, ((PEAssemblySymbol)asm3[3]).Assembly);
648Assert.Same(((PEAssemblySymbol)asm7[3]).Assembly, ((PEAssemblySymbol)asm4[4]).Assembly);
2579Assert.Same(module1.Module, module2.Module);
Symbols\Metadata\PE\NoPia.cs (11)
103Assert.Same(pia1_1, assemblies2[2]);
158Assert.Same(localTypes2_3, missing.EmbeddingAssembly);
178Assert.Same(assemblies1[i], assemblies4[i]);
202Assert.Same(localTypes1_5, missing.EmbeddingAssembly);
306Assert.Same(localTypes1_8, ambiguous.EmbeddingAssembly);
444Assert.Same(pia1_1, assemblies2[0]);
476Assert.Same(pia1_1, assemblies3[0]);
505Assert.Same(assemblies1[i], assemblies4[i]);
530Assert.Same(localTypes1_5, missing.EmbeddingAssembly);
544Assert.Same(localTypes2_5, missing.EmbeddingAssembly);
642Assert.Same(localTypes1_8, ambiguous.EmbeddingAssembly);
Symbols\OverriddenOrHiddenMembersTests.cs (37)
264Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseInterface1Method.OverriddenOrHiddenMembers);
265Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseInterface1Property.OverriddenOrHiddenMembers);
267Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseInterface2Method.OverriddenOrHiddenMembers);
268Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseInterface2Property.OverriddenOrHiddenMembers);
270Assert.Same(OverriddenOrHiddenMembersResult.Empty, derivedInterface1MethodInt.OverriddenOrHiddenMembers);
272Assert.Same(OverriddenOrHiddenMembersResult.Empty, derivedInterface2MethodInt.OverriddenOrHiddenMembers);
357Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseInterface1MethodT.OverriddenOrHiddenMembers);
358Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseInterface1MethodInt.OverriddenOrHiddenMembers);
359Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseInterface1Property.OverriddenOrHiddenMembers);
361Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseInterface2MethodT.OverriddenOrHiddenMembers);
362Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseInterface2MethodInt.OverriddenOrHiddenMembers);
363Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseInterface2Property.OverriddenOrHiddenMembers);
365Assert.Same(OverriddenOrHiddenMembersResult.Empty, derivedInterface1Method.OverriddenOrHiddenMembers);
367Assert.Same(OverriddenOrHiddenMembersResult.Empty, derivedInterface2Method.OverriddenOrHiddenMembers);
427Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseClassMethod.OverriddenOrHiddenMembers);
428Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseClassProperty.OverriddenOrHiddenMembers);
430Assert.Same(OverriddenOrHiddenMembersResult.Empty, derivedClassMethodInt.OverriddenOrHiddenMembers);
479Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseClassMethodT.OverriddenOrHiddenMembers);
480Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseClassMethodInt.OverriddenOrHiddenMembers);
481Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseClassProperty.OverriddenOrHiddenMembers);
483Assert.Same(OverriddenOrHiddenMembersResult.Empty, derivedClassMethod.OverriddenOrHiddenMembers);
544Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseClassMethod.OverriddenOrHiddenMembers);
545Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseClassProperty.OverriddenOrHiddenMembers);
547Assert.Same(OverriddenOrHiddenMembersResult.Empty, derivedClassMethodInt.OverriddenOrHiddenMembers);
678Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseClassMethod1.OverriddenOrHiddenMembers);
679Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseClassMethod2.OverriddenOrHiddenMembers);
680Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseClassMethod3.OverriddenOrHiddenMembers);
681Assert.Same(OverriddenOrHiddenMembersResult.Empty, baseClassProperty.OverriddenOrHiddenMembers);
683Assert.Same(OverriddenOrHiddenMembersResult.Empty, derivedClassMethod.OverriddenOrHiddenMembers);
917Assert.Same(OverriddenOrHiddenMembersResult.Empty, classAMethod1.OverriddenOrHiddenMembers);
918Assert.Same(OverriddenOrHiddenMembersResult.Empty, classAMethod2.OverriddenOrHiddenMembers);
919Assert.Same(OverriddenOrHiddenMembersResult.Empty, classBMethod1.OverriddenOrHiddenMembers);
920Assert.Same(OverriddenOrHiddenMembersResult.Empty, classBMethod2.OverriddenOrHiddenMembers);
921Assert.Same(OverriddenOrHiddenMembersResult.Empty, classCMethod1.OverriddenOrHiddenMembers);
922Assert.Same(OverriddenOrHiddenMembersResult.Empty, classCMethod2.OverriddenOrHiddenMembers);
923Assert.Same(OverriddenOrHiddenMembersResult.Empty, classDMethod1.OverriddenOrHiddenMembers);
924Assert.Same(OverriddenOrHiddenMembersResult.Empty, classDMethod2.OverriddenOrHiddenMembers);
Symbols\Retargeting\NoPia.cs (15)
413Assert.Same(pia1_1, assemblies2[2]);
466Assert.Same(localTypes2_3, missing.EmbeddingAssembly);
485Assert.Same(assemblies1[i], assemblies4[i]);
508Assert.Same(localTypes1_5, missing.EmbeddingAssembly);
608Assert.Same(localTypes1_8, ambiguous.EmbeddingAssembly);
714Assert.Same(pia1_1, assemblies2[2]);
767Assert.Same(localTypes2_3, missing.EmbeddingAssembly);
786Assert.Same(assemblies1[i], assemblies4[i]);
809Assert.Same(localTypes1_5, missing.EmbeddingAssembly);
909Assert.Same(localTypes1_8, ambiguous.EmbeddingAssembly);
1018Assert.Same(pia1_1, assemblies2[2]);
1071Assert.Same(localTypes2_3, missing.EmbeddingAssembly);
1090Assert.Same(assemblies1[i], assemblies4[i]);
1113Assert.Same(localTypes1_5, missing.EmbeddingAssembly);
1213Assert.Same(localTypes1_8, ambiguous.EmbeddingAssembly);
Symbols\UnsignedRightShiftTests.cs (16)
134Assert.Same(shiftSymbol.ReturnType, unsignedShiftSymbol.ReturnType);
135Assert.Same(shiftSymbol.Parameters[0].Type, unsignedShiftSymbol.Parameters[0].Type);
136Assert.Same(shiftSymbol.Parameters[1].Type, unsignedShiftSymbol.Parameters[1].Type);
137Assert.Same(shiftSymbol.ContainingSymbol, unsignedShiftSymbol.ContainingSymbol);
637Assert.Same(shiftSymbol.ReturnType, unsignedShiftSymbol.ReturnType);
638Assert.Same(shiftSymbol.Parameters[0].Type, unsignedShiftSymbol.Parameters[0].Type);
639Assert.Same(shiftSymbol.Parameters[1].Type, unsignedShiftSymbol.Parameters[1].Type);
640Assert.Same(shiftSymbol.ContainingSymbol, unsignedShiftSymbol.ContainingSymbol);
1187Assert.Same(shiftSymbol.ReturnType, unsignedShiftSymbol.ReturnType);
1188Assert.Same(shiftSymbol.Parameters[0].Type, unsignedShiftSymbol.Parameters[0].Type);
1189Assert.Same(shiftSymbol.Parameters[1].Type, unsignedShiftSymbol.Parameters[1].Type);
1190Assert.Same(shiftSymbol.ContainingSymbol, unsignedShiftSymbol.ContainingSymbol);
1595Assert.Same(shiftSymbol.ReturnType, unsignedShiftSymbol.ReturnType);
1596Assert.Same(shiftSymbol.Parameters[0].Type, unsignedShiftSymbol.Parameters[0].Type);
1597Assert.Same(shiftSymbol.Parameters[1].Type, unsignedShiftSymbol.Parameters[1].Type);
1598Assert.Same(shiftSymbol.ContainingSymbol, unsignedShiftSymbol.ContainingSymbol);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (272)
Generated\Syntax.Test.xml.Generated.cs (244)
14119Assert.Same(oldNode, newNode);
14145Assert.Same(oldNode, newNode);
14171Assert.Same(oldNode, newNode);
14197Assert.Same(oldNode, newNode);
14223Assert.Same(oldNode, newNode);
14249Assert.Same(oldNode, newNode);
14275Assert.Same(oldNode, newNode);
14301Assert.Same(oldNode, newNode);
14327Assert.Same(oldNode, newNode);
14353Assert.Same(oldNode, newNode);
14379Assert.Same(oldNode, newNode);
14405Assert.Same(oldNode, newNode);
14431Assert.Same(oldNode, newNode);
14457Assert.Same(oldNode, newNode);
14483Assert.Same(oldNode, newNode);
14509Assert.Same(oldNode, newNode);
14535Assert.Same(oldNode, newNode);
14561Assert.Same(oldNode, newNode);
14587Assert.Same(oldNode, newNode);
14613Assert.Same(oldNode, newNode);
14639Assert.Same(oldNode, newNode);
14665Assert.Same(oldNode, newNode);
14691Assert.Same(oldNode, newNode);
14717Assert.Same(oldNode, newNode);
14743Assert.Same(oldNode, newNode);
14769Assert.Same(oldNode, newNode);
14795Assert.Same(oldNode, newNode);
14821Assert.Same(oldNode, newNode);
14847Assert.Same(oldNode, newNode);
14873Assert.Same(oldNode, newNode);
14899Assert.Same(oldNode, newNode);
14925Assert.Same(oldNode, newNode);
14951Assert.Same(oldNode, newNode);
14977Assert.Same(oldNode, newNode);
15003Assert.Same(oldNode, newNode);
15029Assert.Same(oldNode, newNode);
15055Assert.Same(oldNode, newNode);
15081Assert.Same(oldNode, newNode);
15107Assert.Same(oldNode, newNode);
15133Assert.Same(oldNode, newNode);
15159Assert.Same(oldNode, newNode);
15185Assert.Same(oldNode, newNode);
15211Assert.Same(oldNode, newNode);
15237Assert.Same(oldNode, newNode);
15263Assert.Same(oldNode, newNode);
15289Assert.Same(oldNode, newNode);
15315Assert.Same(oldNode, newNode);
15341Assert.Same(oldNode, newNode);
15367Assert.Same(oldNode, newNode);
15393Assert.Same(oldNode, newNode);
15419Assert.Same(oldNode, newNode);
15445Assert.Same(oldNode, newNode);
15471Assert.Same(oldNode, newNode);
15497Assert.Same(oldNode, newNode);
15523Assert.Same(oldNode, newNode);
15549Assert.Same(oldNode, newNode);
15575Assert.Same(oldNode, newNode);
15601Assert.Same(oldNode, newNode);
15627Assert.Same(oldNode, newNode);
15653Assert.Same(oldNode, newNode);
15679Assert.Same(oldNode, newNode);
15705Assert.Same(oldNode, newNode);
15731Assert.Same(oldNode, newNode);
15757Assert.Same(oldNode, newNode);
15783Assert.Same(oldNode, newNode);
15809Assert.Same(oldNode, newNode);
15835Assert.Same(oldNode, newNode);
15861Assert.Same(oldNode, newNode);
15887Assert.Same(oldNode, newNode);
15913Assert.Same(oldNode, newNode);
15939Assert.Same(oldNode, newNode);
15965Assert.Same(oldNode, newNode);
15991Assert.Same(oldNode, newNode);
16017Assert.Same(oldNode, newNode);
16043Assert.Same(oldNode, newNode);
16069Assert.Same(oldNode, newNode);
16095Assert.Same(oldNode, newNode);
16121Assert.Same(oldNode, newNode);
16147Assert.Same(oldNode, newNode);
16173Assert.Same(oldNode, newNode);
16199Assert.Same(oldNode, newNode);
16225Assert.Same(oldNode, newNode);
16251Assert.Same(oldNode, newNode);
16277Assert.Same(oldNode, newNode);
16303Assert.Same(oldNode, newNode);
16329Assert.Same(oldNode, newNode);
16355Assert.Same(oldNode, newNode);
16381Assert.Same(oldNode, newNode);
16407Assert.Same(oldNode, newNode);
16433Assert.Same(oldNode, newNode);
16459Assert.Same(oldNode, newNode);
16485Assert.Same(oldNode, newNode);
16511Assert.Same(oldNode, newNode);
16537Assert.Same(oldNode, newNode);
16563Assert.Same(oldNode, newNode);
16589Assert.Same(oldNode, newNode);
16615Assert.Same(oldNode, newNode);
16641Assert.Same(oldNode, newNode);
16667Assert.Same(oldNode, newNode);
16693Assert.Same(oldNode, newNode);
16719Assert.Same(oldNode, newNode);
16745Assert.Same(oldNode, newNode);
16771Assert.Same(oldNode, newNode);
16797Assert.Same(oldNode, newNode);
16823Assert.Same(oldNode, newNode);
16849Assert.Same(oldNode, newNode);
16875Assert.Same(oldNode, newNode);
16901Assert.Same(oldNode, newNode);
16927Assert.Same(oldNode, newNode);
16953Assert.Same(oldNode, newNode);
16979Assert.Same(oldNode, newNode);
17005Assert.Same(oldNode, newNode);
17031Assert.Same(oldNode, newNode);
17057Assert.Same(oldNode, newNode);
17083Assert.Same(oldNode, newNode);
17109Assert.Same(oldNode, newNode);
17135Assert.Same(oldNode, newNode);
17161Assert.Same(oldNode, newNode);
17187Assert.Same(oldNode, newNode);
17213Assert.Same(oldNode, newNode);
17239Assert.Same(oldNode, newNode);
17265Assert.Same(oldNode, newNode);
17291Assert.Same(oldNode, newNode);
17317Assert.Same(oldNode, newNode);
17343Assert.Same(oldNode, newNode);
17369Assert.Same(oldNode, newNode);
17395Assert.Same(oldNode, newNode);
17421Assert.Same(oldNode, newNode);
17447Assert.Same(oldNode, newNode);
17473Assert.Same(oldNode, newNode);
17499Assert.Same(oldNode, newNode);
17525Assert.Same(oldNode, newNode);
17551Assert.Same(oldNode, newNode);
17577Assert.Same(oldNode, newNode);
17603Assert.Same(oldNode, newNode);
17629Assert.Same(oldNode, newNode);
17655Assert.Same(oldNode, newNode);
17681Assert.Same(oldNode, newNode);
17707Assert.Same(oldNode, newNode);
17733Assert.Same(oldNode, newNode);
17759Assert.Same(oldNode, newNode);
17785Assert.Same(oldNode, newNode);
17811Assert.Same(oldNode, newNode);
17837Assert.Same(oldNode, newNode);
17863Assert.Same(oldNode, newNode);
17889Assert.Same(oldNode, newNode);
17915Assert.Same(oldNode, newNode);
17941Assert.Same(oldNode, newNode);
17967Assert.Same(oldNode, newNode);
17993Assert.Same(oldNode, newNode);
18019Assert.Same(oldNode, newNode);
18045Assert.Same(oldNode, newNode);
18071Assert.Same(oldNode, newNode);
18097Assert.Same(oldNode, newNode);
18123Assert.Same(oldNode, newNode);
18149Assert.Same(oldNode, newNode);
18175Assert.Same(oldNode, newNode);
18201Assert.Same(oldNode, newNode);
18227Assert.Same(oldNode, newNode);
18253Assert.Same(oldNode, newNode);
18279Assert.Same(oldNode, newNode);
18305Assert.Same(oldNode, newNode);
18331Assert.Same(oldNode, newNode);
18357Assert.Same(oldNode, newNode);
18383Assert.Same(oldNode, newNode);
18409Assert.Same(oldNode, newNode);
18435Assert.Same(oldNode, newNode);
18461Assert.Same(oldNode, newNode);
18487Assert.Same(oldNode, newNode);
18513Assert.Same(oldNode, newNode);
18539Assert.Same(oldNode, newNode);
18565Assert.Same(oldNode, newNode);
18591Assert.Same(oldNode, newNode);
18617Assert.Same(oldNode, newNode);
18643Assert.Same(oldNode, newNode);
18669Assert.Same(oldNode, newNode);
18695Assert.Same(oldNode, newNode);
18721Assert.Same(oldNode, newNode);
18747Assert.Same(oldNode, newNode);
18773Assert.Same(oldNode, newNode);
18799Assert.Same(oldNode, newNode);
18825Assert.Same(oldNode, newNode);
18851Assert.Same(oldNode, newNode);
18877Assert.Same(oldNode, newNode);
18903Assert.Same(oldNode, newNode);
18929Assert.Same(oldNode, newNode);
18955Assert.Same(oldNode, newNode);
18981Assert.Same(oldNode, newNode);
19007Assert.Same(oldNode, newNode);
19033Assert.Same(oldNode, newNode);
19059Assert.Same(oldNode, newNode);
19085Assert.Same(oldNode, newNode);
19111Assert.Same(oldNode, newNode);
19137Assert.Same(oldNode, newNode);
19163Assert.Same(oldNode, newNode);
19189Assert.Same(oldNode, newNode);
19215Assert.Same(oldNode, newNode);
19241Assert.Same(oldNode, newNode);
19267Assert.Same(oldNode, newNode);
19293Assert.Same(oldNode, newNode);
19319Assert.Same(oldNode, newNode);
19345Assert.Same(oldNode, newNode);
19371Assert.Same(oldNode, newNode);
19397Assert.Same(oldNode, newNode);
19423Assert.Same(oldNode, newNode);
19449Assert.Same(oldNode, newNode);
19475Assert.Same(oldNode, newNode);
19501Assert.Same(oldNode, newNode);
19527Assert.Same(oldNode, newNode);
19553Assert.Same(oldNode, newNode);
19579Assert.Same(oldNode, newNode);
19605Assert.Same(oldNode, newNode);
19631Assert.Same(oldNode, newNode);
19657Assert.Same(oldNode, newNode);
19683Assert.Same(oldNode, newNode);
19709Assert.Same(oldNode, newNode);
19735Assert.Same(oldNode, newNode);
19761Assert.Same(oldNode, newNode);
19787Assert.Same(oldNode, newNode);
19813Assert.Same(oldNode, newNode);
19839Assert.Same(oldNode, newNode);
19865Assert.Same(oldNode, newNode);
19891Assert.Same(oldNode, newNode);
19917Assert.Same(oldNode, newNode);
19943Assert.Same(oldNode, newNode);
19969Assert.Same(oldNode, newNode);
19995Assert.Same(oldNode, newNode);
20021Assert.Same(oldNode, newNode);
20047Assert.Same(oldNode, newNode);
20073Assert.Same(oldNode, newNode);
20099Assert.Same(oldNode, newNode);
20125Assert.Same(oldNode, newNode);
20151Assert.Same(oldNode, newNode);
20177Assert.Same(oldNode, newNode);
20203Assert.Same(oldNode, newNode);
20229Assert.Same(oldNode, newNode);
20255Assert.Same(oldNode, newNode);
20281Assert.Same(oldNode, newNode);
20307Assert.Same(oldNode, newNode);
20333Assert.Same(oldNode, newNode);
20359Assert.Same(oldNode, newNode);
20385Assert.Same(oldNode, newNode);
20411Assert.Same(oldNode, newNode);
20437Assert.Same(oldNode, newNode);
Syntax\SyntaxRewriterTests.cs (11)
317Assert.Same(node, node.SyntaxTree.GetRoot());
326Assert.Same(node1, node1.SyntaxTree.GetRoot());
330Assert.Same(node2, node2.SyntaxTree.GetRoot());
338Assert.Same(tree, tree.GetCompilationUnitRoot().ReplaceToken(tokenT, tokenT).SyntaxTree);
342Assert.Same(newRoot, newRoot.SyntaxTree.GetRoot());
350Assert.Same(tree, tree.GetCompilationUnitRoot().ReplaceNode(typeName, typeName).SyntaxTree);
354Assert.Same(newRoot, newRoot.SyntaxTree.GetRoot());
545Assert.Same(rewrittenRoot, rewrittenRoot.SyntaxTree.GetRoot());
560Assert.Same(ifStmt1, expr1.SyntaxTree.GetRoot());
578Assert.Same(ifStmt2, expr2.SyntaxTree.GetRoot());
624Assert.Same(ifStmt2, expr2.SyntaxTree.GetRoot());
Syntax\SyntaxTreeTests.cs (12)
133Assert.Same(options, tree.DiagnosticOptions);
148Assert.Same(options, tree.DiagnosticOptions);
150Assert.Same(options, newTree.DiagnosticOptions);
181Assert.Same(ImmutableDictionary<string, ReportDiagnostic>.Empty, tree.DiagnosticOptions);
195Assert.Same(options, tree.DiagnosticOptions);
213Assert.Same(tree, newTree);
235Assert.Same(map, newTree.DiagnosticOptions);
250Assert.Same(newOptions, newTree.Options);
268Assert.Same(newOptions, newTree.Options);
269Assert.Same(Encoding.Unicode, newText.Encoding);
281Assert.Same(newOptions, newTree.Options);
310Assert.Same(Encoding.Unicode, newText.Encoding);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (5)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (5)
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Microsoft.CodeAnalysis.Features.UnitTests (2)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (1)
Microsoft.CodeAnalysis.Scripting.UnitTests (6)
Microsoft.CodeAnalysis.Test.Utilities (85)
Compilation\ControlFlowGraphVerifier.cs (27)
77Assert.Same(operationRoot, graph.OriginalOperation);
143Assert.Same(graph.Root, currentRegion);
144Assert.Same(currentRegion, block.EnclosingRegion);
146Assert.Same(enclosing, currentRegion.EnclosingRegion);
161Assert.Same(graph.Root, currentRegion);
162Assert.Same(currentRegion, block.EnclosingRegion);
193Assert.Same(block, predecessorBranch.Destination);
197Assert.Same(blocks[predecessor.Ordinal], predecessor);
201Assert.Same(predecessor.ConditionalSuccessor, predecessorBranch);
206Assert.Same(predecessor.FallThroughSuccessor, predecessorBranch);
217Assert.Same(predecessor.FallThroughSuccessor, predecessorBranch);
248Assert.Same(block, conditionalBranch.Source);
251Assert.Same(blocks[conditionalBranch.Destination.Ordinal], conditionalBranch.Destination);
287Assert.Same(block, nextBranch.Source);
290Assert.Same(blocks[nextBranch.Destination.Ordinal], nextBranch.Destination);
331Assert.Same(g, graph.GetLocalFunctionControlFlowGraph(m));
332Assert.Same(g, graph.GetLocalFunctionControlFlowGraphInScope(m));
333Assert.Same(graph, g.Parent);
340Assert.Same(pair.Value, graph.GetAnonymousFunctionControlFlowGraph(pair.Key));
341Assert.Same(pair.Value, graph.GetAnonymousFunctionControlFlowGraphInScope(pair.Key));
342Assert.Same(graph, pair.Value.Parent);
1417Assert.Same(currentRegion, region);
1437Assert.Same(region.ExceptionType, region.EnclosingRegion.ExceptionType);
1456Assert.Same(region.ExceptionType, region.EnclosingRegion.ExceptionType);
1596Assert.Same(remainedIn1, r);
1608Assert.Same(remainedIn2, r);
1613Assert.Same(remainedIn1.EnclosingRegion, remainedIn2.EnclosingRegion);
Compilation\TestOperationVisitor.cs (49)
85Assert.Same(first, forwards.Current);
92Assert.Same(last, reversed.Current);
111Assert.Same(operation.SemanticModel, operation.SemanticModel.ContainingPublicModelOrSelf);
185Assert.Same(root, ((SwitchCaseOperation)root.Parent).Condition);
376Assert.Same(operation.Operation, operation.ChildOperations.Single());
415Assert.Same(operation.ReturnedValue, operation.ChildOperations.Single());
496Assert.Same(operation.Operand, operation.ChildOperations.Single());
508Assert.Same(operation.Operation, operation.ChildOperations.Single());
571Assert.Same(((IFunctionPointerTypeSymbol)operation.Target.Type).Signature, signature);
582Assert.Same(operation.Value, operation.ChildOperations.Single());
622Assert.Same(operation.Pointer, operation.ChildOperations.Single());
685Assert.Same(operation.Member, operation.Field);
694Assert.Same(operation.Member, operation.Method);
708Assert.Same(operation.Member, operation.Property);
716Assert.Same(operation.Member, operation.Event);
755Assert.Same(operation.Operand, operation.ChildOperations.Single());
863Assert.Same(operation.Operand, operation.ChildOperations.Single());
919Assert.Same(operation.ValueOperand, operation.ChildOperations.Single());
940Assert.Same(operation.Body, operation.ChildOperations.Single());
958Assert.Same(operation.Body, children[0]);
961Assert.Same(operation.IgnoredBody, children[1]);
992Assert.Same(operation.Operation, operation.ChildOperations.Single());
998Assert.Same(operation.Argument, operation.ChildOperations.Single());
1010Assert.Same(operation.Exception, operation.ChildOperations.Single());
1017Assert.Same(operation.Reference, operation.ChildOperations.Single());
1099Assert.Same(operation.Value, operation.ChildOperations.Single());
1206Assert.Same(operation.Target, operation.ChildOperations.Single());
1212Assert.Same(operation.Operand, operation.ChildOperations.Single());
1233Assert.Same(operation.Instance, operation.ChildOperations.Single());
1252Assert.Same(operation.Initializer, operation.ChildOperations.Single());
1265Assert.Same(operation.Initializer, operation.ChildOperations.Single());
1294Assert.Same(operation.Text, operation.ChildOperations.Single());
1369Assert.Same(operation.Value, operation.ChildOperations.Single());
1382Assert.Same(operation.Value, operation.ChildOperations.Single());
1392Assert.Same(operation.LeftPattern, children[0]);
1393Assert.Same(operation.RightPattern, children[1]);
1400Assert.Same(operation.Pattern, operation.ChildOperations.Single());
1451Assert.Same(operation.Pattern, operation.ChildOperations.Single());
1581Assert.Same(((ICaseClauseOperation)operation).Label, operation.Label);
1589Assert.Same(operation.Pattern, operation.ChildOperations.Single());
1596Assert.Same(operation.Operation, operation.ChildOperations.Single());
1602Assert.Same(operation.Expression, operation.ChildOperations.Single());
1614Assert.Same(operation.Target, operation.ChildOperations.Single());
1670Assert.Same(operation.BlockBody, operation.ChildOperations.Single());
1675Assert.Same(operation.ExpressionBody, operation.ChildOperations.Single());
1703Assert.Same(operation.Value, operation.ChildOperations.Single());
1742Assert.Same(operation.Operand, operation.ChildOperations.Single());
1771Assert.Same(operation.LeftOperand, children[index++]);
1776Assert.Same(operation.RightOperand, children[index++]);
Microsoft.CodeAnalysis.UnitTests (101)
Collections\BoxesTest.cs (19)
17Assert.Same(Boxes.Box(true), Boxes.Box(true));
18Assert.Same(Boxes.Box(false), Boxes.Box(false));
22Assert.Same(Boxes.Box((byte)0), Boxes.Box((byte)0));
26Assert.Same(Boxes.Box((sbyte)0), Boxes.Box((sbyte)0));
30Assert.Same(Boxes.Box((short)0), Boxes.Box((short)0));
34Assert.Same(Boxes.Box((ushort)0), Boxes.Box((ushort)0));
38Assert.Same(Boxes.Box(0), Boxes.Box(0));
39Assert.Same(Boxes.Box(1), Boxes.Box(1));
40Assert.Same(Boxes.BoxedInt32Zero, Boxes.Box(0));
41Assert.Same(Boxes.BoxedInt32One, Boxes.Box(1));
45Assert.Same(Boxes.Box(0u), Boxes.Box(0u));
49Assert.Same(Boxes.Box(0L), Boxes.Box(0L));
53Assert.Same(Boxes.Box(0UL), Boxes.Box(0UL));
57Assert.Same(Boxes.Box(0.0f), Boxes.Box(0.0f));
62Assert.Same(Boxes.Box(0.0), Boxes.Box(0.0));
67Assert.Same(Boxes.Box(decimal.Zero), Boxes.Box(0m));
74Assert.Same(Boxes.Box('\0'), Boxes.Box('\0'));
75Assert.Same(Boxes.Box('*'), Boxes.Box('*'));
76Assert.Same(Boxes.Box('0'), Boxes.Box('0'));
InternalUtilities\ConcurrentDictionaryExtensionsTests.cs (4)
31Assert.Same(first, dictionary.GetOrAdd(0, static (key, arg) => arg, first));
32Assert.Same(first, dictionary[0]);
34Assert.Same(first, dictionary.GetOrAdd(0, static (key, arg) => arg, second));
35Assert.Same(first, dictionary[0]);
MetadataReferences\MetadataReferenceTests.cs (19)
214Assert.Same(DocumentationProvider.Default, r.DocumentationProvider);
231Assert.Same(doc, r.DocumentationProvider);
258Assert.Same(doc, r.DocumentationProvider);
259Assert.Same(doc, r.DocumentationProvider);
267Assert.Same(r, r1);
271Assert.Same(r, r2);
275Assert.Same(r, r3);
297Assert.Same(doc, r.DocumentationProvider);
298Assert.Same(doc, r.DocumentationProvider);
310Assert.Same(r.DocumentationProvider, r3.DocumentationProvider);
311Assert.Same(r.GetMetadataNoCopy(), r3.GetMetadataNoCopy());
318Assert.Same(r.DocumentationProvider, r4.DocumentationProvider);
319Assert.Same(r.GetMetadataNoCopy(), r4.GetMetadataNoCopy());
347Assert.Same(c, r1.Compilation);
353Assert.Same(c, r2.Compilation);
359Assert.Same(c, r3.Compilation);
378Assert.Same(c, r1.Compilation);
384Assert.Same(c, r2.Compilation);
390Assert.Same(c, r3.Compilation);
Text\SourceTextTests.cs (9)
46Assert.Same(string.Empty, text.ToString());
56Assert.Same(s_utf8, SourceText.From(HelloWorld, s_utf8).Encoding);
57Assert.Same(s_unicode, SourceText.From(HelloWorld, s_unicode).Encoding);
60Assert.Same(s_unicode, SourceText.From(bytes, bytes.Length, s_unicode).Encoding);
64Assert.Same(s_unicode, SourceText.From(stream, s_unicode).Encoding);
360Assert.Same(s_utf8, SourceText.From(actual, expected.Length, s_utf8).Encoding);
361Assert.Same(s_unicode, SourceText.From(actual, expected.Length, s_unicode).Encoding);
379Assert.Same(s_utf8, SourceText.From(actual, expected.Length, s_utf8).Encoding);
380Assert.Same(s_unicode, SourceText.From(actual, expected.Length, s_unicode).Encoding);
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (24)
Emit\NoPiaEmbedTypes.vb (15)
1025Assert.Same(itest1, test2.Interfaces.Single())
1045Assert.Same(itest1, itest3.Interfaces.Single())
1082Assert.Same(itest8, [module].GlobalNamespace.GetMember(Of NamedTypeSymbol)("UsePia1").Interfaces.Single())
1404Assert.Same(p1.GetMethod, get_P1)
1405Assert.Same(p1.SetMethod, set_P1)
1413Assert.Same(p2.GetMethod, get_P2)
1414Assert.Same(p2.SetMethod, set_P2)
1421Assert.Same(p3.GetMethod, get_P3)
1435Assert.Same(p4.SetMethod, set_P4)
1446Assert.Same(e1.AddMethod, add_E1)
1447Assert.Same(e1.RemoveMethod, remove_E1)
1459Assert.Same(e2.AddMethod, add_E2)
1460Assert.Same(e2.RemoveMethod, remove_E2)
1567Assert.Same(type1, t2.ConstraintTypes(0))
1600Assert.Same(t1, t6.ConstraintTypes(0))
Microsoft.CodeAnalysis.VisualBasic.Scripting.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (5)
Microsoft.CodeAnalysis.Workspaces.UnitTests (90)
SolutionTests\SolutionTestHelpers.cs (6)
34Assert.Same(instanceWithValue2, instanceWithValue);
58Assert.Same(boxedItems, getter(instanceWithItem));
60Assert.Same(instanceWithNoItem, factory(instanceWithNoItem, null));
61Assert.Same(instanceWithNoItem, factory(instanceWithNoItem, []));
62Assert.Same(instanceWithNoItem, factory(instanceWithNoItem, []));
77Assert.Same(boxedDupItems, getter(factory(instanceWithNoItem, boxedDupItems)));
SolutionTests\SolutionTests.cs (49)
182Assert.Same(newSolution1, newSolution2);
202Assert.Same(newSolution2, newSolution1);
209Assert.Same(newSolution3, newSolution4);
212Assert.Same(newSolution3, newSolution5);
234Assert.Same(newSolution1, newSolution2);
255Assert.Same(solution, solution.WithDocumentSourceCodeKind(documentId, SourceCodeKind.Regular));
317Assert.Same(newSolution1, newSolution2);
359Assert.Same(newSolution1, newSolution2);
379Assert.Same(textAndVersion.Text, actualText);
383Assert.Same(newSolution1, newSolution2);
924Assert.Same(text, actualText);
927Assert.Same(newSolution1, newSolution2);
947Assert.Same(textAndVersion.Text, actualText);
951Assert.Same(newSolution1, newSolution2);
970Assert.Same(text, actualText);
973Assert.Same(newSolution1, newSolution2);
993Assert.Same(textAndVersion.Text, actualText);
997Assert.Same(newSolution1, newSolution2);
1447Assert.Same(newSolution, newSolution.WithProjectAssemblyName(projectId, assemblyName));
1932Assert.Same(projectRefs, solution2.GetProject(projectId)!.AllProjectReferences);
1952Assert.Same(projectRefs, newSolution1.GetProject(projectId)!.AllProjectReferences);
1978Assert.Same(solution, solution2);
2097Assert.Same(solution, solution2);
2167Assert.Same(solution, solution2);
2177Assert.Same(solution, solution2);
2235Assert.Same(solution, solution2);
2245Assert.Same(solution, solution2);
3050Assert.Same(newParseOptions, newUpdatedParseOptions);
3250Assert.Same(tree, tree.WithRootAndOptions(root, tree.Options));
3251Assert.Same(tree, tree.WithFilePath(tree.FilePath));
3783Assert.Same(tree2, tree2.GetRoot().SyntaxTree);
3784Assert.Same(tree.Options, tree2.Options);
3785Assert.Same(tree.Encoding, tree2.Encoding);
3790Assert.Same(tree, tree.WithFilePath("old path"));
3811Assert.Same(tree3, tree3.GetRoot().SyntaxTree);
3812Assert.Same(tree.Options, tree3.Options);
3813Assert.Same(tree.Encoding, tree3.Encoding);
3822Assert.Same(tree4, tree4.GetRoot().SyntaxTree);
3823Assert.Same(newOptions, tree4.Options);
3824Assert.Same(tree.Encoding, tree4.Encoding);
3829Assert.Same(tree, tree.WithRootAndOptions(tree.GetRoot(), tree.Options));
4119Assert.Same(frozenDocument, frozenDocument2);
4276Assert.Same(await frozenDocument.GetSyntaxTreeAsync(), singleTree);
4694Assert.Same(originalSyntaxTree, newSyntaxTree);
4861Assert.Same(originalSyntaxTree, newSyntaxTree);
5058Assert.Same(compilation1, compilation1New);
5234Assert.Same(compilation1, compilation1New);
5444Assert.Same(newDocText, sameText);
5448Assert.Same(newDocText, treeText);
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.AI.Abstractions.Tests (99)
ChatCompletion\ChatCompletionTests.cs (11)
26Assert.Same(message, completion.Message);
27Assert.Same(message, Assert.Single(completion.Choices));
41Assert.Same(messages, completion.Choices);
60Assert.Same(message, completion.Message);
61Assert.Same(message, completion.Choices[0]);
73Assert.Same(first, completion.Message);
74Assert.Same(first, completion.Choices[0]);
108Assert.Same(usage, completion.Usage);
113Assert.Same(raw, completion.RawRepresentation);
118Assert.Same(additionalProps, completion.AdditionalProperties);
122Assert.Same(newChoices, completion.Choices);
ChatCompletion\ChatMessageTests.cs (12)
22Assert.Same(message.Contents, message.Contents);
38Assert.Same(message.Contents, message.Contents);
78Assert.Same(message.Contents, message.Contents);
142Assert.Same(textContent, message.Contents[3]);
204Assert.Same(contents, message.Contents);
207Assert.Same(contents, message.Contents);
224Assert.Same(raw, message.RawRepresentation);
227Assert.Same(raw, message.RawRepresentation);
233Assert.Same(raw, message.RawRepresentation);
245Assert.Same(props, message.AdditionalProperties);
248Assert.Same(props, message.AdditionalProperties);
254Assert.Same(props, message.AdditionalProperties);
Embeddings\GeneratedEmbeddingsTests.cs (15)
68Assert.Same(embeddings[0], generatedEmbeddings[0]);
69Assert.Same(embeddings[1], generatedEmbeddings[1]);
88Assert.Same(e, generatedEmbeddings[2]);
100Assert.Same(usage, embeddings.Usage);
107Assert.Same(props, embeddings.AdditionalProperties);
120Assert.Same(e, embeddings[0]);
134Assert.Same(e1, embeddings[0]);
135Assert.Same(e2, embeddings[1]);
167Assert.Same(e2, embeddings[0]);
171Assert.Same(e2, embeddings[0]);
190Assert.Same(e2, embeddings[0]);
210Assert.Same(e3, embeddings[1]);
211Assert.Same(e2, embeddings[2]);
228Assert.Same(e1, embeddings[0]);
229Assert.Same(e3, embeddings[1]);
Microsoft.Extensions.AI.AzureAIInference.Tests (7)
Microsoft.Extensions.AI.Ollama.Tests (6)
Microsoft.Extensions.AI.OpenAI.Tests (14)
Microsoft.Extensions.AI.Tests (14)
Microsoft.Extensions.AsyncState.Tests (10)
AsyncContextTests.cs (10)
29Assert.Same(obj1, context1.Get());
53Assert.Same(obj1, context1.Get());
80Assert.Same(obj1, context1.Get());
82Assert.Same(obj2, context2.Get());
108Assert.Same(obj1, ctx1);
133Assert.Same(obj1, context1.Get());
135Assert.Same(obj2, context2.Get());
199await Task.Run(() => Assert.Same(obj, context.Get()));
215await Task.Run(() => Assert.Same(obj, context.Get()));
243Assert.Same(obj2, context.Get());
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.Diagnostics.Testing.Tests (8)
Microsoft.Extensions.FileProviders.Embedded.Tests (2)
Microsoft.Extensions.Hosting.Testing.Tests (1)
Microsoft.Extensions.Http.Diagnostics.Tests (3)
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.Http.Resilience.Tests (2)
Microsoft.Extensions.Localization.Tests (2)
Microsoft.Extensions.ObjectPool.DependencyInjection.Tests (3)
Microsoft.Extensions.ObjectPool.Tests (5)
Microsoft.Extensions.Telemetry.Abstractions.Tests (1)
Microsoft.Extensions.WebEncoders.Tests (9)
Microsoft.Gen.Logging.Unit.Tests (1)
Microsoft.JSInterop.Tests (18)
Microsoft.Net.Http.Headers.Tests (19)
Microsoft.VisualBasic.Tests (13)
Mvc.Analyzers.Test (7)
Mvc.Api.Analyzers.Test (7)
Shared.Tests (8)
System.Drawing.Common.Tests (13)
System.Private.Windows.Core.Tests (7)
System.Windows.Forms.Design.Tests (730)
System.Windows.Forms.Primitives.Tests (12)
System.Windows.Forms.Tests (8590)
System.Xaml.Tests (10)