283 references to True
InMemory.FunctionalTests (12)
ChunkedRequestTests.cs (8)
25Assert.True(request.CanHaveBody()); 42Assert.True(request.CanHaveBody()); 61Assert.True(request.CanHaveBody()); 178Assert.True(request.CanHaveBody()); 234Assert.True(request.CanHaveBody()); 362Assert.True(request.CanHaveBody()); 665Assert.True(request.CanHaveBody()); 709Assert.True(request.CanHaveBody());
Http2\Http2StreamTests.cs (2)
186Assert.True(context.Request.CanHaveBody()); 237Assert.True(context.Request.CanHaveBody());
MaxRequestBodySizeTests.cs (1)
33Assert.True(context.Request.CanHaveBody());
RequestTests.cs (1)
2044Assert.True(request.CanHaveBody());
InProcessWebSite (14)
Startup.cs (14)
560Assert.True(ctx.Request.CanHaveBody()); 573Assert.True(ctx.Request.CanHaveBody()); 611Assert.True(ctx.Request.CanHaveBody()); 629Assert.True(ctx.Request.CanHaveBody()); 642Assert.True(ctx.Request.CanHaveBody()); 657Assert.True(ctx.Request.CanHaveBody()); 688Assert.True(ctx.Request.CanHaveBody()); 714Assert.True(ctx.Request.CanHaveBody()); 767Assert.True(ctx.Request.CanHaveBody()); 1164Assert.True(ctx.Request.CanHaveBody()); 1182Assert.True(ctx.Request.CanHaveBody()); 1466Assert.True(httpContext.Request.CanHaveBody()); 1635Assert.True(httpContext.Request.CanHaveBody()); 1646Assert.True(httpContext.Request.CanHaveBody());
Microsoft.Analyzers.Local.Tests (1)
Json\JsonValueTest.cs (1)
247Assert.True((bool?)new JsonValue(true));
Microsoft.AspNetCore.Antiforgery.Test (1)
AntiforgeryMiddlewareTest.cs (1)
27Assert.True(httpContext.Features.Get<IAntiforgeryValidationFeature>()?.IsValid);
Microsoft.AspNetCore.Authentication.Core.Test (2)
AuthenticationPropertiesTests.cs (2)
228Assert.True(props.AllowRefresh); 292Assert.True(props.GetBool("foo"));
Microsoft.AspNetCore.Authentication.Test (1)
OAuthChallengePropertiesTest.cs (1)
139Assert.True(properties.IncludeGrantedScopes);
Microsoft.AspNetCore.Http.Extensions.Tests (7)
RequestDelegateFactoryTests.cs (2)
122Assert.True(httpContext.Items["invoked"] as bool?); 145Assert.True(httpContext.Items["invoked"] as bool?);
RequestDelegateGenerator\RequestDelegateCreationTests.BindAsync.cs (2)
248Assert.True(httpContext.Items["invoked"] as bool?); 304Assert.True(httpContext.Items["invoked"] as bool?);
RequestDelegateGenerator\RequestDelegateCreationTests.Filters.cs (3)
38Assert.True(httpContext.Items["filterInvoked"] as bool?); 71Assert.True(httpContext.Items["invoked"] as bool?); 72Assert.True(httpContext.Items["filterInvoked"] as bool?);
Microsoft.AspNetCore.Mvc.Core.Test (5)
ApplicationModels\ApiBehaviorApplicationModelProviderTest.cs (2)
75Assert.True(actionModel.ApiExplorer.IsVisible); 118Assert.True(actionModel.ApiExplorer.IsVisible);
ApplicationModels\ApiVisibilityConventionTest.cs (1)
21Assert.True(action.ApiExplorer.IsVisible);
ModelBinding\Metadata\HasValidatorsValidationMetadataProviderTest.cs (2)
76Assert.True(context.ValidationMetadata.HasValidators); 126Assert.True(context.ValidationMetadata.HasValidators);
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (10)
DataAnnotationsMetadataProviderTest.cs (10)
163Assert.True(context.BindingMetadata.IsReadOnly); 1119Assert.True(context.ValidationMetadata.IsRequired); 1163Assert.True(context.ValidationMetadata.IsRequired); 1188Assert.True(context.ValidationMetadata.IsRequired); 1239Assert.True(context.ValidationMetadata.IsRequired); 1258Assert.True(context.ValidationMetadata.IsRequired); 1318Assert.True(context.ValidationMetadata.IsRequired); 1337Assert.True(context.ValidationMetadata.IsRequired); 1356Assert.True(context.ValidationMetadata.IsRequired); 1417Assert.True(context.ValidationMetadata.IsRequired);
Microsoft.AspNetCore.Mvc.IntegrationTests (6)
ValidationIntegrationTests.cs (3)
2102Assert.True(modelMetadata.HasValidators); 2173Assert.True(modelMetadata.HasValidators); 2392Assert.True(modelMetadata.HasValidators);
ValidationWithRecordIntegrationTests.cs (3)
1893Assert.True(modelMetadata.HasValidators); 1964Assert.True(modelMetadata.HasValidators); 2180Assert.True(modelMetadata.HasValidators);
Microsoft.AspNetCore.Mvc.Razor.Test (1)
RazorPageTest.cs (1)
558Assert.True(actual);
Microsoft.AspNetCore.OpenApi.Tests (27)
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (3)
496Assert.True(parameter.Schema.Items.Type?.HasFlag(innerSchemaType)); 942Assert.True(todoSchema.Type?.HasFlag(JsonSchemaType.Null)); 971Assert.True(accountSchema.Type?.HasFlag(JsonSchemaType.Null));
Services\OpenApiSchemaService\OpenApiSchemaService.PropertySchemas.cs (24)
49Assert.True(nullableIntProperty.Type?.HasFlag(JsonSchemaType.Integer)); 50Assert.True(nullableIntProperty.Type?.HasFlag(JsonSchemaType.Null)); 67Assert.True(nullableStringProperty.Type?.HasFlag(JsonSchemaType.String)); 68Assert.True(nullableStringProperty.Type?.HasFlag(JsonSchemaType.Null)); 84Assert.True(nullableBoolProperty.Type?.HasFlag(JsonSchemaType.Boolean)); 85Assert.True(nullableBoolProperty.Type?.HasFlag(JsonSchemaType.Null)); 105Assert.True(nullableDateTimeProperty.Type?.HasFlag(JsonSchemaType.String)); 106Assert.True(nullableDateTimeProperty.Type?.HasFlag(JsonSchemaType.Null)); 127Assert.True(nullableGuidProperty.Type?.HasFlag(JsonSchemaType.String)); 128Assert.True(nullableGuidProperty.Type?.HasFlag(JsonSchemaType.Null)); 149Assert.True(nullableUriProperty.Type?.HasFlag(JsonSchemaType.String)); 150Assert.True(nullableUriProperty.Type?.HasFlag(JsonSchemaType.Null)); 234Assert.True(nullableTodoListProperty.Type?.HasFlag(JsonSchemaType.Array)); 235Assert.True(nullableTodoListProperty.Type?.HasFlag(JsonSchemaType.Null)); 256Assert.True(nullableTodoArrayProperty.Type?.HasFlag(JsonSchemaType.Array)); 257Assert.True(nullableTodoArrayProperty.Type?.HasFlag(JsonSchemaType.Null)); 278Assert.True(nullableDictionaryProperty.Type?.HasFlag(JsonSchemaType.Object)); 279Assert.True(nullableDictionaryProperty.Type?.HasFlag(JsonSchemaType.Null)); 358Assert.True(nullableNameProperty.Type?.HasFlag(JsonSchemaType.String)); 359Assert.True(nullableNameProperty.Type?.HasFlag(JsonSchemaType.Null)); 383Assert.True(nullableAgeProperty.Type?.HasFlag(JsonSchemaType.Integer)); 384Assert.True(nullableAgeProperty.Type?.HasFlag(JsonSchemaType.Null)); 407Assert.True(nullableDescriptionProperty.Type?.HasFlag(JsonSchemaType.String)); 408Assert.True(nullableDescriptionProperty.Type?.HasFlag(JsonSchemaType.Null));
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (9)
Http2Tests.cs (2)
168Assert.True(httpContext.Request.CanHaveBody()); 232Assert.True(httpContext.Request.CanHaveBody());
RequestBodyLimitTests.cs (2)
51Assert.True(httpContext.Request.CanHaveBody()); 118Assert.True(httpContext.Request.CanHaveBody());
RequestBodyTests.cs (4)
29Assert.True(httpContext.Request.CanHaveBody()); 49Assert.True(httpContext.Request.CanHaveBody()); 71Assert.True(httpContext.Request.CanHaveBody()); 89Assert.True(httpContext.Request.CanHaveBody());
ResponseHeaderTests.cs (1)
154Assert.True(response.Headers.TransferEncodingChunked);
Microsoft.AspNetCore.Server.Kestrel.Tests (2)
ConfigurationReaderTests.cs (2)
71Assert.True(storeCert.AllowInvalid); 218Assert.True(cert4.AllowInvalid);
Microsoft.AspNetCore.TestHost.Tests (4)
ClientHandlerTests.cs (4)
133Assert.True(context.Request.CanHaveBody()); 166Assert.True(context.Request.CanHaveBody()); 183Assert.True(context.Request.CanHaveBody()); 332Assert.True(postHasStarted);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenLocalFunctionTests.cs (1)
5854Assert.True(importData.ThrowOnUnmappableCharacter);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (49)
Attributes\AttributeTests_WellKnownAttributes.cs (46)
2732Assert.True(info.BestFitMapping); 2733Assert.True(info.ThrowOnUnmappableCharacter); 10504Assert.True(comp.HasLocalsInit("C.M_init", realIL: true)); 10506Assert.True(comp.HasLocalsInit("C.M_init", realIL: false)); 10636Assert.True(verifier.HasLocalsInit("C.M2", realIL: true)); 10792Assert.True(comp.HasLocalsInit("C.M")); 10956Assert.True(verifier.HasLocalsInit("C.M")); 10957Assert.True(verifier.HasLocalsInit("C.<M>g__localNoAttribute|0_0")); // localNoAttribute 10958Assert.True(verifier.HasLocalsInit("C.<>c.<M>b__0_1")); // lambda 10998Assert.True(verifier.HasLocalsInit("C.M")); 10999Assert.True(verifier.HasLocalsInit("C.<M>g__localNoAttribute|0_0")); // localNoAttribute 11040Assert.True(verifier.HasLocalsInit("C.M")); 11082Assert.True(verifier.HasLocalsInit("C.M")); 11083Assert.True(verifier.HasLocalsInit("C.<>c.<M>b__0_0")); // lambda 11084Assert.True(verifier.HasLocalsInit("C.<M>g__localNoAttribute|0_1")); // localNoAttribute 11124Assert.True(verifier.HasLocalsInit("C.M")); 11125Assert.True(verifier.HasLocalsInit("C.<>c.<M>b__0_0")); // lambda 11166Assert.True(verifier.HasLocalsInit("C.M")); 11220Assert.True(verifier.HasLocalsInit("C.PropNoAttribute.get")); 11221Assert.True(verifier.HasLocalsInit("C.<get_PropNoAttribute>g__local1|3_0")); 11310Assert.True(verifier.HasLocalsInit("C.EventNoAttribute.add")); 11311Assert.True(verifier.HasLocalsInit("C.<add_EventNoAttribute>g__local1|4_0")); 11538Assert.True(verifier.HasLocalsInit("<top-level-statements-entry-point>")); 11539Assert.True(verifier.HasLocalsInit("Program.<<Main>$>g__local|0_0")); 11656Assert.True(comp.HasLocalsInit("C.<M_init>d__1.System.Collections.IEnumerator.MoveNext")); 11658Assert.True(comp.HasLocalsInit("C.<M_init>d__1.System.Collections.Generic.IEnumerable<object>.GetEnumerator")); 11738Assert.True(comp.HasLocalsInit("C.<M_init>d__1.System.Runtime.CompilerServices.IAsyncStateMachine.MoveNext")); 11853Assert.True(comp_init.HasLocalsInit("<>f__AnonymousType0<<Value>j__TPar>.Equals")); 11854Assert.True(comp_init.HasLocalsInit("<>f__AnonymousType0<<Value>j__TPar>.ToString")); 11974Assert.True(comp.HasLocalsInit("C_init.M")); 12027Assert.True(comp.HasLocalsInit("C.P_init.get")); 12029Assert.True(comp.HasLocalsInit("C.P_init.set")); 12099Assert.True(comp.HasLocalsInit("C.P1.set")); 12100Assert.True(comp.HasLocalsInit("C.P2.get")); 12267Assert.True(comp.HasLocalsInit("C_init.P.get")); 12269Assert.True(comp.HasLocalsInit("C_init.P.set")); 12460Assert.True(comp.HasLocalsInit("C_init.P.get")); 12462Assert.True(comp.HasLocalsInit("C_init.P.set")); 12464Assert.True(comp.HasLocalsInit("C_init.M")); 12466Assert.True(comp.HasLocalsInit("C_init.C2.M2")); 12468Assert.True(comp.HasLocalsInit("C_init.E.add")); 12469Assert.True(comp.HasLocalsInit("C_init.E.remove")); 12670Assert.True(comp.HasLocalsInit("C_init.C.M")); 12786Assert.True(comp.HasLocalsInit("C.M")); 12962Assert.True(verifier.HasLocalsInit("B.M2")); 13035Assert.True(verifier.HasLocalsInit("ClassNoAttributeWithLocal..ctor"));
Attributes\InternalsVisibleToAndStrongNameTests.cs (1)
729Assert.True(comp.Options.DelaySign);
Semantics\ExtensionTests.cs (2)
49910Assert.True(verifier.HasLocalsInit("E.get_P2")); 49933Assert.True(verifier.HasLocalsInit("E.M2"));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (108)
Semantics\NullableReferenceTypesTests.cs (107)
97727Assert.True(t2.ReferenceTypeConstraintIsNullable); 97781Assert.True(t2.ReferenceTypeConstraintIsNullable); 97834Assert.True(t2.ReferenceTypeConstraintIsNullable); 97875Assert.True(t1.ReferenceTypeConstraintIsNullable); 97888Assert.True(t2.ReferenceTypeConstraintIsNullable); 98509Assert.True(t22.ReferenceTypeConstraintIsNullable); 98561Assert.True(t22.ReferenceTypeConstraintIsNullable); 98567Assert.True(t2.ReferenceTypeConstraintIsNullable); 98700Assert.True(t22.ReferenceTypeConstraintIsNullable); 98807Assert.True(t22.ReferenceTypeConstraintIsNullable); 98876Assert.True(t22.ReferenceTypeConstraintIsNullable); 98948Assert.True(t22.ReferenceTypeConstraintIsNullable); 99014Assert.True(t22.ReferenceTypeConstraintIsNullable); 99055Assert.True(t22.ReferenceTypeConstraintIsNullable); 99089Assert.True(t2.ReferenceTypeConstraintIsNullable); 99114Assert.True(t2.ReferenceTypeConstraintIsNullable); 99157Assert.True(t2.ReferenceTypeConstraintIsNullable); 99388Assert.True(t22.ReferenceTypeConstraintIsNullable); 100160Assert.True(t11.IsNotNullable); 100172Assert.True(t44.IsNotNullable); 100287Assert.True(t222.IsNotNullable); 100291Assert.True(t333.IsNotNullable); 100368Assert.True(t1.IsNotNullable); 100407Assert.True(t1.IsNotNullable); 100489Assert.True(t1.IsNotNullable); 100509Assert.True(t1.IsNotNullable); 100565Assert.True(t1.IsNotNullable); 100573Assert.True(t2.IsNotNullable); 100608Assert.True(t1.IsNotNullable); 100615Assert.True(t2.IsNotNullable); 100636Assert.True(((MethodSymbol)comp.SourceModule.GlobalNamespace.GetMember("B.F1")).TypeParameters[0].IsNotNullable); 100653Assert.True(t1.IsNotNullable); 100660Assert.True(t2.IsNotNullable); 100742Assert.True(at1.IsNotNullable); 100837Assert.True(at1.IsNotNullable); 100925Assert.True(at1.IsNotNullable); 100986Assert.True(t1.IsNotNullable); 101011Assert.True(t1.IsNotNullable); 101035Assert.True(t1.IsNotNullable); 101062Assert.True(t1.IsNotNullable); 101111Assert.True(at1.IsNotNullable); 101193Assert.True(at1.IsNotNullable); 102100Assert.True(tf1.IsNotNullable); 102127Assert.True(tf1.IsNotNullable); 102377Assert.True(tf1.IsNotNullable); 102404Assert.True(tf1.IsNotNullable); 102432Assert.True(tf1.IsNotNullable); 102460Assert.True(tf1.IsNotNullable); 102656Assert.True(tf1.IsNotNullable); 102682Assert.True(tf1.IsNotNullable); 102924Assert.True(tf1.IsNotNullable); 102951Assert.True(tf1.IsNotNullable); 102978Assert.True(tf1.IsNotNullable); 103005Assert.True(tf1.IsNotNullable); 103256Assert.True(tf1.IsNotNullable); 103305Assert.True(tf1.IsNotNullable); 103330Assert.True(tf1.IsNotNullable); 103380Assert.True(tf1.IsNotNullable); 103432Assert.True(tf1.IsNotNullable); 103458Assert.True(tf1.IsNotNullable); 104349Assert.True(m1.PartialImplementationPart.TypeParameters[0].IsNotNullable); 104375Assert.True(m1.PartialImplementationPart.TypeParameters[0].IsNotNullable); 104405Assert.True(m1.PartialImplementationPart.TypeParameters[0].IsNotNullable); 104663Assert.True(m1.TypeParameters[0].IsNotNullable); 104689Assert.True(m1.TypeParameters[0].IsNotNullable); 104720Assert.True(m1.TypeParameters[0].IsNotNullable); 104903Assert.True(t22.ReferenceTypeConstraintIsNullable); 104917Assert.True(t2.ReferenceTypeConstraintIsNullable); 104987Assert.True(t22.ReferenceTypeConstraintIsNullable); 105064Assert.True(t22.ReferenceTypeConstraintIsNullable); 105154Assert.True(m1.TypeParameters[0].IsNotNullable); 105158Assert.True(baseM1.TypeParameters[0].IsNotNullable); 105247Assert.True(m1.TypeParameters[0].IsNotNullable); 105251Assert.True(baseM1.TypeParameters[0].IsNotNullable); 105283Assert.True(m1.TypeParameters[0].IsNotNullable); 105287Assert.True(baseM1.TypeParameters[0].IsNotNullable); 106255Assert.True(m1.TypeParameters[0].IsNotNullable); 106384Assert.True(m1.TypeParameters[0].IsNotNullable); 106416Assert.True(m1.TypeParameters[0].IsNotNullable); 106448Assert.True(m1.TypeParameters[0].IsNotNullable); 106481Assert.True(m1.TypeParameters[0].IsNotNullable); 106573Assert.True(m1.TypeParameters[0].IsNotNullable); 106605Assert.True(m1.TypeParameters[0].IsNotNullable); 106637Assert.True(m1.TypeParameters[0].IsNotNullable); 106670Assert.True(m1.TypeParameters[0].IsNotNullable); 106701Assert.True(m1.TypeParameters[0].IsNotNullable); 106733Assert.True(m1.TypeParameters[0].IsNotNullable); 106764Assert.True(m1.TypeParameters[0].IsNotNullable); 106796Assert.True(m1.TypeParameters[0].IsNotNullable); 106826Assert.True(m1.TypeParameters[0].IsNotNullable); 106856Assert.True(m1.TypeParameters[0].IsNotNullable); 106916Assert.True(m1.TypeParameters[0].IsNotNullable); 107122Assert.True(m5.TypeParameters[0].IsNotNullable); 107126Assert.True(m6.TypeParameters[0].IsNotNullable); 107134Assert.True(m8.TypeParameters[0].IsNotNullable); 107138Assert.True(m9.TypeParameters[0].IsNotNullable); 107353Assert.True(m1.TypeParameters[0].IsNotNullable); 107389Assert.True(m1.TypeParameters[0].IsNotNullable); 107512Assert.True(t2m1.TypeParameters[0].IsNotNullable); 107516Assert.True(t3m1.TypeParameters[0].IsNotNullable); 107626Assert.True(m1.TypeParameters[0].IsNotNullable); 107662Assert.True(m1.TypeParameters[0].IsNotNullable); 107734Assert.True(m1.TypeParameters[0].IsNotNullable); 137087Assert.True(t.ReferenceTypeConstraintIsNullable); 137228Assert.True(t.ReferenceTypeConstraintIsNullable); 137276Assert.True(t.ReferenceTypeConstraintIsNullable); 138856Assert.True(f.TypeParameters[0].ReferenceTypeConstraintIsNullable);
Semantics\TopLevelStatementsTests.cs (1)
6263Assert.True(importData.ThrowOnUnmappableCharacter);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
EditAndContinue\EditAndContinueLanguageServiceTests.cs (1)
150Assert.True(inBreakState);
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\RemoteEditAndContinueServiceTests.cs (1)
162Assert.True(inBreakState);
Microsoft.CodeAnalysis.Workspaces.UnitTests (7)
Options\DocumentOptionSetTests.cs (5)
134Assert.True((bool?)set.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInTypes))); 135Assert.True((bool?)set.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInMethods))); 142Assert.True((bool?)updatedSet.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInTypes))); 143Assert.True((bool?)updatedSet.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInMethods))); 146Assert.True((bool?)updatedSet.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInProperties)));
WorkspaceServiceTests\GlobalOptionServiceTests.cs (2)
216Assert.True((bool?)optionSet.GetOption(key)); 235Assert.True((bool?)optionSet.GetOption(trueKey));
Microsoft.Data.Analysis.Tests (5)
DataFrameTests.BinaryOperations.cs (4)
228Assert.True(equalsResult[0]); 232Assert.True(equalsToScalarResult[0]); 237Assert.True(notEqualsResult[4]); 241Assert.True(notEqualsToScalarResult[1]);
DataFrameTests.cs (1)
942Assert.True(bigInts[i]);
Microsoft.DotNet.XUnitAssert.Tests (1)
BooleanAssertsTests.cs (1)
83 var ex = Record.Exception(() => Assert.True(null));
Microsoft.Extensions.AI.Abstractions.Tests (2)
ChatCompletion\ChatOptionsTests.cs (2)
109Assert.True(options.AllowMultipleToolCalls); 127Assert.True(clone.AllowMultipleToolCalls);
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (2)
ChatTurnDetailsTests.cs (2)
140Assert.True(details.CacheHit); 182Assert.True(details.CacheHit);
Microsoft.ML.AutoML.Tests (2)
DatasetDimensionsTests.cs (2)
58Assert.True(dimensions[1].HasMissing); 89Assert.True(dimensions[1].HasMissing);
ServerComparison.FunctionalTests (1)
ResponseTests.cs (1)
160Assert.True(response.Headers.TransferEncodingChunked);
VBCSCompiler.UnitTests (1)
CompilerServerApiTest.cs (1)
106Assert.True(wasServerMutexOpen);