1981 references to True
Aspire.Components.Common.Tests (1)
ConformanceTests.cs (1)
133Assert.All(registeredNames, name => Assert.True(name.Contains(key1) || name.Contains(key2), $"{name} did not contain the key."));
Aspire.Dashboard.Components.Tests (1)
Layout\MainLayoutTests.cs (1)
121Assert.True(completedTask != messageShownTcs.Task, "No message bar should be displayed.");
Aspire.Dashboard.Tests (4)
ChannelExtensionsTests.cs (1)
152Assert.True(elapsed <= minReadInterval, $"Elapsed time {elapsed} should be less than min read interval {minReadInterval} on cancellation.");
CustomAssert.cs (1)
13Assert.True(duration >= minInterval.Subtract(TimeSpan.FromMilliseconds(30)), $"Elapsed time {duration} should be greater than min interval {minInterval}.");
Integration\OtlpGrpcServiceTests.cs (1)
286Assert.True(ex.StatusCode is StatusCode.Unavailable or StatusCode.Internal, "gRPC call fails without cert.");
TelemetryRepositoryTests\MetricsTests.cs (1)
622Assert.True(Enumerable.SequenceEqual(MemoryMarshal.ToEnumerable(key), scope.Attributes), "Key and attributes don't match.");
Aspire.EndToEnd.Tests (1)
IntegrationServicesTests.cs (1)
38Assert.True(response.IsSuccessStatusCode, responseContent);
Aspire.Hosting.Testing.Tests (1)
TestingBuilderTests.cs (1)
38Assert.True(File.Exists(testProjectAssemblyPath), $"TestProject.AppHost.dll not found at {testProjectAssemblyPath}.");
Aspire.Hosting.Tests (16)
Dashboard\TransportOptionsValidatorTests.cs (6)
45Assert.True(result.Succeeded, result.FailureMessage); 63Assert.True(result.Succeeded, result.FailureMessage); 81Assert.True(result.Succeeded, result.FailureMessage); 295Assert.True(result.Succeeded, result.FailureMessage); 311Assert.True(result.Succeeded, result.FailureMessage); 329Assert.True(result.Succeeded, result.FailureMessage);
Dcp\ApplicationExecutorTests.cs (4)
70Assert.True(spAnnList.Single(ann => ann.ServiceName == "CoolProgram").Port is null, 102Assert.True(spAnnList.Single(ann => ann.ServiceName == "CoolProgram").Port is null, 623Assert.True(spAnnList.Single(ann => ann.ServiceName == "ServiceA-NoPortNoTargetPort").Port is null, 668Assert.True(spAnnList.Single(ann => ann.ServiceName == "ServiceA-PortSetNoTargetPort").Port is null,
MSBuildTests.cs (3)
119Assert.True(process.WaitForExit(milliseconds: 180_000), "dotnet build command timed out after 3 minutes."); 120Assert.True(process.ExitCode == 0, $"Build failed: {Environment.NewLine}{output}"); 122Assert.True(outputDone.WaitOne(millisecondsTimeout: 60_000), "Timed out waiting for output to complete.");
ProjectResourceTests.cs (1)
192Assert.True(config.ContainsKey("OTEL_EXPORTER_OTLP_HEADERS"), "Config should have 'OTEL_EXPORTER_OTLP_HEADERS' header and doesn't.");
Schema\SchemaTests.cs (1)
682Assert.True(results.IsValid, string.Join(Environment.NewLine, errorMessages ?? ["Schema failed validation with no errors"]));
Utils\PasswordGeneratorTests.cs (1)
113Assert.True((exception is null), $"Password contains invalid chars: {password}");
Aspire.Playground.Tests (2)
AppHostTests.cs (2)
111Assert.True(HttpStatusCode.OK == response.StatusCode, $"Endpoint '{client.BaseAddress}{path.TrimStart('/')}' for resource '{resource}' in app '{Path.GetFileNameWithoutExtension(appHostPath)}' returned status code {response.StatusCode}"); 271Assert.True(HttpStatusCode.OK == response.StatusCode, $"Endpoint '{client.BaseAddress}{path.TrimStart('/')}' for resource 'consumer' in app '{Path.GetFileNameWithoutExtension(appHostPath)}' returned status code {response.StatusCode}");
Aspire.RabbitMQ.Client.Tests (1)
AspireRabbitMQLoggingTests.cs (1)
65Assert.True(logs.Length >= 2, "Should be at least 2 logs written.");
Aspire.Workload.Tests (6)
PerTestFrameworkTemplatesTests.cs (4)
69Assert.True(Directory.Exists(testProjectDir), $"Expected tests project at {testProjectDir}"); 72Assert.True(File.Exists(testProjectPath), $"Expected tests project file at {testProjectPath}"); 77Assert.True(Directory.Exists(testProjectDir), $"Expected tests project at {testProjectDir}"); 84Assert.True(res.ExitCode != 0, $"Expected the tests project run to fail");
TemplateTests.cs (1)
146Assert.True(res.ExitCode != 0, $"Expected the app run to fail");
WorkloadTestsBase.cs (1)
220Assert.True(Directory.Exists(testProjectDirectory), $"Expected tests project at {testProjectDirectory}");
BinaryFormatTests (2)
FormatTests\FormattedObject\BinaryFormattedTypes.cs (2)
20Assert.True(iSerializable || serializable, "Type should either implement ISerializable or be marked as [Serializable]"); 45Assert.True(
Binding.Http.IntegrationTests (9)
BasicHttpBindingTests.4.0.0.cs (6)
43Assert.True(result == testString, String.Format("Error: expected response from service: '{0}' Actual was: '{1}'", testString, result)); 83Assert.True(result, "Error: expected response from service: 'true' Actual was: 'false'"); 127Assert.True(handlerCalled, "Error: expected client to call intercepting handler"); 128Assert.True(result == testString, String.Format("Error: expected response from service: '{0}' Actual was: '{1}'", testString, result)); 185Assert.True(result == substituteString, String.Format("Error: expected response from service: '{0}' Actual was: '{1}'", testString, result)); 269Assert.True(userAgentHeaderSent, "User-Agent header should have been sent.");
NetHttpsBindingTests.4.1.0.cs (1)
38Assert.True(String.Equals(testString, result), String.Format("Expected result was {0}. Actual was {1}", testString, result));
OperationContextTests.cs (1)
39Assert.True(asyncFlowDisabled, "Async flow of Operation Context isn't disabled");
WSHttpBindingTests.cs (1)
34Assert.True(result == testString, String.Format("Error: expected response from service: '{0}' Actual was: '{1}'", testString, result));
Client.ChannelLayer.IntegrationTests (3)
DuplexChannelShapeTests.4.1.0.cs (1)
57Assert.True(String.Equals(expectedMessageID, actualMessageID), String.Format("Expected Message ID was {0}. Actual was {1}", expectedMessageID, actualMessageID));
DuplexChannelWithSynchronizationContext.cs (2)
155Assert.True(success, "Test Scenario: TypedProxy_AsyncBeginEnd_Call_WithSingleThreadedSyncContext timed out"); 220Assert.True(success, "Test Scenario: TypedProxy_AsyncBeginEnd_Call_WithSingleThreadedSyncContext timed out");
Client.ClientBase.IntegrationTests (79)
ChannelBaseTests.4.0.0.cs (10)
41Assert.True(String.Equals(echoText, result), 90Assert.True(String.Equals(expected, actual), 94Assert.True(String.Equals(expected, actual), 144Assert.True(String.Equals(expected, actual), 148Assert.True(String.Equals(expected, actual), 195Assert.True(eventsCalled.Count == 0, 199Assert.True(proxyEventsCalled.Count == 0, 245Assert.True(CommunicationState.Closed == client.State, 249Assert.True(CommunicationState.Closed == ((ICommunicationObject)serviceProxy).State, 253Assert.True(CommunicationState.Closed == factory.State,
ClientBaseTests.4.0.0.cs (46)
39Assert.True(property.SuppressEntityBody == false, "Expected SuppressEntityBody to be 'false'"); 42Assert.True(property.Headers.Count > 0, "TestHttpRequestMessageProperty.Headers should not have empty headers"); 86Assert.True(property.SuppressEntityBody == false, "Expected SuppressEntityBody to be 'false'"); 89Assert.True(property.Headers.Count > 0, "TestHttpRequestMessageProperty.Headers should not have empty headers"); 134Assert.True(data.BeforeSendRequestCalled, "BeforeSendRequest should have been called"); 135Assert.True(data.Request != null, "Did not call pass Request to BeforeSendRequest"); 136Assert.True(data.Channel != null, "Did not call pass Channel to BeforeSendRequest"); 137Assert.True(data.AfterReceiveReplyCalled, "AfterReceiveReplyCalled should have been called"); 138Assert.True(data.Reply != null, "Did not call pass Reply to AfterReceiveReplyCalled"); 219Assert.True(CommunicationState.Created == client.State, 222Assert.True(CommunicationState.Created == factory.State, 241Assert.True(CommunicationState.Opened == client.State, 244Assert.True(CommunicationState.Opened == factory.State, 247Assert.True(CommunicationState.Opened == ((ICommunicationObject)serviceProxy).State, 256Assert.True(CommunicationState.Closed == client.State, 260Assert.True(CommunicationState.Closed == ((ICommunicationObject)serviceProxy).State, 264Assert.True(CommunicationState.Closed == factory.State, 294Assert.True(CommunicationState.Created == client.State, 297Assert.True(CommunicationState.Created == factory.State, 317Assert.True(CommunicationState.Opened == client.State, 320Assert.True(CommunicationState.Opened == factory.State, 323Assert.True(CommunicationState.Opened == ((ICommunicationObject)serviceProxy).State, 333Assert.True(CommunicationState.Closed == client.State, 337Assert.True(CommunicationState.Closed == ((ICommunicationObject)serviceProxy).State, 341Assert.True(CommunicationState.Closed == factory.State, 373Assert.True(CommunicationState.Created == client.State, 376Assert.True(CommunicationState.Created == factory.State, 396Assert.True(CommunicationState.Opened == client.State, 399Assert.True(CommunicationState.Opened == factory.State, 402Assert.True(CommunicationState.Opened == ((ICommunicationObject)serviceProxy).State, 412Assert.True(CommunicationState.Closed == client.State, 416Assert.True(CommunicationState.Closed == ((ICommunicationObject)serviceProxy).State, 420Assert.True(CommunicationState.Closed == factory.State, 462Assert.True(CommunicationState.Closed == client.State, 466Assert.True(CommunicationState.Closed == ((ICommunicationObject)serviceProxy).State, 470Assert.True(CommunicationState.Closed == factory.State, 513Assert.True(CommunicationState.Closed == client.State, 517Assert.True(CommunicationState.Closed == ((ICommunicationObject)serviceProxy).State, 521Assert.True(CommunicationState.Closed == factory.State, 565Assert.True(String.Equals(expected, actual), 569Assert.True(String.Equals(expected, actual), 619Assert.True(String.Equals(expected, actual), 623Assert.True(String.Equals(expected, actual), 668Assert.True(eventsCalled.Count == 0, 672Assert.True(proxyEventsCalled.Count == 0, 799Assert.True(string.Empty == outofScopeResult, string.Format("Expect call out of the OperationContextScope does not have the custom header {0}", customHeaderName));
ClientBaseTests.4.1.0.cs (10)
30Assert.True(cookieManager != null, "cookieManager was null."); 31Assert.True(cookieManager.CookieContainer != null, "cookieManager.CookieContainer was null."); 43Assert.True(cookieSentOut == cookieSentBack, 73Assert.True(cookieManager != null, "cookieManager was null."); 74Assert.True(cookieManager.CookieContainer != null, "cookieManager.CookieContainer was null."); 86Assert.True(cookies != null, "cookies was null."); 89Assert.True(cookie != null, "cookie was null."); 94Assert.True(timeReturned != null, "timeReturned != null"); 95Assert.True(timeSetInCookie != null, "timeSetInCookie != null"); 96Assert.True(timeReturned == timeSetInCookie,
ClientBaseTests.4.4.0.cs (4)
38Assert.True(clientCredentials != null, "ClientCredentials should not be null"); 39Assert.True(clientCredentials.ClientCertificate != null, "ClientCredentials.ClientCertificate should not be null"); 40Assert.True(clientCredentials.ServiceCertificate != null, "ClientCredentials.ServiceCertificate should not be null"); 41Assert.True(clientCredentials.HttpDigest != null, "ClientCredentials.HttpDigest should not be null");
DuplexClientBaseTests.4.1.0.cs (1)
86Assert.True(guid == returnedGuid,
MessageInspectorTests.4.4.0.cs (8)
47Assert.True(String.Equals(result1.Result, expectedErrorDescription), String.Format("Expected Error Description: {0}/Actual Error Description: {1}", expectedErrorDescription, result2.Result)); 49Assert.True(returnedErrorCode.Equals(TestTypes.ErrorCode.UserNotAuthenticated), String.Format("Expected Error Code: {0}/nActual Error Code: {1}", TestTypes.ErrorCode.UserNotAuthenticated, returnedErrorCode)); 50Assert.True(result1.HttpStatusCode.Equals(System.Net.HttpStatusCode.Unauthorized), String.Format("Expected HttpStatusCode: {0}/nActual HttpStatusCode: {1}", System.Net.HttpStatusCode.Unauthorized, result2.HttpStatusCode)); 54Assert.True(String.Equals(result2.Result, expectedErrorDescription), String.Format("Expected Error Description: {0}/nActual Error Description: {1}", expectedErrorDescription, result2.Result)); 56Assert.True(returnedErrorCode.Equals(TestTypes.ErrorCode.Ok), String.Format("Expected Error Code: {0}/nActual Error Code: {1}", TestTypes.ErrorCode.Ok, returnedErrorCode)); 57Assert.True(result2.HttpStatusCode.Equals(System.Net.HttpStatusCode.OK), String.Format("Expected HttpStatusCode: {0}/nActual HttpStatusCode: {1}", System.Net.HttpStatusCode.OK, result2.HttpStatusCode)); 96Assert.True(String.Equals(authorizationHeaderValue, accessToken), String.Format("Expected Authorization Header value: {0}/nActual Authorization Header value: {1}", accessToken, authorizationHeaderValue)); 97Assert.True(String.Equals(authTypeHeaderValue, authType.ToString()), String.Format("Expected AuthType Header value: {0}/nActual AuthType Header value: {1}", authType.ToString(), authTypeHeaderValue));
Client.ExpectedExceptions.IntegrationTests (24)
ExpectedExceptionTests.4.0.0.cs (9)
49Assert.True(String.Equals(exception.Message, exceptionMsg), String.Format("Expected exception message: {0}\nActual exception message: {1}", exceptionMsg, exception.Message)); 96Assert.True((watch.ElapsedMilliseconds >= lowRange && watch.ElapsedMilliseconds <= highRange), 143Assert.True((watch.ElapsedMilliseconds >= lowRange && watch.ElapsedMilliseconds <= highRange), 179Assert.True(String.Equals(exception.Detail.Message, faultMsg), String.Format("Expected fault message: {0}\nActual fault message: {1}", faultMsg, exception.Detail.Message)); 214Assert.True(String.Equals(exception.Detail.Message, faultMsg), String.Format("Expected fault message: {0}\nActual fault message: {1}", faultMsg, exception.Detail.Message)); 354Assert.True((String.Equals("test", results[i])), 363Assert.True(toe == null, String.Format("Task [{0}] should not have failed with TimeoutException", i)); 367Assert.True(nFailures > 0, 379Assert.True(elapsedMs < expectedElapsedMs,
ExpectedExceptionTests.4.1.0.cs (15)
51Assert.True(exception.Message.Contains(nonExistentHost), string.Format("Expected exception message to contain: '{0}'\nThe exception message was: {1}", nonExistentHost, exception.Message)); 110Assert.True(result == "Success!", string.Format("Test Case failed, expected the returned string to be: {0}, instead it was: {1}", "Success!", result)); 184Assert.True(exception.Message.Contains(notFoundUrl), string.Format("Expected exception message to contain: '{0}'\nThe exception message was:{1}", notFoundUrl, exception.Message)); 222Assert.True(exception.Message.Contains(protocolExceptionUri), string.Format("Expected exception message to contain: '{0}'\nThe exception was: '{1}'", protocolExceptionUri, exception.Message)); 273Assert.True(String.Equals(exceptionCodeName, exception.Code.Name), String.Format("Expected exception code name: {0}\nActual exception code name: {1}", exceptionCodeName, exception.Code.Name)); 274Assert.True(String.Equals(exceptionReason, exception.Reason.GetMatchingTranslation().Text), String.Format("Expected exception reason: {0}\nActual exception reason: {1}", exceptionReason, exception.Reason.GetMatchingTranslation().Text)); 326Assert.True(String.Equals(exceptionCodeName, exception.Code.Name), String.Format("Expected exception code name: {0}\nActual exception code name: {1}", exceptionCodeName, exception.Code.Name)); 327Assert.True(String.Equals(exceptionReason, exception.Reason.GetMatchingTranslation().Text), String.Format("Expected exception reason: {0}\nActual exception reason: {1}", exceptionReason, exception.Reason.GetMatchingTranslation().Text)); 408Assert.True(exception.Message.Contains(Endpoints.Tcp_RevokedServerCertResource_HostName), 455Assert.True(exception.Message.Contains(Endpoints.Tcp_RevokedServerCertResource_HostName), 604Assert.True((String.Equals("test", results[i])), 613Assert.True(toe == null, String.Format("Task [{0}] should not have failed with TimeoutException", i)); 617Assert.True(nFailures > 0, 621Assert.True(nFailures < operationCount, 631Assert.True(elapsedMs < expectedElapsedMs,
Client.TypedClient.IntegrationTests (21)
TypedProxyTests.4.0.0.cs (18)
75Assert.True(success, "Test Scenario: TypedProxy_AsyncBeginEnd_Call_WithSingleThreadedSyncContext timed out"); 110Assert.True(success, "Test Scenario: TypedProxy_AsyncTask_Call_WithSingleThreadedSyncContext timed out"); 139Assert.True(String.Equals(result, "Hello"), String.Format("Expected response from Service: {0} Actual was: {1}", "Hello", result)); 163Assert.True(success, "Test Scenario: TypedProxy_Synchronous_Call_WithSingleThreadedSyncContext timed out"); 195Assert.True(startThread == Environment.CurrentManagedThreadId, String.Format("Expected continuation to happen on thread {0} but actually continued on thread {1}", 201Assert.True(success, String.Format("Test didn't complete within the expected time")); 202Assert.True(String.Equals(result, "Hello"), String.Format("Expected response from Service: {0} Actual was: {1}", "Hello", result)); 252Assert.True(String.Equals(replyMessageAction, action + "Response"), 261Assert.True(String.Equals(actualResponse, expectedResponse), 316Assert.True(String.Equals(replyMessageAction, action + "Response"), 325Assert.True(String.Equals(actualResponse, expectedResponse), 381Assert.True(String.Equals(replyMessageAction, action + "Response"), 390Assert.True(String.Equals(actualResponse, expectedResponse), 481Assert.True(success, String.Format("The AsyncCallback was not called. If the AsyncCallback had been called the waitEvent would have been set to 'True', but the value of waitEvent was: {0}", success)); 482Assert.True(String.Equals(result, "Hello"), String.Format("Expected response from Service: {0} Actual was: {1}", "Hello", result)); 517Assert.True(success, String.Format("The IAsyncResult was not called. If the IAsyncResult had been called the AsyncWaitHandle would have been set to 'True', but the value of AsyncWaitHandle was: {0}", success)); 523Assert.True(String.Equals(result, "Hello"), String.Format("Expected response from Service: {0} Actual was: {1}", "Hello", result)); 556Assert.True(String.Equals(result, "Hello"), String.Format("Expected response from Service: {0} Actual was: {1}", "Hello", result));
TypedProxyTests.4.1.0.cs (3)
29Assert.True(success, "Test Scenario: ServiceContract_TypedProxy_NetTcpBinding_AsyncBeginEnd_Call_WithSingleThreadedSyncContext timed out"); 44Assert.True(success, "Test Scenario: ServiceContract_TypedProxy__NetTcpBinding_AsyncTask_Call_WithSingleThreadedSyncContext timed out"); 75Assert.True(guid == returnedGuid, String.Format("The sent GUID does not match the returned GUID. Sent: {0} Received: {1}", guid, returnedGuid));
Contract.Data.IntegrationTests (9)
DataContractTests.4.0.0.cs (3)
43Assert.True(response != null, "GetDataUsingDataContract(request) returned null"); 45Assert.True(String.Equals(response.StringValue, expectedStringValue), String.Format("Expected CompositeType.StringValue \"{0}\", actual was \"{1}\"", 47Assert.True(response.BoolValue == request.BoolValue, String.Format("Expected CompositeType.BoolValue \"{0}\", actual was \"{1}\"",
DataContractTests.4.1.0.cs (2)
40Assert.True((guid == returnedType.GuidValue), String.Format("The Guid sent was not the same as the Guid returned.\nSent: {0}\nReturned: {1}", guid, returnedType.GuidValue)); 78Assert.True((guid.ToString() == returnedType.StringValue), String.Format("The Guid to string value sent was not the same as what was returned.\nSent: {0}\nReturned: {1}", guid.ToString(), returnedType.StringValue));
DataContractTests.4.1.1.cs (4)
42Assert.True(manager.GetType() == (typeof(Manager)), string.Format("Expected type: {0}, Actual type: {1}", typeof(Manager), manager.GetType())); 43Assert.True(((Manager)manager).Name == "jone", string.Format("Expected Name: {0}, Actual Name: {1}", "jone", ((Manager)manager).Name)); 44Assert.True(((Manager)manager).Age == "10", string.Format("Expected Age: {0}, Actual Age: {1}", "10", ((Manager)manager).Age)); 45Assert.True(((Manager)manager).OfficeId == 1, string.Format("Expected Id: {0}, Actual Id: {1}", 1, ((Manager)manager).OfficeId));
Contract.Fault.IntegrationTests (11)
FaultExceptionTests.4.0.0.cs (7)
45Assert.True(String.Equals(exception.Detail.Message, faultMsg), String.Format("Expected Fault Message: {0}, actual: {1}", faultMsg, exception.Detail.Message)); 79Assert.True(String.Equals(exception.Detail.Message, faultMsg), String.Format("Expected Fault Message: {0}, actual: {1}", faultMsg, exception.Detail.Message)); 251Assert.True(input.Length == response.Length, String.Format("Expected {0} response items but actual was {1}", input.Length, response.Length)); 252Assert.True(response[0] != null, "Expected response item to be FaultDetail, but actual was null"); 253Assert.True(response[0].GetType() == typeof(FaultDetail), String.Format("Expected response item to be FaultDetail but actual was {0}", response[0].GetType())); 254Assert.True(response[1] != null, "Expected response item to be KnownTypeA, but actual was null"); 255Assert.True(response[1].GetType() == typeof(KnownTypeA), String.Format("Expected response item to be FaultDetail2 but actual was {0}", response[1].GetType()));
FaultExceptionTests.cs (4)
42Assert.True(TestFaultContractInfosBehavior.testFaultWithKnownTypeClientOp != null, "Expected testFaultWithKnownTypeClientOp is NOT null"); 43Assert.True(TestFaultContractInfosBehavior.testFaultWithKnownTypeClientOp.FaultContractInfos.Count == 1, string.Format("expected FaultContractInfos count is 1, actual: {0}", TestFaultContractInfosBehavior.testFaultWithKnownTypeClientOp.FaultContractInfos.Count)); 44Assert.True(TestFaultContractInfosBehavior.testFaultWithKnownTypeClientOp.FaultContractInfos[0].Action == action, string.Format("expected FaultContractInfo Action is {0}, actual: {1}", action, TestFaultContractInfosBehavior.testFaultWithKnownTypeClientOp.FaultContractInfos[0].Action)); 45Assert.True(TestFaultContractInfosBehavior.testFaultWithKnownTypeClientOp.FaultContractInfos[0].Detail == detail, string.Format("expected FaultContractInfo Detail is {0}, actual: {1}", detail.ToString(), TestFaultContractInfosBehavior.testFaultWithKnownTypeClientOp.FaultContractInfos[0].Detail.ToString()));
Contract.Message.IntegrationTests (21)
MessageContractTests.4.1.0.cs (11)
25Assert.True(reader.LocalName.Equals(wrapperName), 28Assert.True(reader.NamespaceURI.Equals(MessageContractConstants.wrapperNamespace), 58Assert.True(reader.LocalName.Equals(wrapperName), 63Assert.True(reader.LocalName.Equals(MessageContractConstants.dateElementName), 70Assert.True(reader.LocalName.Equals(MessageContractConstants.transactionElementName), 77Assert.True(reader.LocalName.Equals(MessageContractConstants.customerElementName), 85Assert.True(reader.IsStartElement() == false && reader.LocalName.Equals(wrapperName), 115Assert.True(elementFound, 133Assert.True(header != null, "There's no header in the message."); 134Assert.True(header.MustUnderstand, "Expected MustUnderstand to be true, but it was false."); 151Assert.True(header != null, "There's no header in the message.");
MessageContractTests.4.4.0.cs (8)
43Assert.True(String.Equals(requestData.accountName, replyData.accountName), 47Assert.True(requestData.amount == replyData.amount, 51Assert.True(String.Equals(requestData.requestSingleValue, replyData.replySingleValue), 71Assert.True(array2 != null, 74Assert.True(array1.Length == array2.Length, 80Assert.True(array1[i] == array2[i], 109Assert.True(response != null, 112Assert.True(String.Equals(testString, response.TestResult),
MessageTests.4.0.0.cs (2)
50Assert.True(string.Equals(actualResponse, expectedResponse), 93Assert.True(result == expectedResult, string.Format("Error: expected response from service: '{0}' Actual was: '{1}'", expectedResult, result));
Contract.Service.IntegrationTests (45)
ServiceContractTests.4.0.0.cs (19)
49Assert.True(waitEvent.WaitOne(ScenarioTestHelpers.TestTimeout), "AsyncCallback was not called."); 50Assert.True((number == message.Count<char>()), String.Format("The local int variable was not correctly set, expected {0} but got {1}", message.Count<char>(), number)); 96Assert.True(waitEvent.WaitOne(ScenarioTestHelpers.TestTimeout), "AsyncCallback was not called."); 97Assert.True((uniqueType.stringValue == message), 142Assert.True(waitEvent.WaitOne(ScenarioTestHelpers.TestTimeout), "AsyncCallback was not called."); 143Assert.True((number == message.Count<char>()), 190Assert.True(waitEvent.WaitOne(ScenarioTestHelpers.TestTimeout), "AsyncCallback was not called."); 191Assert.True((uniqueType.stringValue == message), 229Assert.True((uniqueType.stringValue == message), 237Assert.True((uniqueType.stringValue == message), 275Assert.True((uniqueType.stringValue == message), 311Assert.True(factory.State == CommunicationState.Opened, 339Assert.True(success, "Test Scenario: BasicHttp_Async_Open_ChannelFactory_WithSingleThreadedSyncContext timed-out."); 365Assert.True(proxyAsCommunicationObject.State == CommunicationState.Opened, 392Assert.True(success, "Test Scenario: BasicHttp_Async_Open_Proxy_WithSingleThreadedSyncContext timed-out."); 420Assert.True(factory.State == CommunicationState.Closed, 443Assert.True(success, "Test Scenario: BasicHttp_Async_Close_ChannelFactory_WithSingleThreadedSyncContext timed-out."); 469Assert.True(proxyAsCommunicationObject.State == CommunicationState.Closed, 493Assert.True(success, "Test Scenario: BasicHttp_Async_Close_Proxy_WithSingleThreadedSyncContext timed-out.");
ServiceContractTests.4.1.0.cs (26)
213Assert.True(success, "Test Scenario: BasicHttp_DefaultSettings_Echo_RoundTrips_String_Streamed_WithSingleThreadedSyncContext timed-out."); 227Assert.True(success, "Test Scenario: BasicHttp_DefaultSettings_Echo_RoundTrips_String_Streamed_Async_WithSingleThreadedSyncContext timed-out."); 617Assert.True(success, "Test Scenario: NetTcp_NoSecurity_String_Streamed_RoundTrips_WithSingleThreadedSyncContext timed-out."); 631Assert.True(success, "Test Scenario: NetTcp_NoSecurity_Streamed_Async_RoundTrips_String_WithSingleThreadedSyncContext timed-out."); 657Assert.True(string.Equals(result, "Hello " + echoString), String.Format("Expected response from Service: {0} Actual was: {1}", "Hello " + echoString, result)); 702Assert.True(factory.State == CommunicationState.Closed, 733Assert.True(exception1 != null || actualEcho1 != null, "First operation should have thrown Exception or returned an echo"); 734Assert.True(exception2 != null || actualEcho2 != null, "Second operation should have thrown Exception or returned an echo"); 736Assert.True(actualEcho1 == null || String.Equals(expectedEcho1, actualEcho1), 739Assert.True(actualEcho2 == null || String.Equals(expectedEcho2, actualEcho2), 742Assert.True(((ICommunicationObject)serviceProxy1).State == CommunicationState.Closed, 744Assert.True(((ICommunicationObject)serviceProxy2).State == CommunicationState.Closed, 792Assert.True(factory.State == CommunicationState.Closed, 823Assert.True(exception1 != null || actualEcho1 != null, "First operation should have thrown Exception or returned an echo"); 824Assert.True(exception2 != null || actualEcho2!= null, "Second operation should have thrown Exception or returned an echo"); 826Assert.True(actualEcho1 == null || String.Equals(expectedEcho1, actualEcho1), 829Assert.True(actualEcho2 == null || String.Equals(expectedEcho2, actualEcho2), 832Assert.True(((ICommunicationObject)serviceProxy1).State == CommunicationState.Closed, 834Assert.True(((ICommunicationObject)serviceProxy2).State == CommunicationState.Closed, 883Assert.True(factory.State == CommunicationState.Closed, 914Assert.True(exception1 != null || actualEcho1 != null, "First operation should have thrown Exception or returned an echo"); 915Assert.True(exception2 != null || actualEcho2 != null, "Second operation should have thrown Exception or returned an echo"); 917Assert.True(actualEcho1 == null || String.Equals(expectedEcho1, actualEcho1), 920Assert.True(actualEcho2 == null || String.Equals(expectedEcho2, actualEcho2), 923Assert.True(((ICommunicationObject)serviceProxy1).State == CommunicationState.Closed, 925Assert.True(((ICommunicationObject)serviceProxy2).State == CommunicationState.Closed,
Contract.XmlSerializer.IntegrationTests (4)
XmlSerializerFormatTest.cs (4)
90Assert.True(fException.Detail.UsedDataContractSerializer, "The returning Fault Detail should have used the Data Contract Serializer."); 91Assert.True(fException.Detail.UsedXmlSerializer == false, "The returning Fault Detail should NOT have used the Xml Serializer."); 112Assert.True(fException.Detail.UsedDataContractSerializer == false, "The returning Fault Detail should NOT have used the Data Contract Serializer."); 113Assert.True(fException.Detail.UsedXmlSerializer, "The returning Fault Detail should have used the Xml Serializer.");
dotnet-svcutil.xmlserializer.IntegrationTests (5)
src\System.Private.ServiceModel\tests\Scenarios\Contract\XmlSerializer\XmlSerializerFormatTest.cs (5)
61Assert.True(method != null, $"No method named {s_serializationModeSetterName}"); 90Assert.True(fException.Detail.UsedDataContractSerializer, "The returning Fault Detail should have used the Data Contract Serializer."); 91Assert.True(fException.Detail.UsedXmlSerializer == false, "The returning Fault Detail should NOT have used the Xml Serializer."); 112Assert.True(fException.Detail.UsedDataContractSerializer == false, "The returning Fault Detail should NOT have used the Data Contract Serializer."); 113Assert.True(fException.Detail.UsedXmlSerializer, "The returning Fault Detail should have used the Xml Serializer.");
dotnet-svcutil-lib.Tests (36)
E2ETests.cs (8)
42Assert.True(Directory.Exists(this_TestGroupOutputDir), $"{nameof(this_TestGroupOutputDir)} is not initialized!"); 43Assert.True(Directory.Exists(this_TestGroupBaselinesDir), $"{nameof(this_TestGroupBaselinesDir)} is not initialized!"); 179Assert.True(File.Exists(wsdlFile), $"{wsdlFile} not initialized!"); 234Assert.True(result.ExitCode == 0, result.OutputText); 237Assert.True(File.Exists(binProjPath), $"{nameof(binProjPath)} not initialized!"); 238Assert.True(File.Exists(libProjPath), $"{nameof(libProjPath)} not initialized!"); 245Assert.True(ret.ExitCode == 0, ret.OutputText); 368Assert.True(File.Exists(srcParamsFilePath), $"{nameof(srcParamsFilePath)} not initialized!");
FileUtil.cs (1)
15Assert.True(dir.Exists, "Can't copy nonexistant directory.");
GlobalToolTests.cs (1)
159Assert.True(ret.ExitCode == 0, ret.OutputText);
ProjectUtils.cs (5)
68Assert.True(success, $"Could not add tool package dependency: dotnet-svcutil-lib.{svcutilPkgVersion}"); 73Assert.True(ret.ExitCode == 0, $"Project package restore failed:{Environment.NewLine}{ret.OutputText}{logger}"); 78Assert.True(ret.ExitCode == 0, $"Project build failed:{Environment.NewLine}{ret.OutputText}{logger}"); 87Assert.True(File.Exists(project?.FullPath), $"{nameof(project)} is not initialized!"); 175Assert.True(File.Exists(project?.FullPath), $"{nameof(project)} is not initialized!");
TestInit.cs (18)
155Assert.True(Directory.Exists(g_RepositoryRoot), $"{nameof(g_RepositoryRoot)} is not initialized!"); 156Assert.True(Directory.Exists(g_TestCasesDir), $"{nameof(g_TestCasesDir)} is not initialized!"); 157Assert.True(Directory.Exists(g_TestResultsDir), $"{nameof(g_TestResultsDir)} is not initialized!"); 158Assert.True(Directory.Exists(g_TestBootstrapDir), $"{nameof(g_TestBootstrapDir)} is not initialized!"); 159Assert.True(Directory.Exists(g_TestOutputDir), $"{nameof(g_TestOutputDir)} is not initialized!"); 160Assert.True(Directory.Exists(g_BaselinesDir), $"{nameof(g_BaselinesDir)} is not initialized!"); 167Assert.True(File.Exists(g_StarterProject.FullPath), $"{nameof(g_StarterProject)} is not initialized!"); 184Assert.True(Directory.GetFiles(pkgPath, "dotnet-svcutil-lib.*.nupkg").Any(), $"dotnet-svcutil-lib*.nupkg not found under {pkgPath}!"); 277Assert.True(Directory.Exists(this_TestCaseOutputDir), $"{nameof(this_TestGroupOutputDir)} is not initialized!"); 278Assert.True(Directory.Exists(this_TestCaseBaselinesDir), $"{nameof(this_TestCaseBaselinesDir)} is not initialized!"); 279Assert.True(this_TestCaseBootstrapDir != null, $"{nameof(this_TestCaseBootstrapDir)} is not initialized!"); 280Assert.True(this_TestCaseLogger != null, $"{nameof(this_TestGroupOutputDir)} is not initialized!"); 281Assert.True(this_FixupUtil != null, $"{nameof(this_FixupUtil)} is not initialized!"); 337Assert.True(isTestSucess, $"{Environment.NewLine}Test failed:{Environment.NewLine}{outputText}{g_GeneralErrMsg}"); 343Assert.True(validationSuccess, $"{Environment.NewLine}Test failed validation!{failureMessage}{g_GeneralErrMsg}"); 540Assert.True(Directory.Exists(vstestDir), $"{nameof(vstestDir)} is not initialized!"); 551Assert.True(nugetFiles.Length <= 1, "There should be one and only one nuget package for testing."); 590Assert.True(rootSolutionFolder != null && File.Exists(rootSolutionFolder), $"Unable to find dotnet-svcutil.sln file, current dir: {parentDir}");
UnitTest.cs (3)
275Assert.True(ValidateOutputs(options, out var failureMessage), failureMessage); 312Assert.True(ValidateOutputs(options, out var failureMessage), failureMessage); 339Assert.True(ValidateJson(options, jsonFileSrcPath, out errorMessage), errorMessage);
Encoding.Encoders.IntegrationTests (3)
BinaryEncodingTests.4.0.0.cs (2)
40Assert.True(String.Equals(result, testString), String.Format(" Error: expected response from service: '{0}' Actual was: '{1}'", testString, result)); 79Assert.True(compositeObject.Equals(result), String.Format(" Error: expected response from service: '{0}' Actual was: '{1}'", compositeObject, result));
TextEncodingTests.4.0.0.cs (1)
40Assert.True(String.Equals(result, testString), String.Format(" Error: expected response from service: '{0}' Actual was: '{1}'", testString, result));
Encoding.MessageVersion.IntegrationTests (7)
MessageVersionTests.4.0.0.cs (2)
39Assert.True(String.Equals(result, testString), String.Format(" Error: expected response from service: '{0}' Actual was: '{1}'", testString, result)); 75Assert.True(String.Equals(result, testString), String.Format(" Error: expected response from service: '{0}' Actual was: '{1}'", testString, result));
MessageVersionTests.cs (5)
39Assert.True(String.Equals(result, testString), String.Format(" Error: expected response from service: '{0}' Actual was: '{1}'", testString, result)); 75Assert.True(String.Equals(result, testString), String.Format(" Error: expected response from service: '{0}' Actual was: '{1}'", testString, result)); 111Assert.True(String.Equals(result, testString), String.Format(" Error: expected response from service: '{0}' Actual was: '{1}'", testString, result)); 147Assert.True(String.Equals(result, testString), String.Format(" Error: expected response from service: '{0}' Actual was: '{1}'", testString, result)); 183Assert.True(String.Equals(result, testString), String.Format(" Error: expected response from service: '{0}' Actual was: '{1}'", testString, result));
Extensibility.MessageEncoder.IntegrationTests (2)
TextTests.4.1.0.cs (2)
114Assert.True(streamLength == ms.Length, 120Assert.True(requestBytes.SequenceEqual(returnedByteArraySegment.Array), "Returned bytes are different than sent bytes");
Extensibility.WebSockets.IntegrationTests (29)
WebSocketTests.4.1.0.cs (29)
76Assert.True(clientReceiver.ReceiveStreamInvoked.WaitOne(ScenarioTestHelpers.TestTimeout), 88Assert.True(clientReceiver.ReceiveStreamCompleted.WaitOne(ScenarioTestHelpers.TestTimeout), 94Assert.True(clientReceiver.LogReceived.WaitOne(ScenarioTestHelpers.TestTimeout), 98Assert.True(clientReceiver.ServerLog.Count > 0, 151Assert.True(clientReceiver.ReceiveDataInvoked.WaitOne(ScenarioTestHelpers.TestTimeout), 156Assert.True(clientReceiver.ReceiveDataCompleted.WaitOne(ScenarioTestHelpers.TestTimeout), 162Assert.True(clientReceiver.LogReceived.WaitOne(ScenarioTestHelpers.TestTimeout), 166Assert.True(clientReceiver.ServerLog.Count > 0, 219Assert.True(clientReceiver.ReceiveDataInvoked.WaitOne(ScenarioTestHelpers.TestTimeout), 224Assert.True(clientReceiver.ReceiveDataCompleted.WaitOne(ScenarioTestHelpers.TestTimeout), 230Assert.True(clientReceiver.LogReceived.WaitOne(ScenarioTestHelpers.TestTimeout), 234Assert.True(clientReceiver.ServerLog.Count > 0, 308Assert.True(clientReceiver.ReceiveStreamInvoked.WaitOne(ScenarioTestHelpers.TestTimeout), 320Assert.True(clientReceiver.ReceiveStreamCompleted.WaitOne(ScenarioTestHelpers.TestTimeout), 326Assert.True(clientReceiver.LogReceived.WaitOne(ScenarioTestHelpers.TestTimeout), 330Assert.True(clientReceiver.ServerLog.Count > 0, 386Assert.True(clientReceiver.ReceiveDataInvoked.WaitOne(ScenarioTestHelpers.TestTimeout), 391Assert.True(clientReceiver.ReceiveDataCompleted.WaitOne(ScenarioTestHelpers.TestTimeout), 397Assert.True(clientReceiver.LogReceived.WaitOne(ScenarioTestHelpers.TestTimeout), 401Assert.True(clientReceiver.ServerLog.Count > 0, 467Assert.True(!ScenarioTestHelpers.IsLocalHost() || !serverLogItem.Contains(ScenarioTestHelpers.RemoteEndpointMessagePropertyFailure), serverLogItem); 521Assert.True(!ScenarioTestHelpers.IsLocalHost() || !serverLogItem.Contains(ScenarioTestHelpers.RemoteEndpointMessagePropertyFailure), serverLogItem); 575Assert.True(!ScenarioTestHelpers.IsLocalHost() || !serverLogItem.Contains(ScenarioTestHelpers.RemoteEndpointMessagePropertyFailure), serverLogItem); 630Assert.True(!ScenarioTestHelpers.IsLocalHost() || !serverLogItem.Contains(ScenarioTestHelpers.RemoteEndpointMessagePropertyFailure), serverLogItem); 687Assert.True(!ScenarioTestHelpers.IsLocalHost() || !serverLogItem.Contains(ScenarioTestHelpers.RemoteEndpointMessagePropertyFailure), serverLogItem); 728Assert.True(guid == returnedGuid, string.Format("The sent GUID does not match the returned GUID. Sent '{0}', Received: '{1}'", guid, returnedGuid)); 768Assert.True(guid == returnedGuid, string.Format("The sent GUID does not match the returned GUID. Sent '{0}', Received: '{1}'", guid, returnedGuid)); 811Assert.True(guid == returnedGuid, 851Assert.True(responseFromService, String.Format("Response from the service was not expected. Expected: 'True' but got {0}", responseFromService));
IIS.Common.TestLib (1)
TestConnections.cs (1)
169Assert.True(task.Wait(4000), "timeout");
IIS.FunctionalTests (9)
Http2TrailersResetTests.cs (2)
118Assert.True(response.Content.Headers.TryGetValues(HeaderNames.ContentLength, out var contentLength), HeaderNames.ContentLength); 136Assert.True(response.Content.Headers.TryGetValues(HeaderNames.ContentLength, out var contentLength), HeaderNames.ContentLength);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (3)
45Assert.True(matchedEntries is not null, $"Regex {expectedRegexMatchString[i]} was not found."); 86Assert.True(matchedEntries.Length > 0, $"No entries matched by '{regexString}'"); 87Assert.True(allowMultiple || matchedEntries.Length < 2, $"Multiple entries matched by '{regexString}': {FormatEntries(matchedEntries)}");
src\Servers\IIS\IIS\test\Common.FunctionalTests\LoggingTests.cs (2)
322Assert.True(processIdMatch.Success, $"'{processIdPattern}' did not match '{aspnetcorev2Log}'"); 357Assert.True(prefixMatch.Success, $"'{prefixPattern}' did not match '{log}'");
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (2)
108Assert.True(string.Equals(400, response.Status), i.ToString("X2", CultureInfo.InvariantCulture) + ";" + response); 119Assert.True(string.Equals(400, response.Status), i.ToString("X2", CultureInfo.InvariantCulture) + ";" + response);
IIS.LongTests (5)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (3)
45Assert.True(matchedEntries is not null, $"Regex {expectedRegexMatchString[i]} was not found."); 86Assert.True(matchedEntries.Length > 0, $"No entries matched by '{regexString}'"); 87Assert.True(allowMultiple || matchedEntries.Length < 2, $"Multiple entries matched by '{regexString}': {FormatEntries(matchedEntries)}");
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (2)
420Assert.True(statusCode == 200 || statusCode == 503, "Status code was " + statusCode); 577Assert.True(statusCode == 200 || statusCode == 503, "Status code was " + statusCode);
IIS.NewHandler.FunctionalTests (5)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (3)
45Assert.True(matchedEntries is not null, $"Regex {expectedRegexMatchString[i]} was not found."); 86Assert.True(matchedEntries.Length > 0, $"No entries matched by '{regexString}'"); 87Assert.True(allowMultiple || matchedEntries.Length < 2, $"Multiple entries matched by '{regexString}': {FormatEntries(matchedEntries)}");
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (2)
420Assert.True(statusCode == 200 || statusCode == 503, "Status code was " + statusCode); 577Assert.True(statusCode == 200 || statusCode == 503, "Status code was " + statusCode);
IIS.NewShim.FunctionalTests (5)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (3)
45Assert.True(matchedEntries is not null, $"Regex {expectedRegexMatchString[i]} was not found."); 86Assert.True(matchedEntries.Length > 0, $"No entries matched by '{regexString}'"); 87Assert.True(allowMultiple || matchedEntries.Length < 2, $"Multiple entries matched by '{regexString}': {FormatEntries(matchedEntries)}");
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (2)
420Assert.True(statusCode == 200 || statusCode == 503, "Status code was " + statusCode); 577Assert.True(statusCode == 200 || statusCode == 503, "Status code was " + statusCode);
IIS.ShadowCopy.Tests (5)
ShadowCopyTests.cs (2)
231Assert.True(Directory.Exists(Path.Combine(directory.DirectoryPath, "2")), "Expected 2 shadow copy directory"); 273Assert.True(Directory.Exists(Path.Combine(directory.DirectoryPath, "11")), "Expected 11 shadow copy directory");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (3)
45Assert.True(matchedEntries is not null, $"Regex {expectedRegexMatchString[i]} was not found."); 86Assert.True(matchedEntries.Length > 0, $"No entries matched by '{regexString}'"); 87Assert.True(allowMultiple || matchedEntries.Length < 2, $"Multiple entries matched by '{regexString}': {FormatEntries(matchedEntries)}");
IIS.Tests (8)
TlsHandshakeFeatureTests.cs (8)
33Assert.True(protocol > SslProtocols.None, "Protocol: " + protocol); 34Assert.True(Enum.IsDefined(typeof(SslProtocols), protocol), "Defined: " + protocol); // Mapping is required, make sure it's current 37Assert.True(cipherAlgorithm > CipherAlgorithmType.Null, "Cipher: " + cipherAlgorithm); 40Assert.True(cipherStrength > 0, "CipherStrength: " + cipherStrength); 43Assert.True(hashAlgorithm >= HashAlgorithmType.None, "HashAlgorithm: " + hashAlgorithm); 46Assert.True(hashStrength >= 0, "HashStrength: " + hashStrength); // May be 0 for some algorithms 49Assert.True(keyExchangeAlgorithm >= ExchangeAlgorithmType.None, "KeyExchangeAlgorithm: " + keyExchangeAlgorithm); 52Assert.True(keyExchangeStrength >= 0, "KeyExchangeStrength: " + keyExchangeStrength);
IISExpress.FunctionalTests (10)
InProcess\IISExpressShutdownTests.cs (1)
57Assert.True(statusCode == 200 || statusCode == 503, "Status code was " + statusCode);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (3)
45Assert.True(matchedEntries is not null, $"Regex {expectedRegexMatchString[i]} was not found."); 86Assert.True(matchedEntries.Length > 0, $"No entries matched by '{regexString}'"); 87Assert.True(allowMultiple || matchedEntries.Length < 2, $"Multiple entries matched by '{regexString}': {FormatEntries(matchedEntries)}");
src\Servers\IIS\IIS\test\Common.FunctionalTests\LoggingTests.cs (2)
322Assert.True(processIdMatch.Success, $"'{processIdPattern}' did not match '{aspnetcorev2Log}'"); 357Assert.True(prefixMatch.Success, $"'{prefixPattern}' did not match '{log}'");
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (2)
108Assert.True(string.Equals(400, response.Status), i.ToString("X2", CultureInfo.InvariantCulture) + ";" + response); 119Assert.True(string.Equals(400, response.Status), i.ToString("X2", CultureInfo.InvariantCulture) + ";" + response);
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (2)
420Assert.True(statusCode == 200 || statusCode == 503, "Status code was " + statusCode); 577Assert.True(statusCode == 200 || statusCode == 503, "Status code was " + statusCode);
Infrastructure.IntegrationTests (4)
OSAndFrameworkTests.4.1.1.cs (4)
16Assert.True(FrameworkHelper.Current != FrameworkID.None, 25Assert.True(OSHelper.Current != OSID.None, 40Assert.True(formatted.Contains("NetCore") && formatted.Contains("NetNative"), 51Assert.True(formatted.Contains("Windows_7") && formatted.Contains("Ubuntu"),
InMemory.FunctionalTests (49)
ChunkedRequestTests.cs (18)
241Assert.True(request.SupportsTrailers(), "SupportsTrailers"); 248Assert.True(request.SupportsTrailers(), "SupportsTrailers"); 256Assert.True(request.SupportsTrailers(), "SupportsTrailers"); 271Assert.True(request.SupportsTrailers(), "SupportsTrailers"); 272Assert.True(request.CheckTrailersAvailable(), "CheckTrailersAvailable"); 279Assert.True(request.SupportsTrailers(), "SupportsTrailers"); 280Assert.True(request.CheckTrailersAvailable(), "CheckTrailersAvailable"); 287Assert.True(request.SupportsTrailers(), "SupportsTrailers"); 288Assert.True(request.CheckTrailersAvailable(), "CheckTrailersAvailable"); 367Assert.True(request.SupportsTrailers(), "SupportsTrailers"); 374Assert.True(request.SupportsTrailers(), "SupportsTrailers"); 382Assert.True(request.SupportsTrailers(), "SupportsTrailers"); 402Assert.True(request.SupportsTrailers(), "SupportsTrailers"); 403Assert.True(request.CheckTrailersAvailable(), "CheckTrailersAvailable"); 410Assert.True(request.SupportsTrailers(), "SupportsTrailers"); 411Assert.True(request.CheckTrailersAvailable(), "CheckTrailersAvailable"); 418Assert.True(request.SupportsTrailers(), "SupportsTrailers"); 419Assert.True(request.CheckTrailersAvailable(), "CheckTrailersAvailable");
Http2\Http2StreamTests.cs (1)
2308Assert.True(context.Response.SupportsTrailers(), "SupportsTrailers");
Http2\Http2TestBase.cs (7)
206Assert.True(context.Request.SupportsTrailers(), "SupportsTrailers"); 215Assert.True(context.Request.SupportsTrailers(), "SupportsTrailers"); 216Assert.True(context.Request.CheckTrailersAvailable(), "SupportsTrailers"); 902Assert.True(padLength >= payloadLength, $"{nameof(padLength)} must be greater than or equal to {nameof(payloadLength)} to create an invalid frame."); 1055Assert.True(padLength >= frameLength, $"{nameof(padLength)} must be greater than or equal to {nameof(frameLength)} to create an invalid frame."); 1360Assert.True(_receivedHeaders.TryGetValue(HeaderNames.Host, out var host), header.Key); 1373Assert.True(_receivedHeaders.TryGetValue(header.Key, out var value), header.Key);
Http3\Http3ConnectionTests.cs (1)
811Assert.True(requestStream.Disposed, "Request is complete and should be disposed.");
HttpsConnectionMiddlewareTests.cs (15)
148Assert.True(tlsFeature.Protocol > SslProtocols.None, "Protocol"); 149Assert.True(tlsFeature.NegotiatedCipherSuite >= TlsCipherSuite.TLS_NULL_WITH_NULL_NULL, "NegotiatedCipherSuite"); 150Assert.True(tlsFeature.CipherAlgorithm > CipherAlgorithmType.Null, "Cipher"); 151Assert.True(tlsFeature.CipherStrength > 0, "CipherStrength"); 152Assert.True(tlsFeature.HashAlgorithm >= HashAlgorithmType.None, "HashAlgorithm"); // May be None on Linux. 153Assert.True(tlsFeature.HashStrength >= 0, "HashStrength"); // May be 0 for some algorithms 154Assert.True(tlsFeature.KeyExchangeAlgorithm >= ExchangeAlgorithmType.None, "KeyExchangeAlgorithm"); // Maybe None on Windows 7 155Assert.True(tlsFeature.KeyExchangeStrength >= 0, "KeyExchangeStrength"); // May be 0 on mac 185Assert.True(tlsFeature.Protocol > SslProtocols.None, "Protocol"); 186Assert.True(tlsFeature.CipherAlgorithm > CipherAlgorithmType.Null, "Cipher"); 187Assert.True(tlsFeature.CipherStrength > 0, "CipherStrength"); 188Assert.True(tlsFeature.HashAlgorithm >= HashAlgorithmType.None, "HashAlgorithm"); // May be None on Linux. 189Assert.True(tlsFeature.HashStrength >= 0, "HashStrength"); // May be 0 for some algorithms 190Assert.True(tlsFeature.KeyExchangeAlgorithm >= ExchangeAlgorithmType.None, "KeyExchangeAlgorithm"); // Maybe None on Windows 7 191Assert.True(tlsFeature.KeyExchangeStrength >= 0, "KeyExchangeStrength"); // May be 0 on mac
HttpsTests.cs (4)
192Assert.True(loggerProvider.ErrorLogger.ErrorMessages.Count == 0, 221Assert.True(loggerProvider.ErrorLogger.ErrorMessages.Count == 0, 743Assert.True(onAuthenticateCalled, "onAuthenticateCalled"); 782Assert.True(onAuthenticateCalled, "onAuthenticateCalled");
KestrelMetricsTests.cs (1)
37Assert.True(hasValue || value == null, $"ConnectionEndReason '{reason}' doesn't have a mapping.");
ResponseTests.cs (1)
2101Assert.True(foundMessage, "Expected log not found");
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (1)
809Assert.True(
InteractiveHost.UnitTests (8)
AbstractInteractiveHostTests.cs (1)
169Assert.True(false, @$"
InteractiveHostDesktopTests.cs (7)
206Assert.True(errorOut.StartsWith(file + "(1,3):", StringComparison.Ordinal), "Error output should start with file name, line and column"); 207Assert.True(errorOut.Contains("CS1002"), "Error output should include error CS1002"); 262Assert.True(errorOut.StartsWith(typeof(Process).Assembly.Location + "(1,3):", StringComparison.Ordinal), "Error output should start with file name, line and column"); 263Assert.True(errorOut.Contains("CS1056"), "Error output should include error CS1056"); 264Assert.True(errorOut.Contains("CS1002"), "Error output should include error CS1002"); 275Assert.True(errorOut.StartsWith(file.Path + "(1,7):", StringComparison.Ordinal), "Error output should start with file name, line and column"); 276Assert.True(errorOut.Contains("CS7010"), "Error output should include error CS7010");
Interop.FunctionalTests (4)
Http2WebSocketInteropTests.cs (1)
155Assert.True(ex is WebSocketException || ex is TaskCanceledException, ex.GetType().FullName);
Http3\Http3RequestTests.cs (1)
1311Assert.True(!string.IsNullOrEmpty(connectionId1), "ConnectionId should have a value.");
HttpClientHttp2InteropTests.cs (2)
242Assert.True(totalRead <= Repetitions * Content.Length, "Too Long"); 254Assert.True(totalRead == Repetitions * Content.Length, "Too Short");
Microsoft.Analyzers.Extra.Tests (2)
Resources\RoslynTestUtils.cs (2)
142Assert.True(expected.Id == actual.Id, 144Assert.True(expectedSpan.Equals(actual.Location.SourceSpan),
Microsoft.Analyzers.Local.Tests (2)
Resources\RoslynTestUtils.cs (2)
142Assert.True(expected.Id == actual.Id, 144Assert.True(expectedSpan.Equals(actual.Location.SourceSpan),
Microsoft.Arcade.Test.Common (8)
AssertEx.cs (8)
156Assert.True((actual == null) == expected.IsDefault, message); 168Assert.True((expected == null) == actual.IsDefault, message); 253Assert.True(result, message); 260Assert.True(expectedSet.SetEquals(actual), string.Format("Expected: {0}\nActual: {1}", ToString(expected), ToString(actual))); 268Assert.True(none, string.Format( 278Assert.True(any, string.Format("No expected item was found.\nExisting items: {0}", ToString(actual))); 286Assert.True(all, string.Format( 319Assert.True(AssertEqualityComparer<T>.IsNull(@object), message);
Microsoft.AspNetCore.App.Analyzers.Test (8)
RouteEmbeddedLanguage\RoutePatternParserTests.cs (8)
126Assert.True(conversionFailureOk, "Failed to convert text to token."); 209Assert.True(routeParameter.IsOptional == parsedRoutePattern.IsOptional, "IsOptional"); 210Assert.True(routeParameter.IsCatchAll == parsedRoutePattern.IsCatchAll, "IsCatchAll"); 211Assert.True(routeParameter.EncodeSlashes == parsedRoutePattern.EncodeSlashes, "EncodeSlashes"); 212Assert.True(Equals(routeParameter.DefaultValue, parsedRoutePattern.Default), "DefaultValue"); 213Assert.True(routeParameter.Policies.Length == parsedRoutePattern.ParameterPolicies.Count, "ParameterPolicies"); 218Assert.True(expected == actual, $"Policy {i}. Expected: '{expected}', Actual: '{actual}'."); 233Assert.True(
Microsoft.AspNetCore.App.UnitTests (15)
SharedFxTests.cs (6)
138Assert.True(Version.TryParse(assemblyVersion, out _), $"{assemblyVersion} should deserialize to System.Version"); 141Assert.True(Version.TryParse(fileVersion, out _), $"{fileVersion} should deserialize to System.Version"); 151Assert.True(Version.TryParse(fileVersion, out _), $"{fileVersion} should deserialize to System.Version"); 201Assert.True(expectedVersion.Major == assemblyDefinition.Version.Major || 308Assert.True(Version.TryParse(assemblyVersion, out _), $"{assemblyPath} has assembly version {assemblyVersion}. Assembly version must be convertable to System.Version"); 311Assert.True(Version.TryParse(fileVersion, out _), $"{assemblyPath} has file version {fileVersion}. File version must be convertable to System.Version");
TargetingPackTests.cs (9)
98Assert.True(expectedVersion.Major == assemblyDefinition.Version.Major || 127Assert.True(result, $"In {Path.GetFileName(path)}, {reference.GetAssemblyName()} has unexpected version {reference.Version}."); 151Assert.True( 160Assert.True( 213Assert.True(hasRefAssemblyAttribute, $"{path} should have {nameof(ReferenceAssemblyAttribute)}"); 282Assert.True(Version.TryParse(parts[2], out _), "Assembly version must be convertable to System.Version"); 284Assert.True(Version.TryParse(parts[3], out _), "File version must be convertable to System.Version"); 350Assert.True(Version.TryParse(assemblyVersion, out _), $"{assemblyPath} has assembly version {assemblyVersion}. Assembly version must be convertable to System.Version"); 351Assert.True(Version.TryParse(fileVersion, out _), $"{assemblyPath} has file version {fileVersion}. File version must be convertable to System.Version");
Microsoft.AspNetCore.Authentication.Negotiate.Test (5)
EventTests.cs (2)
551Assert.True(Stage1Complete, nameof(Stage1Complete)); 568Assert.True(Stage1Complete, nameof(Stage1Complete));
NegotiateHandlerTests.cs (3)
456Assert.True(context.User.Identity.IsAuthenticated, "Authenticated"); 575Assert.True(Stage1Complete, nameof(Stage1Complete)); 592Assert.True(Stage1Complete, nameof(Stage1Complete));
Microsoft.AspNetCore.Authentication.Test (21)
GoogleTests.cs (6)
464Assert.True(ex.Data.Contains("error"), "error"); 465Assert.True(ex.Data.Contains("error_description"), "error_description"); 466Assert.True(ex.Data.Contains("error_uri"), "error_uri"); 501Assert.True(ex.Data.Contains("error"), "error"); 502Assert.True(ex.Data.Contains("error_description"), "error_description"); 503Assert.True(ex.Data.Contains("error_uri"), "error_uri");
OpenIdConnect\OpenIdConnectAuthenticateTests.cs (3)
81Assert.True(ex.Data.Contains("error"), "error"); 82Assert.True(ex.Data.Contains("error_description"), "error_description"); 83Assert.True(ex.Data.Contains("error_uri"), "error_uri");
WsFederation\WsFederationTest.cs (6)
80Assert.True(queryItems["wctx"].ToString().Equals(CustomStateDataFormat.ValidStateData), "wctx does not equal ValidStateData"); 96Assert.True(queryItems["wctx"].ToString().Equals(CustomStateDataFormat.ValidStateData), "wctx does not equal ValidStateData"); 112Assert.True(queryItems["wctx"].ToString().Equals(CustomStateDataFormat.ValidStateData), "wctx does not equal ValidStateData"); 307Assert.True(context.ProtocolMessage.Wctx.Equals("customValue"), "wctx is not my custom value"); 329Assert.True((bool)context.HttpContext.Items["MessageReceived"], "MessageReceived notification not invoked"); 330Assert.True((bool)context.HttpContext.Items["SecurityTokenReceived"], "SecurityTokenReceived notification not invoked");
WsFederation\WsFederationTest_Handler.cs (6)
78Assert.True(queryItems["wctx"].ToString().Equals(CustomStateDataFormat.ValidStateData), "wctx does not equal ValidStateData"); 94Assert.True(queryItems["wctx"].ToString().Equals(CustomStateDataFormat.ValidStateData), "wctx does not equal ValidStateData"); 110Assert.True(queryItems["wctx"].ToString().Equals(CustomStateDataFormat.ValidStateData), "wctx does not equal ValidStateData"); 303Assert.True(context.ProtocolMessage.Wctx.Equals("customValue"), "wctx is not my custom value"); 325Assert.True((bool)context.HttpContext.Items["MessageReceived"], "MessageReceived notification not invoked"); 326Assert.True((bool)context.HttpContext.Items["SecurityTokenReceived"], "SecurityTokenReceived notification not invoked");
Microsoft.AspNetCore.Components.Analyzers.Tests (2)
Verifiers\DiagnosticVerifier.cs (2)
194Assert.True(actualSpan.Path == expected.Path || (actualSpan.Path != null && actualSpan.Path.Contains("Test0.") && expected.Path.Contains("Test.")), 258Assert.True(location.IsInSource,
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
RazorComponentsServiceCollectionExtensionsTest.cs (1)
108Assert.True(
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (2)
Verifiers\DiagnosticVerifier.cs (2)
194Assert.True(actualSpan.Path == expected.Path || (actualSpan.Path != null && actualSpan.Path.Contains("Test0.") && expected.Path.Contains("Test.")), 258Assert.True(location.IsInSource,
Microsoft.AspNetCore.Components.Server.Tests (3)
Circuits\CircuitHostTest.cs (1)
243Assert.True(initializeException is null, $"An exception was thrown in {nameof(TestCircuitHost.InitializeAsync)}(): {initializeException}");
Circuits\CircuitIdFactoryTest.cs (1)
50Assert.True(isValid, "Failed to validate id");
src\SignalR\common\SignalR.Common\test\Internal\Protocol\MessagePackHubProtocolTestBase.cs (1)
280Assert.True(string.Equals(actual, testData.Binary, StringComparison.Ordinal), $"Binary encoding changed from{Environment.NewLine} [{testData.Binary}]{Environment.NewLine} to{Environment.NewLine} [{actual}]{Environment.NewLine}Please verify the MsgPack output and update the baseline");
Microsoft.AspNetCore.Components.Tests (37)
RendererTest.cs (5)
5714Assert.True(result.IsCompleted, "Task must complete synchronously."); 5724Assert.True(result.IsCompleted, "Task must complete synchronously."); 5739Assert.True(result.IsCompleted, "Task must complete synchronously."); 5750Assert.True(result.IsCompleted, "Task must complete synchronously."); 5771Assert.True(result.IsCompleted, "Task must complete synchronously.");
Rendering\RendererSynchronizationContextTest.cs (32)
34Assert.True(e.Wait(Timeout), "timeout"); 80Assert.True(e2.Wait(Timeout), "timeout"); 84Assert.True(e1.Wait(Timeout), "timeout"); 99Assert.True(e3.Wait(Timeout), "timeout"); 124Assert.True(e2.Wait(Timeout), "timeout"); 128Assert.True(e1.Wait(Timeout), "timeout"); 153Assert.True(e3.Wait(Timeout), "timeout"); 178Assert.True(e2.Wait(Timeout), "timeout"); 182Assert.True(e1.Wait(Timeout), "timeout"); 218Assert.True(e2.Wait(Timeout), "timeout"); 221Assert.True(e1.Wait(Timeout), "timeout"); 228Assert.True(e4.Wait(Timeout), "timeout"); 236Assert.True(e3.Wait(Timeout), "timeout"); 257Assert.True(e5.Wait(Timeout), "timeout"); 258Assert.True(e6.Wait(Timeout), "timeout"); 286Assert.True(e1.Wait(Timeout), "timeout"); 339Assert.True(e2.Wait(Timeout), "timeout"); 343Assert.True(e1.Wait(Timeout), "timeout"); 358Assert.True(e3.Wait(Timeout), "timeout"); 395Assert.True(e1.Wait(Timeout), "timeout"); 436Assert.True(e2.Wait(Timeout), "timeout"); 440Assert.True(e1.Wait(Timeout), "timeout"); 454Assert.True(e3.Wait(Timeout), "timeout"); 525Assert.True(e2.Wait(Timeout), "timeout"); 529Assert.True(e1.Wait(Timeout), "timeout"); 543Assert.True(e3.Wait(Timeout), "timeout"); 617Assert.True(e2.Wait(Timeout), "timeout"); 621Assert.True(e1.Wait(Timeout), "timeout"); 636Assert.True(e3.Wait(Timeout), "timeout"); 707Assert.True(e2.Wait(Timeout), "timeout"); 711Assert.True(e1.Wait(Timeout), "timeout"); 725Assert.True(e3.Wait(Timeout), "timeout");
Microsoft.AspNetCore.Cors.Test (1)
CorsMiddlewareTests.cs (1)
620Assert.True(exceptionSeen, "We expect exception middleware to have executed");
Microsoft.AspNetCore.DataProtection.Extensions.Tests (1)
DataProtectionProviderTests.cs (1)
136Assert.True(certificate.HasPrivateKey, "Cert should have a private key");
Microsoft.AspNetCore.DataProtection.Tests (4)
KeyManagement\KeyRingProviderTests.cs (2)
698Assert.True(mreForegroundThreadIsCallingGetCurrentKeyRing.Wait(testTimeout), "Test timed out."); 709Assert.True(mreBackgroundThreadHasCalledGetCurrentKeyRing.Wait(testTimeout), "Test timed out.");
KeyManagement\XmlKeyManagerTests.cs (1)
575Assert.True(loggerFactory.ToString().Contains("1A2B3C4D"), "The secret '1A2B3C4D' should have been logged.");
TypeForwardingActivatorTests.cs (1)
118Assert.True(forwarded, "Should have forwarded this type to new version or namespace");
Microsoft.AspNetCore.Http.Connections.Tests (1)
HttpConnectionDispatcherTests.cs (1)
3783Assert.True(body.CanSeek, "Can't get content of a non-seekable stream");
Microsoft.AspNetCore.Http.Extensions.Tests (2)
ProblemDetailsServiceCollectionExtensionsTest.cs (1)
63Assert.True(
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
378Assert.True(CompareLines(expectedLines, generatedCode, out var errorMessage), errorMessage);
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
378Assert.True(CompareLines(expectedLines, generatedCode, out var errorMessage), errorMessage);
Microsoft.AspNetCore.Http.Results.Tests (1)
RedirectToRouteResultTests.cs (1)
47Assert.True(httpContext.Response.Headers.ContainsKey("Location"), "Location header not found");
Microsoft.AspNetCore.Http.Tests (1)
ApplicationBuilderTests.cs (1)
102Assert.True(httpContext.Items.ContainsKey("__RequestUnhandled"), "Request unhandled flag should be set.");
Microsoft.AspNetCore.InternalTesting (1)
CultureReplacer.cs (1)
73Assert.True(Environment.CurrentManagedThreadId == _threadId,
Microsoft.AspNetCore.InternalTesting.Tests (17)
AssemblyTestLogTests.cs (10)
67Assert.True(File.Exists(globalLogPath), $"Expected global log file {globalLogPath} to exist."); 68Assert.True(File.Exists(testLog), $"Expected test log file {testLog} to exist."); 160Assert.True(File.Exists(globalLogPath), $"Expected global log file {globalLogPath} to exist"); 161Assert.True(File.Exists(testLog), $"Expected test log file {testLog} to exist"); 215Assert.True(File.Exists(globalLogPath), $"Expected global log file {globalLogPath} to exist."); 216Assert.True(File.Exists(testLog), $"Expected test log file {testLog} to exist."); 221Assert.True(!File.Exists(globalLogPath), $"Expected no global log file {globalLogPath} to exist."); 222Assert.True(!File.Exists(testLog), $"Expected no test log file {testLog} to exist."); 266Assert.True(File.Exists(globalLogPath), $"Expected global log file {globalLogPath} to exist."); 267Assert.True(File.Exists(testLog), $"Expected test log file {testLog} to exist.");
ConditionalTheoryTest.cs (2)
37Assert.True(_conditionalTheoryRuns <= 2, $"Theory should run 2 times, but ran {_conditionalTheoryRuns} times."); 62Assert.True(_conditionalTheoryRuns <= 3, $"Theory should run 2 times, but ran {_conditionalMemberDataRuns} times.");
HttpClientSlimTest.cs (1)
98Assert.True(listener.IsListening, "IsListening");
MaximumOSVersionTest.cs (4)
19Assert.True( 30Assert.True( 70Assert.True( 86Assert.True(Environment.OSVersion.Version.ToString().StartsWith("6.1", StringComparison.Ordinal),
Microsoft.AspNetCore.JsonPatch.Tests (31)
Internal\DictionaryAdapterTest.cs (12)
32Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 52Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 71Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 99Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 126Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 135Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 154Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 174Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 252Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 272Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 291Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 316Assert.True(string.IsNullOrEmpty(message), "Expected no error message");
Internal\DynamicObjectAdapterTest.cs (1)
273Assert.True(string.IsNullOrEmpty(errorMessage), "Expected no error message");
Internal\ListAdapterTest.cs (8)
135Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 153Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 173Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 241Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 296Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 407Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 443Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 460Assert.True(string.IsNullOrEmpty(message), "Expected no error message");
Internal\ObjectVisitorTest.cs (5)
55Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 88Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 118Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 150Assert.True(string.IsNullOrEmpty(message), "Expected no error message"); 204Assert.True(string.IsNullOrEmpty(message), "Expected no error message");
Internal\PocoAdapterTest.cs (5)
35Assert.True(string.IsNullOrEmpty(errorMessage), "Expected no error message"); 75Assert.True(string.IsNullOrEmpty(errorMessage), "Expected no error message"); 116Assert.True(string.IsNullOrEmpty(errorMessage), "Expected no error message"); 156Assert.True(string.IsNullOrEmpty(errorMessage), "Expected no error message"); 240Assert.True(string.IsNullOrEmpty(errorMessage), "Expected no error message");
Microsoft.AspNetCore.Mvc.Core.Test (11)
ActionConstraints\HttpMethodActionConstraintTest.cs (1)
53Assert.True(result, "Request should have been accepted.");
DependencyInjection\MvcCoreServiceCollectionExtensionsTest.cs (1)
346Assert.True(
Formatters\JsonInputFormatterTestBase.cs (7)
124Assert.True(httpContext.Request.Body.CanRead, "Verify that the request stream hasn't been disposed"); 325Assert.True(result.HasError, "Model should have had an error!"); 351Assert.True(result.HasError, "Model should have had an error!"); 378Assert.True(result.HasError, "Model should have produced an error!"); 485Assert.True(result.HasError, "Model should have had an error!"); 509Assert.True(result.HasError, "Model should have had an error!"); 533Assert.True(result.HasError, "Model should have had an error!");
Formatters\JsonOutputFormatterTestBase.cs (1)
106Assert.True(body.CanWrite, "Response body should not be disposed.");
RedirectToRouteResultTest.cs (1)
111Assert.True(httpContext.Response.Headers.ContainsKey("Location"), "Location header not found");
Microsoft.AspNetCore.Mvc.Cors.Test (2)
CorsHttpMethodActionConstraintTest.cs (2)
38Assert.True(result, "Request should have been accepted."); 69Assert.True(result, "Request should have been accepted.");
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (1)
DataAnnotationsMetadataProviderTest.cs (1)
362Assert.True(dataAnnotationLocalizerProviderWasUsed, "DataAnnotationLocalizerProvider wasn't used by DisplayMetadata");
Microsoft.AspNetCore.Mvc.IntegrationTests (2)
ActionParametersIntegrationTest.cs (2)
833Assert.True(modelBindingResult.IsModelSet, "model is set"); 878Assert.True(modelBindingResult.IsModelSet, "model is set");
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (8)
src\Mvc\Mvc.Core\test\Formatters\JsonInputFormatterTestBase.cs (7)
124Assert.True(httpContext.Request.Body.CanRead, "Verify that the request stream hasn't been disposed"); 325Assert.True(result.HasError, "Model should have had an error!"); 351Assert.True(result.HasError, "Model should have had an error!"); 378Assert.True(result.HasError, "Model should have produced an error!"); 485Assert.True(result.HasError, "Model should have had an error!"); 509Assert.True(result.HasError, "Model should have had an error!"); 533Assert.True(result.HasError, "Model should have had an error!");
src\Mvc\Mvc.Core\test\Formatters\JsonOutputFormatterTestBase.cs (1)
106Assert.True(body.CanWrite, "Response body should not be disposed.");
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
CacheTagKeyTest.cs (1)
534Assert.True(equals, "CacheTagKeys must be equal");
Microsoft.AspNetCore.Mvc.Test (1)
MvcServiceCollectionExtensionsTest.cs (1)
622Assert.True(
Microsoft.AspNetCore.OutputCaching.Tests (1)
OutputCacheEntryFormatterTests.cs (1)
169Assert.True(expected.Headers.Span.SequenceEqual(actual.Headers.Span), "Headers");
Microsoft.AspNetCore.Owin.Tests (2)
OwinEnvironmentTests.cs (2)
121Assert.True(env.TryGetValue("owin.CallCancelled", out value), "owin.CallCancelled"); 122Assert.True(env.TryGetValue("owin.Version", out value), "owin.Version");
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (41)
DelegateTests.cs (1)
169Assert.True(Environment.OSVersion.Version < new Version(10, 0, 22000), "This should be supported on Win 11.");
HttpsTests.cs (8)
165Assert.True(protocol > SslProtocols.None, "Protocol: " + protocol); 166Assert.True(Enum.IsDefined(typeof(SslProtocols), protocol), "Defined: " + protocol); // Mapping is required, make sure it's current 169Assert.True(cipherAlgorithm > CipherAlgorithmType.Null, "Cipher: " + cipherAlgorithm); 172Assert.True(cipherStrength > 0, "CipherStrength: " + cipherStrength); 175Assert.True(hashAlgorithm >= HashAlgorithmType.None, "HashAlgorithm: " + hashAlgorithm); 178Assert.True(hashStrength >= 0, "HashStrength: " + hashStrength); // May be 0 for some algorithms 181Assert.True(keyExchangeAlgorithm >= ExchangeAlgorithmType.None, "KeyExchangeAlgorithm: " + keyExchangeAlgorithm); 184Assert.True(keyExchangeStrength >= 0, "KeyExchangeStrength: " + keyExchangeStrength);
Listener\ResponseBodyTests.cs (2)
47Assert.True(response.Headers.TransferEncodingChunked.Value, "Chunked"); 96Assert.True(response.Headers.TransferEncodingChunked.HasValue, "Chunked");
Listener\ResponseHeaderTests.cs (1)
270Assert.True(response.Headers.TransferEncodingChunked.HasValue, "Chunked");
OpaqueUpgradeTests.cs (2)
100Assert.True(response.Headers.TransferEncodingChunked.Value, "Chunked"); 183Assert.True(callbackCalled, "Callback not called");
RequestTests.cs (2)
482Assert.True(string.Equals("400", responseStatusCode), i.ToString("X2", CultureInfo.InvariantCulture)); 500Assert.True(string.Equals("400", responseStatusCode), i.ToString("X2", CultureInfo.InvariantCulture));
ResponseBodyTests.cs (10)
37Assert.True(response.Headers.TransferEncodingChunked.HasValue, "Chunked"); 124Assert.True(response.Headers.TransferEncodingChunked.HasValue, "Chunked"); 156Assert.True(response.Headers.TransferEncodingChunked.HasValue, "Chunked"); 181Assert.True(response.Headers.TransferEncodingChunked.Value, "Chunked"); 203Assert.True(response.Headers.TransferEncodingChunked.Value, "Chunked"); 226Assert.True(response.Content.Headers.TryGetValues("content-length", out contentLength), "Content-Length"); 306Assert.True(response.Content.Headers.TryGetValues("content-length", out contentLength), "Content-Length"); 339Assert.True(response.Headers.TransferEncodingChunked.HasValue, "Chunked"); 367Assert.True(response.Headers.TransferEncodingChunked.HasValue, "Chunked"); 394Assert.True(response.Headers.TransferEncodingChunked.HasValue, "Chunked");
ResponseSendFileTests.cs (7)
33Assert.True(FileLength > 0, "FileLength is 0"); 75Assert.True(response.Headers.TransferEncodingChunked.Value, "Chunked"); 94Assert.True(response.Headers.TransferEncodingChunked.Value, "Chunked"); 228Assert.True(response.Content.Headers.TryGetValues("content-length", out contentLength), "Content-Length"); 249Assert.True(response.Content.Headers.TryGetValues("content-length", out contentLength), "Content-Length"); 270Assert.True(response.Content.Headers.TryGetValues("content-length", out contentLength), "Content-Length"); 300Assert.True(response.Headers.TransferEncodingChunked.HasValue, "Chunked");
ResponseTrailersTests.cs (3)
164Assert.True(response.Content.Headers.TryGetValues(HeaderNames.ContentLength, out var contentLength), HeaderNames.ContentLength); 189Assert.True(response.Content.Headers.TryGetValues(HeaderNames.ContentLength, out var contentLength), HeaderNames.ContentLength); 215Assert.True(response.Content.Headers.TryGetValues(HeaderNames.ContentLength, out var contentLength), HeaderNames.ContentLength);
ServerTests.cs (5)
270Assert.True(Task.WaitAll(requestTasks.ToArray(), TimeSpan.FromSeconds(60)), "Timed out"); 285Assert.True(ct.CanBeCanceled, "CanBeCanceled"); 291Assert.True(ct.IsCancellationRequested, "IsCancellationRequested"); 318Assert.True(ct.CanBeCanceled, "CanBeCanceled"); 324Assert.True(ct.IsCancellationRequested, "IsCancellationRequested");
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (6)
AddressBinderTests.cs (2)
283Assert.True(ipV4Attempt, "Should have attempted to bind to IPAddress.Any"); 284Assert.True(ipV6Attempt, "Should have attempted to bind to IPAddress.IPv6Any");
Http2\Http2HPackEncoderTests.cs (1)
486Assert.True(expectedPayload[i] == payload[i], $"{expectedPayload[i]} != {payload[i]} at {i} (len {length})");
Http3\Http3QPackEncoderTests.cs (1)
73Assert.True(length <= 2, "Indexed header should be encoded into 1 or 2 bytes");
HttpParserTests.cs (1)
836Assert.True(expectedHeaderNames.Count() == expectedHeaderValues.Count(), $"{nameof(expectedHeaderNames)} and {nameof(expectedHeaderValues)} sizes must match");
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (1)
809Assert.True(
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (2)
WebHostTests.cs (2)
37Assert.True(QuicListener.IsSupported, "QuicListener.IsSupported should be true."); 38Assert.True(new MsQuicSupportedAttribute().IsMet, "MsQuicSupported.IsMet should be true.");
Microsoft.AspNetCore.Shared.Tests (2)
DotNetMuxerTests.cs (2)
19Assert.True(File.Exists(muxerPath), "The file did not exist"); 20Assert.True(Path.IsPathRooted(muxerPath), "The path should be rooted");
Microsoft.AspNetCore.SignalR.Client.Tests (3)
HubConnectionTests.ConnectionLifecycle.cs (3)
187Assert.True(handshakeConnectionErrorLogged, "The connnection error during the handshake wasn't logged."); 526Assert.True(handshakeTimeoutLogged, "The handshake timeout wasn't logged."); 603Assert.True(handshakeCancellationLogged, "The handshake cancellation wasn't logged.");
Microsoft.AspNetCore.SignalR.Common.Tests (1)
Internal\Protocol\MessagePackHubProtocolTestBase.cs (1)
280Assert.True(string.Equals(actual, testData.Binary, StringComparison.Ordinal), $"Binary encoding changed from{Environment.NewLine} [{testData.Binary}]{Environment.NewLine} to{Environment.NewLine} [{actual}]{Environment.NewLine}Please verify the MsgPack output and update the baseline");
Microsoft.AspNetCore.StaticFiles.FunctionalTests (1)
StaticFileMiddlewareTests.cs (1)
256Assert.True(context.RequestAborted.WaitHandle.WaitOne(interval), "not aborted");
Microsoft.AspNetCore.StaticFiles.Tests (1)
StaticFileMiddlewareTests.cs (1)
54Assert.True(File.Exists(badLink), "Should have created a symlink");
Microsoft.AspNetCore.Tests (1)
WebHostTests.cs (1)
71Assert.True(app.Properties.ContainsKey("ForwardedHeadersAdded"), "Forwarded Headers");
Microsoft.AspNetCore.WebSockets.ConformanceTests (2)
Autobahn\AutobahnTester.cs (1)
123Assert.True(failures.Length == 0, "Autobahn results did not meet expectations:" + Environment.NewLine + failures.ToString());
AutobahnTests.cs (1)
30Assert.True(Wstest.Default != null, $"The 'wstest' executable (Autobahn WebSockets Test Suite) could not be found at '{Wstest.DefaultLocation}'. Run the Build Agent setup scripts to install it or see https://github.com/crossbario/autobahn-testsuite for instructions on manual installation.");
Microsoft.AspNetCore.WebSockets.Tests (9)
WebSocketCompressionMiddlewareTests.cs (1)
158Assert.True(clientBuf[i] == receiveBuf[i], $"offset {i} not equal: {clientBuf[i]} == {receiveBuf[i]}");
WebSocketMiddlewareTests.cs (8)
561Assert.True(socketWasAcceptedDidNotTimeout, "Socket was not accepted within the allotted time."); 566Assert.True(firstReceiveOccuredDidNotTimeout, "First receive did not occur within the allotted time."); 569Assert.True(secondReceiveInitiatedDidNotTimeout, "Second receive was not initiated within the allotted time."); 574Assert.True(socketWasAbortedDidNotTimeout, "Abort did not occur within the allotted time."); 628Assert.True(socketWasAcceptedDidNotTimeout, "Socket was not accepted within the allotted time."); 633Assert.True(firstReceiveOccuredDidNotTimeout, "First receive did not occur within the allotted time."); 638Assert.True(operationWasCancelledDidNotTimeout, "Cancel did not occur within the allotted time."); 843Assert.True(ex is ConnectionAbortedException or WebSocketException, ex.GetType().FullName);
Microsoft.AspNetCore.WebUtilities.Tests (2)
FileBufferingReadStreamTests.cs (2)
422Assert.True(File.Exists(stream.TempFileName), "tempFile should be created"); 451Assert.True(File.Exists(stream.TempFileName), "tempFile should be created");
Microsoft.Build.BuildCheck.UnitTests (1)
EditorConfig_Tests.cs (1)
696Assert.True(result, message);
Microsoft.Build.CommandLine.UnitTests (1)
CommandLineSwitches_Tests.cs (1)
1574Assert.True(helpMessageLines[i].Length <= 80, $"Line {i + 1} of '{item.Key}' should be no longer than 80 characters.");
Microsoft.Build.Engine.UnitTests (21)
BackEnd\BinaryTranslator_Tests.cs (5)
193Assert.True(TranslationHelpers.CompareExceptions(value, deserializedValue, out string diffReason), diffReason); 215Assert.True(TranslationHelpers.CompareExceptions(value, deserializedValue, out string diffReason), diffReason); 244Assert.True(TranslationHelpers.CompareExceptions(value, deserializedValue, out string diffReason), diffReason); 278Assert.True(TranslationHelpers.CompareExceptions(remote, deserializedValue, out string diffReason, true), $"Exception type {exceptionType.FullName} not properly de/serialized: {diffReason}"); 299Assert.True(TranslationHelpers.CompareExceptions(value, deserializedValue, out string diffReason, true), diffReason);
BackEnd\BuildManager_Tests.cs (2)
380Assert.True(numberProcsOriginally < numberProcsAfterBuild, $"Expected '{numberProcsOriginally}' < '{numberProcsAfterBuild}'"); 454Assert.True(int.TryParse(item[2].ItemSpec, out int processId), $"Process ID passed from the 'test' target is not a valid integer (actual is '{item[2].ItemSpec}')");
BackEnd\BuildResult_Tests.cs (3)
334Assert.True(TranslationHelpers.CompareExceptions(result.Exception, deserializedResult.Exception, out string diffReason), diffReason); 340Assert.True(TranslationHelpers.CompareExceptions(result["alpha"].Exception, deserializedResult["alpha"].Exception, out diffReason), diffReason); 343Assert.True(TranslationHelpers.CompareExceptions(result["omega"].Exception, deserializedResult["omega"].Exception, out diffReason), diffReason);
BackEnd\TargetResult_Tests.cs (2)
105Assert.True(TranslationHelpers.CompareExceptions(result.Exception, deserializedResult.Exception, out string diffReason), diffReason); 125Assert.True(TranslationHelpers.CompareExceptions(result.Exception, deserializedResult.Exception, out string diffReason), diffReason);
BinaryLogger_Tests.cs (2)
484Assert.True(NativeMethodsShared.MakeSymbolicLink(symlinkPath, testFile.Path, ref errorMessage), errorMessage); 485Assert.True(NativeMethodsShared.MakeSymbolicLink(symlinkLvl2Path, symlinkPath, ref errorMessage), errorMessage);
Construction\SolutionProjectGenerator_Tests.cs (1)
1036Assert.True(buildResult, String.Join(Environment.NewLine, logger.Errors.Select(beea => beea.Message)));
Definition\ToolsVersion_Tests.cs (3)
52Assert.True(taskRegistry.TaskRegistrations.ContainsKey(new TaskRegistry.RegisteredTaskIdentity(expectedRegisteredTask, null)), 58Assert.True(taskoverrideRegistry.TaskRegistrations.ContainsKey(new TaskRegistry.RegisteredTaskIdentity(expectedRegisteredTask, null)), 177Assert.True(taskRegistry.TaskRegistrations.ContainsKey(new TaskRegistry.RegisteredTaskIdentity(expectedRegisteredTask, null)),
Evaluation\Expander_Tests.cs (1)
4283Assert.True(
ExpressionTreeExpression_Tests.cs (2)
447Assert.True(tree.Evaluate(state), "expected true from '" + expression + "'"); 510Assert.True(caughtException,
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (2)
TestUtilities\DotNetSdkTestBase.cs (2)
148Assert.True(s_dotnetInstallDir is object, $"SDK not found. Use {nameof(ConditionalFactAttribute)}(typeof({nameof(DotNetSdkAvailable)})) to skip the test if the SDK is not found."); 214Assert.True(result.ExitCode == 0, $"MSBuild failed with exit code {result.ExitCode}: {result.Output}");
Microsoft.Build.Tasks.UnitTests (7)
Copy_Tests.cs (1)
2834Assert.True((File.GetAttributes(destFile) & FileAttributes.ReparsePoint) != 0, "File was copied but is not a symlink");
RegressionTests.cs (1)
81Assert.True(result, "Output:" + Environment.NewLine + logger.FullLog);
WriteCodeFragment_Tests.cs (1)
1103Assert.True(result, engine.Log);
XmlPeek_Tests.cs (1)
274Assert.True(engine.Log.Contains("MSB3742"), "Engine Log: " + engine.Log);
XmlPoke_Tests.cs (1)
361Assert.True(p.Execute(), engine.Log);
XslTransformation_Tests.cs (2)
968Assert.True(t.Execute(), "CompiledDllWithTwoTypes execution should've passed" + engine.Log); 972Assert.True(File.Exists(tsk.ItemSpec), tsk.ItemSpec + " should exist on output dir");
Microsoft.Build.UnitTests.Shared (7)
MockLogger.cs (1)
515Assert.True(
ObjectModelHelpers.cs (4)
419Assert.True( 423Assert.True( 580Assert.True(FileSystems.Default.FileExists(Path.Combine(TempProjectDir, fileRelativePath)), message); 1652Assert.True(FileSystems.Default.DirectoryExists(rootDirectory), $"Directory {rootDirectory} does not exist");
TestEnvironment.cs (2)
421Assert.True(currentValue == _originalValue, $"Expected {_name} to be '{_originalValue}', but it was '{currentValue}'"); 711Assert.True(FileSystems.Default.FileExists(Path), $"A file expected as an output does not exist: {Path}");
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (2)
src\Features\DiagnosticsTestUtilities\CodeActions\CSharpCodeFixVerifier`2+Test.cs (1)
86Assert.True(CodeFixTestBehaviors.HasFlag(Testing.CodeFixTestBehaviors.FixOne), $"'{nameof(DiagnosticSelector)}' can only be used with '{nameof(Testing.CodeFixTestBehaviors)}.{nameof(Testing.CodeFixTestBehaviors.FixOne)}'");
src\Features\DiagnosticsTestUtilities\CodeActions\VisualBasicCodeFixVerifier`2+Test.cs (1)
77Assert.True(CodeFixTestBehaviors.HasFlag(Testing.CodeFixTestBehaviors.FixOne), $"'{nameof(DiagnosticSelector)}' can only be used with '{nameof(Testing.CodeFixTestBehaviors)}.{nameof(Testing.CodeFixTestBehaviors.FixOne)}'");
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (3)
CommandLineTests.cs (3)
1890Assert.True(foundIndex > 0, $"Missing version '{version}'"); 9195Assert.True(cscOutput == string.Empty, "Failed at error code: " + errorCode); 10557Assert.True(
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (29)
CodeActions\InlineMethod\CSharpInlineMethodTests.cs (2)
97Assert.True(false, "Can't find proper marks that contains inlined method."); 131Assert.True(false, "Can't find proper marks that contains inlined method.");
CodeActions\PullMemberUp\CSharpPullMemberUpTests.cs (1)
53Assert.True(false, "Pull Members Up is provided via quick action");
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (2)
89Assert.True(expectedFolderPaths.Count() == actualFolderPaths.Count, "Number of available \"Move file\" actions are not equal."); 167Assert.True(changedDocumentIds.Contains(originalDocumentId), "original document was not changed.");
Completion\CompletionProviders\SuggestionModeCompletionProviderTests.cs (1)
1542Assert.True(completionList.SuggestionModeItem != null, "Expecting a suggestion mode, but none was present");
ExtractMethod\ExtractMethodBase.cs (1)
60Assert.True(false, subjectBuffer.CurrentSnapshot.GetText());
LineSeparators\LineSeparatorTests.cs (1)
618Assert.True(expectedSpan == span, message);
SplitStringLiteral\SplitStringLiteralCommandHandlerTests.cs (1)
133Assert.True(false, "Should not reach here.");
SymbolKey\SymbolKeyTestBase.cs (1)
112Assert.True(ret, message);
SymbolKey\SymbolKeyTests.cs (1)
204Assert.True(bodyProject.Id == bodyLocalProjectId, $"Expected {bodyProject.Id} == {bodyLocalProjectId}. {i}");
Workspaces\WorkspaceTests_EditorFeatures.cs (18)
289Assert.True(snapshot.GetProject(id1).ProjectReferences.Contains(reference), "ProjectReferences did not contain project2"); 708Assert.True(syntaxTree.GetRoot().Width() > 0, "syntaxTree.GetRoot().Width should be > 0"); 807(sender, args) => Assert.True(args.Document.Id == document.Id, 811(sender, args) => Assert.True(args.Document.Id == document.Id, 824Assert.True(openWaiter.WaitForEventToFire(longEventTimeout), 828Assert.True(closeWaiter.WaitForEventToFire(longEventTimeout), 873(sender, args) => Assert.True(args.Document.Id == document.Id, 877(sender, args) => Assert.True(args.Document.Id == document.Id, 893Assert.True(openWaiter.WaitForEventToFire(longEventTimeout), 897Assert.True(closeWaiter.WaitForEventToFire(longEventTimeout), 937(sender, args) => Assert.True(args.Document.Id == document.Id, 941(sender, args) => Assert.True(args.Document.Id == document.Id, 954Assert.True(openWaiter.WaitForEventToFire(longEventTimeout), 958Assert.True(closeWaiter.WaitForEventToFire(longEventTimeout), 998(sender, args) => Assert.True(args.Document.Id == document.Id, 1002(sender, args) => Assert.True(args.Document.Id == document.Id, 1015Assert.True(openWaiter.WaitForEventToFire(longEventTimeout), 1019Assert.True(closeWaiter.WaitForEventToFire(longEventTimeout),
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (3)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (1)
139Assert.True(conversionFailureOk, "Failed to convert text to token.");
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
116Assert.True(conversionFailureOk, "Failed to convert text to token.");
Recommendations\RecommenderTests.cs (1)
86Assert.True(keywords == null || !keywords.Any(), "Keywords must be null or empty.");
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (23)
CodeGen\CodeGenIncrementTests.cs (1)
1007Assert.True(type.IsPrimitive || type == typeof(decimal), string.Format("Type {0} is neither primitive nor decimal", type));
CodeGen\CodeGenReadOnlySpanConstructionTest.cs (3)
2573Assert.True(m.Success, $"Expected regex to match in {il}"); 2574Assert.True(long.TryParse(m.Groups[1].Value, NumberStyles.HexNumber, null, out long rva), $"Expected {m.Value} to parse as hex long."); 2575Assert.True(rva % expectedAlignment == 0, $"Expected RVA {rva:X8} to be {expectedAlignment}-byte aligned.");
Emit\CompilationEmitTests.cs (16)
220Assert.True(mdOnlyImage.Length > 0, "no metadata emitted"); 243Assert.True(output.ToArray().Length > 0, "no metadata emitted"); 278Assert.True(mdOnlyImage.Length > 0, "no metadata emitted"); 324Assert.True(mdOnlyImage.Length > 0, "no metadata emitted"); 377Assert.True(mdOnlyImage.Length > 0, "no metadata emitted"); 431Assert.True(mdOnlyImage.Length > 0, "no metadata emitted"); 484Assert.True(mdOnlyImage.Length > 0, "no metadata emitted"); 533Assert.True(mdOnlyImage.Length > 0, "no metadata emitted"); 2714Assert.True(dllImage.Length > 0, "no metadata emitted"); 2736Assert.True(symbolsSynthesizedCount > 0, "Expected more than 0 synthesized method symbols."); 2768Assert.True(output.Length > 0, "no metadata emitted"); 4639Assert.True(result.Success, "Compilation failed"); 4642Assert.True(File.Exists(dllPath), "DLL does not exist"); 4643Assert.True(File.Exists(pdbPath), "PDB does not exist"); 5150Assert.True(firstMatch >= 0, "Couldn't find the expected byte pattern in the output."); 5152Assert.True(secondMatch < 0, "Expected to find just one occurrence of the pattern in the output.");
Emit\DynamicAnalysis\DynamicAnalysisResourceTests.cs (1)
1056Assert.True(text.StartsWith(expectedSpanResult.TextStart), $"Text doesn't start with {expectedSpanResult.TextStart}. Text is: {text}");
Emit\DynamicAnalysis\DynamicInstrumentationTests.cs (1)
3566Assert.True(expected == instrumented, $"Method '{qualifiedMethodName}' should {(expected ? "be" : "not be")} instrumented. Actual IL:{Environment.NewLine}{il}");
Emit\ResourceTests.cs (1)
848Assert.True(lib != IntPtr.Zero, String.Format("LoadLibrary failed with HResult: {0:X}", +Marshal.GetLastWin32Error()));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (16)
Attributes\AttributeTests_Assembly.cs (2)
1393Assert.True( 1820Assert.True(expectedStr.Equals(actualStr), AssertEx.GetAssertMessage(expectedStr, actualStr));
Attributes\AttributeTests_MarshalAs.cs (2)
55Assert.True(count > 0, "Expected at least one parameter"); 92Assert.True(count > 0, "Expected at least one parameter");
Attributes\AttributeTests_WellKnownAttributes.cs (8)
870Assert.True(value is short, "Expected value to be Int16"); 1367Assert.True(sourceMethod.IsPartial, "Not a partial method?"); 1371Assert.True(param.HasOptionalAttribute, "No OptionalAttribute?"); 1375Assert.True(param.HasOptionalAttribute, "No OptionalAttribute?"); 5638Assert.True(typeA.IsWindowsRuntimeImport, "Metadata flag not set for IsWindowsRuntimeImport"); 5645Assert.True(typeA.IsWindowsRuntimeImport, "Metadata flag not set for IsWindowsRuntimeImport"); 5702Assert.True(method.RequiresSecurityObject, "Metadata flag RequiresSecurityObject is not set"); 5711Assert.True(method.RequiresSecurityObject, "Metadata flag RequiresSecurityObject is not set");
Attributes\InternalsVisibleToAndStrongNameTests.cs (2)
404Assert.True(((string)err.Arguments[1]).EndsWith("0x80090016)", StringComparison.Ordinal), (string)err.Arguments[1]); 1616Assert.True(((string)err.Arguments[1]).EndsWith("0x80090016)", StringComparison.Ordinal), (string)err.Arguments[1]);
Diagnostics\DiagnosticAnalyzerTests.cs (2)
733Assert.True(false, message); 740Assert.True(false, message);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (5)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
1068Assert.True(actions.Length == 0, "An action was offered when none was expected");
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (1)
65Assert.True(expected == actual,
EditAndContinue\Helpers\CSharpEditAndContinueTestVerifier.cs (1)
27Assert.True(method is IMethodSymbol, "Only methods should have a syntax map.");
EditAndContinue\SyntaxUtilitiesTests.cs (1)
27Assert.True(SyntaxFactory.AreEquivalent(oldNode, newNode), $"Node '{oldNode}' not equivalent to '{newNode}'.");
Testing\CSharpTestMethodFinderTests.cs (1)
586Assert.True(unmatchedTestNames.Count == 0, $"Unable to match the following test names: {string.Join(", ", unmatchedTestNames)}");
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (1)
InteractiveSessionReferencesTests.cs (1)
129Assert.True(result is System.Data.DataSet, "Expected DataSet");
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (9)
CommandLineRunnerTests.cs (4)
375Assert.True(runner.RunInteractive() == 0, userMessage: runner.Console.Error.ToString()); 392Assert.True(runner.RunInteractive() == 0, userMessage: runner.Console.Error.ToString()); 419Assert.True(runner.RunInteractive() == 0, userMessage: runner.Console.Error.ToString()); 853Assert.True(foundIndex > 0, $"Missing version '{version}'");
InteractiveSessionTests.cs (5)
244Assert.True(e.GetType().GetTypeInfo().IsEnum, "Expected enum"); 1359Assert.True(result is Dictionary<string, int>, "Expected Dictionary<string, int>"); 1436Assert.True(false, "Expected an exception"); 1455Assert.True(false, "Expected an exception"); 1468Assert.True(false, "Expected an exception");
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (14)
Semantics\BindingAsyncTests.cs (1)
62Assert.True(parens.Count() == 2, "Expect exactly two parenthesized lambda expressions in the syntax tree.");
Semantics\FieldInitializerBindingTests.cs (1)
264Assert.True(!boundInitializers.IsEmpty, "Expected non-null non-empty bound initializers");
Semantics\LambdaTests.cs (4)
476Assert.True(0 < errs.Count(), "Diagnostics not empty"); 477Assert.True(0 < errs.Where(e => e.Code == 1525).Select(e => e).Count(), "Diagnostics contains CS1525"); 853Assert.True(conv.IsAnonymousFunction, "LambdaConversion"); 863Assert.True(conv.IsAnonymousFunction, "LambdaConversion");
Semantics\LookupPositionTests.cs (1)
3071Assert.True(actualNumExpectedNames == expectedNumExpectedNames, string.Format("Expected {0} sets of expected names, but found {1}", expectedNumExpectedNames, actualNumExpectedNames));
Semantics\NullableReferenceTypesTests.cs (3)
1798Assert.True(expectedType == actualType, $"Unexpected TypeInfo.Type '{actualType}'"); 1808Assert.True(expectedConvertedType == actualConvertedType, $"Unexpected TypeInfo.ConvertedType '{actualConvertedType}'"); 36270Assert.True((object)method != null, $"Could not find method '{memberName}'");
SourceGeneration\GeneratorDriverTests.cs (4)
1006var generator = new CallbackGenerator((ic) => ic.RegisterForPostInitialization(postInit), (sgc) => Assert.True(false, "Should not execute"), source = "public class E : D {}"); 1038Assert.True(false, "Should not execute"); 1041var generator = new CallbackGenerator(init, (sgc) => Assert.True(false, "Should not execute"), source = "public class E : D {}"); 1358Assert.True(start >= 0, $"Not found in source: '{x.Location}'");
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (58)
Compilation\CompilationAPITests.cs (1)
1286Assert.True(comp.ExternalReferences[2] is CSharpCompilationReference, "Expected compilation reference");
Compilation\GetSemanticInfoTests.cs (17)
4943Assert.True(symbolInfo.IsDefined, "must be defined"); 4947Assert.True(symbolInfo.IsDefined, "must be defined"); 4951Assert.True(symbolInfo.IsDefined, "must be defined"); 4955Assert.True(symbolInfo.IsDefined, "must be defined"); 5041Assert.True(symbolInfo.IsDefined, "must be defined"); 5057Assert.True(symbolInfo.IsDefined, "must be defined"); 5073Assert.True(symbolInfo.IsDefined, "must be defined"); 5089Assert.True(symbolInfo.IsDefined, "must be defined"); 5122Assert.True(symbolInfo.IsDefined, "must be defined"); 5139Assert.True(symbolInfo.IsDefined, "must be defined"); 5188Assert.True(symbolInfo.IsDefined, "must be defined"); 5205Assert.True(symbolInfo.IsDefined, "must be defined"); 5222Assert.True(symbolInfo.IsDefined, "must be defined"); 5303Assert.True(symbolInfo.IsDefined, "must be defined"); 5320Assert.True(symbolInfo.IsDefined, "must be defined"); 5939Assert.True(exceptionThrown, $"{nameof(comp.GetSpecialType)} did not throw when it should have."); 5962Assert.True(exceptionThrown, $"{nameof(comp.GetSpecialType)} did not throw when it should have.");
Compilation\IndexedProperties_BindingTests.cs (9)
162Assert.True(actual_lookupNames.Contains("System"), "LookupNames does not contain System"); 163Assert.True(actual_lookupNames.Contains("Main"), "LookupNames does not contain Main"); 164Assert.True(actual_lookupNames.Contains("IA"), "LookupNames does not contain IA"); 165Assert.True(actual_lookupNames.Contains("A"), "LookupNames does not contain A"); 166Assert.True(actual_lookupNames.Contains("a"), "LookupNames does not contain a"); 173Assert.True(actual_lookupSymbols_as_string.Contains("void B.Main(System.String[] args)"), "LookupSymbols does not contain Main"); 174Assert.True(actual_lookupSymbols_as_string.Contains("System"), "LookupSymbols does not contain System"); 175Assert.True(actual_lookupSymbols_as_string.Contains("IA"), "LookupSymbols does not contain IA"); 176Assert.True(actual_lookupSymbols_as_string.Contains("A"), "LookupSymbols does not contain A");
Compilation\ReferenceManagerTests.cs (2)
1406Assert.True(symbolB is Microsoft.CodeAnalysis.CSharp.Symbols.Metadata.PE.PEAssemblySymbol, "PE symbol expected"); 1411Assert.True(symbolA2 is Microsoft.CodeAnalysis.CSharp.Symbols.Metadata.PE.PEAssemblySymbol, "PE symbol expected");
Compilation\SemanticModelAPITests.cs (7)
1438Assert.True(constantInfo.HasValue, "must be a constant"); 1476Assert.True(constantInfo.HasValue, "must be a constant"); 1524Assert.True(constantInfo.HasValue, "must be a constant"); 1612Assert.True(constantInfo.HasValue, "must be a constant"); 1697Assert.True(constantInfo.HasValue, "must be a constant"); 2272Assert.True(binder.InUnsafeRegion, "must be in unsafe code"); 2273Assert.True(binder.IsSemanticModelBinder, "must be speculative");
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (5)
4276Assert.True(constantInfo.HasValue, "must be constant"); 4291Assert.True(constantInfo.HasValue, "must be constant"); 4337Assert.True(constantInfo.HasValue, "must be constant"); 4360Assert.True(constantInfo.HasValue, "must be constant"); 4382Assert.True(constantInfo.HasValue, "must be constant");
Symbols\ConversionTests.cs (1)
186Assert.True(false, string.Format("Expected {0} but got {1} when converting {2} -> {3}", kind, result, types[j], types[i]));
Symbols\Metadata\MetadataMemberTests.cs (4)
626Assert.True(memberNames1.Contains(m), m); 636Assert.True(memberNames2.Contains(m), m); 667Assert.True(memberNames1.Contains(m), m); 678Assert.True(memberNames2.Contains(m), m);
Symbols\MissingSpecialMember.cs (1)
1085Assert.True((object)symbol != null, $"Unexpected null for {wkm}");
Symbols\OverriddenOrHiddenMembersTests.cs (1)
210Assert.True(expected == actual, string.Format("expected {0}, actual {1}", expected, actual));
Symbols\RequiredMembersTests.cs (1)
41Assert.True(member is PropertySymbol or FieldSymbol, $"Unexpected member symbol type {member.Kind}");
Symbols\Source\DeclaringSyntaxNodeTests.cs (2)
120Assert.True(!symbol.IsFromCompilation(compilation) || symbol.IsImplicitlyDeclared, "non-implicitly declares source symbol should have declaring location"); 124Assert.True(symbol.IsFromCompilation(compilation) || symbol is MergedNamespaceSymbol, "symbol with declaration should be in source, except for merged namespaces");
Symbols\Source\EnumTests.cs (3)
1032Assert.True(currentSymbol is NamespaceOrTypeSymbol, string.Format("{0} does not have members", currentSymbol.ToTestDisplayString())); 1035Assert.True(members.Length > 0, string.Format("No members named {0} inside {1}", name, currentSymbol.ToTestDisplayString())); 1036Assert.True(members.Length <= 1, string.Format("Multiple members named {0} inside {1}", name, currentSymbol.ToTestDisplayString()));
Symbols\Source\UpdatedContainingSymbolAndNullableAnntotationTests.cs (1)
59Assert.True(nullableIgnored, "If considerEverything is true, nullableIgnored should be true as well.");
Symbols\SymbolErrorTests.cs (1)
16958Assert.True((TypeSymbol.Equals(classBinN1, (TypeSymbol)errorFieldType.CandidateSymbols[0], TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(classBinN2, (TypeSymbol)errorFieldType.CandidateSymbols[1], TypeCompareKind.ConsiderEverything2)) ||
Symbols\TypeUnificationTests.cs (2)
426Assert.True(TypeUnification.CanUnify(t1, t2), string.Format("{0} vs {1}", t1, t2)); 427Assert.True(TypeUnification.CanUnify(t2, t1), string.Format("{0} vs {1}", t2, t1));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (266)
Diagnostics\DiagnosticTest.cs (4)
60Assert.True(set.Add(value), $"{value} is duplicated!"); 477Assert.True(false, $"Please update this test case with a proper warning level ({ErrorFacts.GetWarningLevel(errorCode)}) for '{errorCodeName}'"); 2403Assert.True(index >= 0, "textToFind not found in the tree"); 2983Assert.True(isBuildOnly, $"Check failed for ErrorCode.{errorCode}");
Diagnostics\LocationsTests.cs (1)
70Assert.True(index >= 0, "textToFind not found in the tree");
Generated\Syntax.Test.xml.Generated.cs (244)
14109Assert.True(newNode.IsMissing, "No tokens => missing"); 14135Assert.True(newNode.IsMissing, "No tokens => missing"); 14161Assert.True(newNode.IsMissing, "No tokens => missing"); 14187Assert.True(newNode.IsMissing, "No tokens => missing"); 14213Assert.True(newNode.IsMissing, "No tokens => missing"); 14239Assert.True(newNode.IsMissing, "No tokens => missing"); 14265Assert.True(newNode.IsMissing, "No tokens => missing"); 14291Assert.True(newNode.IsMissing, "No tokens => missing"); 14317Assert.True(newNode.IsMissing, "No tokens => missing"); 14343Assert.True(newNode.IsMissing, "No tokens => missing"); 14369Assert.True(newNode.IsMissing, "No tokens => missing"); 14395Assert.True(newNode.IsMissing, "No tokens => missing"); 14421Assert.True(newNode.IsMissing, "No tokens => missing"); 14447Assert.True(newNode.IsMissing, "No tokens => missing"); 14473Assert.True(newNode.IsMissing, "No tokens => missing"); 14499Assert.True(newNode.IsMissing, "No tokens => missing"); 14525Assert.True(newNode.IsMissing, "No tokens => missing"); 14551Assert.True(newNode.IsMissing, "No tokens => missing"); 14577Assert.True(newNode.IsMissing, "No tokens => missing"); 14603Assert.True(newNode.IsMissing, "No tokens => missing"); 14629Assert.True(newNode.IsMissing, "No tokens => missing"); 14655Assert.True(newNode.IsMissing, "No tokens => missing"); 14681Assert.True(newNode.IsMissing, "No tokens => missing"); 14707Assert.True(newNode.IsMissing, "No tokens => missing"); 14733Assert.True(newNode.IsMissing, "No tokens => missing"); 14759Assert.True(newNode.IsMissing, "No tokens => missing"); 14785Assert.True(newNode.IsMissing, "No tokens => missing"); 14811Assert.True(newNode.IsMissing, "No tokens => missing"); 14837Assert.True(newNode.IsMissing, "No tokens => missing"); 14863Assert.True(newNode.IsMissing, "No tokens => missing"); 14889Assert.True(newNode.IsMissing, "No tokens => missing"); 14915Assert.True(newNode.IsMissing, "No tokens => missing"); 14941Assert.True(newNode.IsMissing, "No tokens => missing"); 14967Assert.True(newNode.IsMissing, "No tokens => missing"); 14993Assert.True(newNode.IsMissing, "No tokens => missing"); 15019Assert.True(newNode.IsMissing, "No tokens => missing"); 15045Assert.True(newNode.IsMissing, "No tokens => missing"); 15071Assert.True(newNode.IsMissing, "No tokens => missing"); 15097Assert.True(newNode.IsMissing, "No tokens => missing"); 15123Assert.True(newNode.IsMissing, "No tokens => missing"); 15149Assert.True(newNode.IsMissing, "No tokens => missing"); 15175Assert.True(newNode.IsMissing, "No tokens => missing"); 15201Assert.True(newNode.IsMissing, "No tokens => missing"); 15227Assert.True(newNode.IsMissing, "No tokens => missing"); 15253Assert.True(newNode.IsMissing, "No tokens => missing"); 15279Assert.True(newNode.IsMissing, "No tokens => missing"); 15305Assert.True(newNode.IsMissing, "No tokens => missing"); 15331Assert.True(newNode.IsMissing, "No tokens => missing"); 15357Assert.True(newNode.IsMissing, "No tokens => missing"); 15383Assert.True(newNode.IsMissing, "No tokens => missing"); 15409Assert.True(newNode.IsMissing, "No tokens => missing"); 15435Assert.True(newNode.IsMissing, "No tokens => missing"); 15461Assert.True(newNode.IsMissing, "No tokens => missing"); 15487Assert.True(newNode.IsMissing, "No tokens => missing"); 15513Assert.True(newNode.IsMissing, "No tokens => missing"); 15539Assert.True(newNode.IsMissing, "No tokens => missing"); 15565Assert.True(newNode.IsMissing, "No tokens => missing"); 15591Assert.True(newNode.IsMissing, "No tokens => missing"); 15617Assert.True(newNode.IsMissing, "No tokens => missing"); 15643Assert.True(newNode.IsMissing, "No tokens => missing"); 15669Assert.True(newNode.IsMissing, "No tokens => missing"); 15695Assert.True(newNode.IsMissing, "No tokens => missing"); 15721Assert.True(newNode.IsMissing, "No tokens => missing"); 15747Assert.True(newNode.IsMissing, "No tokens => missing"); 15773Assert.True(newNode.IsMissing, "No tokens => missing"); 15799Assert.True(newNode.IsMissing, "No tokens => missing"); 15825Assert.True(newNode.IsMissing, "No tokens => missing"); 15851Assert.True(newNode.IsMissing, "No tokens => missing"); 15877Assert.True(newNode.IsMissing, "No tokens => missing"); 15903Assert.True(newNode.IsMissing, "No tokens => missing"); 15929Assert.True(newNode.IsMissing, "No tokens => missing"); 15955Assert.True(newNode.IsMissing, "No tokens => missing"); 15981Assert.True(newNode.IsMissing, "No tokens => missing"); 16007Assert.True(newNode.IsMissing, "No tokens => missing"); 16033Assert.True(newNode.IsMissing, "No tokens => missing"); 16059Assert.True(newNode.IsMissing, "No tokens => missing"); 16085Assert.True(newNode.IsMissing, "No tokens => missing"); 16111Assert.True(newNode.IsMissing, "No tokens => missing"); 16137Assert.True(newNode.IsMissing, "No tokens => missing"); 16163Assert.True(newNode.IsMissing, "No tokens => missing"); 16189Assert.True(newNode.IsMissing, "No tokens => missing"); 16215Assert.True(newNode.IsMissing, "No tokens => missing"); 16241Assert.True(newNode.IsMissing, "No tokens => missing"); 16267Assert.True(newNode.IsMissing, "No tokens => missing"); 16293Assert.True(newNode.IsMissing, "No tokens => missing"); 16319Assert.True(newNode.IsMissing, "No tokens => missing"); 16345Assert.True(newNode.IsMissing, "No tokens => missing"); 16371Assert.True(newNode.IsMissing, "No tokens => missing"); 16397Assert.True(newNode.IsMissing, "No tokens => missing"); 16423Assert.True(newNode.IsMissing, "No tokens => missing"); 16449Assert.True(newNode.IsMissing, "No tokens => missing"); 16475Assert.True(newNode.IsMissing, "No tokens => missing"); 16501Assert.True(newNode.IsMissing, "No tokens => missing"); 16527Assert.True(newNode.IsMissing, "No tokens => missing"); 16553Assert.True(newNode.IsMissing, "No tokens => missing"); 16579Assert.True(newNode.IsMissing, "No tokens => missing"); 16605Assert.True(newNode.IsMissing, "No tokens => missing"); 16631Assert.True(newNode.IsMissing, "No tokens => missing"); 16657Assert.True(newNode.IsMissing, "No tokens => missing"); 16683Assert.True(newNode.IsMissing, "No tokens => missing"); 16709Assert.True(newNode.IsMissing, "No tokens => missing"); 16735Assert.True(newNode.IsMissing, "No tokens => missing"); 16761Assert.True(newNode.IsMissing, "No tokens => missing"); 16787Assert.True(newNode.IsMissing, "No tokens => missing"); 16813Assert.True(newNode.IsMissing, "No tokens => missing"); 16839Assert.True(newNode.IsMissing, "No tokens => missing"); 16865Assert.True(newNode.IsMissing, "No tokens => missing"); 16891Assert.True(newNode.IsMissing, "No tokens => missing"); 16917Assert.True(newNode.IsMissing, "No tokens => missing"); 16943Assert.True(newNode.IsMissing, "No tokens => missing"); 16969Assert.True(newNode.IsMissing, "No tokens => missing"); 16995Assert.True(newNode.IsMissing, "No tokens => missing"); 17021Assert.True(newNode.IsMissing, "No tokens => missing"); 17047Assert.True(newNode.IsMissing, "No tokens => missing"); 17073Assert.True(newNode.IsMissing, "No tokens => missing"); 17099Assert.True(newNode.IsMissing, "No tokens => missing"); 17125Assert.True(newNode.IsMissing, "No tokens => missing"); 17151Assert.True(newNode.IsMissing, "No tokens => missing"); 17177Assert.True(newNode.IsMissing, "No tokens => missing"); 17203Assert.True(newNode.IsMissing, "No tokens => missing"); 17229Assert.True(newNode.IsMissing, "No tokens => missing"); 17255Assert.True(newNode.IsMissing, "No tokens => missing"); 17281Assert.True(newNode.IsMissing, "No tokens => missing"); 17307Assert.True(newNode.IsMissing, "No tokens => missing"); 17333Assert.True(newNode.IsMissing, "No tokens => missing"); 17359Assert.True(newNode.IsMissing, "No tokens => missing"); 17385Assert.True(newNode.IsMissing, "No tokens => missing"); 17411Assert.True(newNode.IsMissing, "No tokens => missing"); 17437Assert.True(newNode.IsMissing, "No tokens => missing"); 17463Assert.True(newNode.IsMissing, "No tokens => missing"); 17489Assert.True(newNode.IsMissing, "No tokens => missing"); 17515Assert.True(newNode.IsMissing, "No tokens => missing"); 17541Assert.True(newNode.IsMissing, "No tokens => missing"); 17567Assert.True(newNode.IsMissing, "No tokens => missing"); 17593Assert.True(newNode.IsMissing, "No tokens => missing"); 17619Assert.True(newNode.IsMissing, "No tokens => missing"); 17645Assert.True(newNode.IsMissing, "No tokens => missing"); 17671Assert.True(newNode.IsMissing, "No tokens => missing"); 17697Assert.True(newNode.IsMissing, "No tokens => missing"); 17723Assert.True(newNode.IsMissing, "No tokens => missing"); 17749Assert.True(newNode.IsMissing, "No tokens => missing"); 17775Assert.True(newNode.IsMissing, "No tokens => missing"); 17801Assert.True(newNode.IsMissing, "No tokens => missing"); 17827Assert.True(newNode.IsMissing, "No tokens => missing"); 17853Assert.True(newNode.IsMissing, "No tokens => missing"); 17879Assert.True(newNode.IsMissing, "No tokens => missing"); 17905Assert.True(newNode.IsMissing, "No tokens => missing"); 17931Assert.True(newNode.IsMissing, "No tokens => missing"); 17957Assert.True(newNode.IsMissing, "No tokens => missing"); 17983Assert.True(newNode.IsMissing, "No tokens => missing"); 18009Assert.True(newNode.IsMissing, "No tokens => missing"); 18035Assert.True(newNode.IsMissing, "No tokens => missing"); 18061Assert.True(newNode.IsMissing, "No tokens => missing"); 18087Assert.True(newNode.IsMissing, "No tokens => missing"); 18113Assert.True(newNode.IsMissing, "No tokens => missing"); 18139Assert.True(newNode.IsMissing, "No tokens => missing"); 18165Assert.True(newNode.IsMissing, "No tokens => missing"); 18191Assert.True(newNode.IsMissing, "No tokens => missing"); 18217Assert.True(newNode.IsMissing, "No tokens => missing"); 18243Assert.True(newNode.IsMissing, "No tokens => missing"); 18269Assert.True(newNode.IsMissing, "No tokens => missing"); 18295Assert.True(newNode.IsMissing, "No tokens => missing"); 18321Assert.True(newNode.IsMissing, "No tokens => missing"); 18347Assert.True(newNode.IsMissing, "No tokens => missing"); 18373Assert.True(newNode.IsMissing, "No tokens => missing"); 18399Assert.True(newNode.IsMissing, "No tokens => missing"); 18425Assert.True(newNode.IsMissing, "No tokens => missing"); 18451Assert.True(newNode.IsMissing, "No tokens => missing"); 18477Assert.True(newNode.IsMissing, "No tokens => missing"); 18503Assert.True(newNode.IsMissing, "No tokens => missing"); 18529Assert.True(newNode.IsMissing, "No tokens => missing"); 18555Assert.True(newNode.IsMissing, "No tokens => missing"); 18581Assert.True(newNode.IsMissing, "No tokens => missing"); 18607Assert.True(newNode.IsMissing, "No tokens => missing"); 18633Assert.True(newNode.IsMissing, "No tokens => missing"); 18659Assert.True(newNode.IsMissing, "No tokens => missing"); 18685Assert.True(newNode.IsMissing, "No tokens => missing"); 18711Assert.True(newNode.IsMissing, "No tokens => missing"); 18737Assert.True(newNode.IsMissing, "No tokens => missing"); 18763Assert.True(newNode.IsMissing, "No tokens => missing"); 18789Assert.True(newNode.IsMissing, "No tokens => missing"); 18815Assert.True(newNode.IsMissing, "No tokens => missing"); 18841Assert.True(newNode.IsMissing, "No tokens => missing"); 18867Assert.True(newNode.IsMissing, "No tokens => missing"); 18893Assert.True(newNode.IsMissing, "No tokens => missing"); 18919Assert.True(newNode.IsMissing, "No tokens => missing"); 18945Assert.True(newNode.IsMissing, "No tokens => missing"); 18971Assert.True(newNode.IsMissing, "No tokens => missing"); 18997Assert.True(newNode.IsMissing, "No tokens => missing"); 19023Assert.True(newNode.IsMissing, "No tokens => missing"); 19049Assert.True(newNode.IsMissing, "No tokens => missing"); 19075Assert.True(newNode.IsMissing, "No tokens => missing"); 19101Assert.True(newNode.IsMissing, "No tokens => missing"); 19127Assert.True(newNode.IsMissing, "No tokens => missing"); 19153Assert.True(newNode.IsMissing, "No tokens => missing"); 19179Assert.True(newNode.IsMissing, "No tokens => missing"); 19205Assert.True(newNode.IsMissing, "No tokens => missing"); 19231Assert.True(newNode.IsMissing, "No tokens => missing"); 19257Assert.True(newNode.IsMissing, "No tokens => missing"); 19283Assert.True(newNode.IsMissing, "No tokens => missing"); 19309Assert.True(newNode.IsMissing, "No tokens => missing"); 19335Assert.True(newNode.IsMissing, "No tokens => missing"); 19361Assert.True(newNode.IsMissing, "No tokens => missing"); 19387Assert.True(newNode.IsMissing, "No tokens => missing"); 19413Assert.True(newNode.IsMissing, "No tokens => missing"); 19439Assert.True(newNode.IsMissing, "No tokens => missing"); 19465Assert.True(newNode.IsMissing, "No tokens => missing"); 19491Assert.True(newNode.IsMissing, "No tokens => missing"); 19517Assert.True(newNode.IsMissing, "No tokens => missing"); 19543Assert.True(newNode.IsMissing, "No tokens => missing"); 19569Assert.True(newNode.IsMissing, "No tokens => missing"); 19595Assert.True(newNode.IsMissing, "No tokens => missing"); 19621Assert.True(newNode.IsMissing, "No tokens => missing"); 19647Assert.True(newNode.IsMissing, "No tokens => missing"); 19673Assert.True(newNode.IsMissing, "No tokens => missing"); 19699Assert.True(newNode.IsMissing, "No tokens => missing"); 19725Assert.True(newNode.IsMissing, "No tokens => missing"); 19751Assert.True(newNode.IsMissing, "No tokens => missing"); 19777Assert.True(newNode.IsMissing, "No tokens => missing"); 19803Assert.True(newNode.IsMissing, "No tokens => missing"); 19829Assert.True(newNode.IsMissing, "No tokens => missing"); 19855Assert.True(newNode.IsMissing, "No tokens => missing"); 19881Assert.True(newNode.IsMissing, "No tokens => missing"); 19907Assert.True(newNode.IsMissing, "No tokens => missing"); 19933Assert.True(newNode.IsMissing, "No tokens => missing"); 19959Assert.True(newNode.IsMissing, "No tokens => missing"); 19985Assert.True(newNode.IsMissing, "No tokens => missing"); 20011Assert.True(newNode.IsMissing, "No tokens => missing"); 20037Assert.True(newNode.IsMissing, "No tokens => missing"); 20063Assert.True(newNode.IsMissing, "No tokens => missing"); 20089Assert.True(newNode.IsMissing, "No tokens => missing"); 20115Assert.True(newNode.IsMissing, "No tokens => missing"); 20141Assert.True(newNode.IsMissing, "No tokens => missing"); 20167Assert.True(newNode.IsMissing, "No tokens => missing"); 20193Assert.True(newNode.IsMissing, "No tokens => missing"); 20219Assert.True(newNode.IsMissing, "No tokens => missing"); 20245Assert.True(newNode.IsMissing, "No tokens => missing"); 20271Assert.True(newNode.IsMissing, "No tokens => missing"); 20297Assert.True(newNode.IsMissing, "No tokens => missing"); 20323Assert.True(newNode.IsMissing, "No tokens => missing"); 20349Assert.True(newNode.IsMissing, "No tokens => missing"); 20375Assert.True(newNode.IsMissing, "No tokens => missing"); 20401Assert.True(newNode.IsMissing, "No tokens => missing"); 20427Assert.True(newNode.IsMissing, "No tokens => missing");
IncrementalParsing\IncrementalParsingTests.cs (3)
2795Assert.True(oldRoot.ContainsAnnotations, "Should contain annotations."); 2804Assert.True(oldClassC.ContainsAnnotations, "Should contain annotations"); 2815Assert.True(oldToken.ContainsAnnotations, "Should contain annotations");
LexicalAndXml\LexicalTests.cs (2)
61Assert.True(false, "More than one token was lexed: " + token); 66Assert.True(false, "No tokens were lexed");
LexicalAndXml\PreprocessorTests.cs (2)
286Assert.True(false, String.Format("You are expecting some text in the directive, but this method doesn't know how to verify it for `{0}`.", exp.Kind)); 350Assert.True(false, "Warning ID must be an identifier or numeric literal");
Parsing\PatternParsingTests.cs (2)
3001Assert.True(false, source); 3006Assert.True(false, source);
Syntax\SyntaxNodeCacheTests.cs (2)
49Assert.True(listOf2 != listOf1, $"{i} iterations"); 74Assert.True(listOf3 != listOf2, $"{i} iterations");
Syntax\SyntaxRewriterTests.cs (4)
325Assert.True(node1.SyntaxTree.HasCompilationUnitRoot, "how did we get a non-CompilationUnit root?"); 341Assert.True(newRoot.SyntaxTree.HasCompilationUnitRoot, "how did we get a non-CompilationUnit root?"); 353Assert.True(newRoot.SyntaxTree.HasCompilationUnitRoot, "how did we get a non-CompilationUnit root?"); 544Assert.True(rewrittenRoot.SyntaxTree.HasCompilationUnitRoot, "how did we get a non-CompilationUnit root?");
Syntax\SyntaxTests.cs (2)
273Assert.True(SyntaxFacts.IsAttributeTargetSpecifier(kind), $$"""IsAttributeTargetSpecific({{kind}}) should be true"""); 292Assert.True(Enum.IsDefined(typeof(SyntaxKind), kind), $"Nonexistent kind '{kind}' returned from method '{method.Name}'");
Microsoft.CodeAnalysis.CSharp.Test.Utilities (15)
CompilationTestUtils.cs (1)
503Assert.True(expr != null, $"VerifyTypes could not find a matching expression for annotation '{text}'.");
CSharpTestBase.cs (4)
1068Assert.True(expectedBlobs.ContainsKey(s), "Expecting marshalling blob for " + (isField ? "field " : "parameter ") + s); 1670Assert.True(compilation.SyntaxTrees.Length > treeIndex, "Compilation has enough trees"); 1691Assert.True(compilation.SyntaxTrees.Length > treeIndex, "Compilation has enough trees"); 1746Assert.True(end > start, "Bind Pos: end > start");
DiagnosticTestUtilities.cs (5)
104Assert.True( 151Assert.True(experr.Line == acterr.Line, String.Format("Line {0}!={1}", experr.Line, acterr.Line)); 152Assert.True(experr.Column == acterr.Column, String.Format("Col {0}!={1}", experr.Column, acterr.Column)); 155Assert.True(experr.IsWarning == acterr.IsWarning, String.Format("IsWarning {0}!={1}", experr.IsWarning, acterr.IsWarning)); 160Assert.True(experr.Parameters.SequenceEqual(acterr.Parameters), String.Format("Param: {0}!={1}", experr.Parameters.Count(), acterr.Parameters.Count()));
Extensions.cs (3)
228Assert.True(false, string.Format("Could not find member named '{0}'. Available members:\r\n{1}", 290Assert.True(false, "Found multiple members of specified name:\r\n" + string.Join("\r\n", members)); 306Assert.True(false, "Found multiple members of specified name:\r\n" + string.Join("\r\n", members));
FunctionPointerUtilities.cs (2)
296Assert.True(false, $"Cannot have a return ref kind of {signature.RefKind}"); 326Assert.True(false, $"Cannot have a return ref kind of {parameter.RefKind}");
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
Metadata\WinMdDumpTest.cs (1)
461Assert.True(false, "Dump is different. To investigate compare files:\r\n\"" + fileExpected + "\" \"" + fileActual + "\"");
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (5)
Formatting\EditorConfigOptionParserTests.cs (5)
40Assert.True(CSharpFormattingOptions2.ParseEditorConfigSpacingAroundBinaryOperator(value) == expectedResult, 50Assert.True(CSharpFormattingOptions2.ParseEditorConfigSpacingAroundBinaryOperator(value) == BinaryOperatorSpacingOptions.Single, 60Assert.True(CSharpFormattingOptions2.ParseEditorConfigLabelPositioning(value) == expectedValue, 70Assert.True(CSharpFormattingOptions2.ParseEditorConfigLabelPositioning(value) == LabelPositionOptions.NoIndent, 117Assert.True(CSharpFormattingOptions2.DetermineIfIgnoreSpacesAroundVariableDeclarationIsSet(value),
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (25)
AbstractCommandHandlerTestState.cs (1)
90Assert.True(cursorPosition == firstSpan.Start || cursorPosition == firstSpan.End
AbstractTypingCommandHandlerTest.cs (1)
52Assert.True(expectedPosition == caretPosition,
AutomaticCompletion\AbstractAutomaticBraceCompletionTests.cs (1)
85Assert.True(indentation == virtualCaret.VirtualSpaces, $"Expected indentation was {indentation}, but the actual indentation was {virtualCaret.VirtualSpaces}");
CompleteStatement\AbstractCompleteStatementTests.cs (2)
103Assert.True(testDocument.CursorPosition.HasValue || testDocument.SelectedSpans.Any(), "No caret position or selected spans are set!"); 127Assert.True(expectedPosition == endCaretPosition,
Completion\AbstractCompletionProviderTests.cs (2)
1063Assert.True(isTextualTriggerCharacterResult, assertText); 1104Assert.True(CommitManager.IsCommitCharacter(
DocumentationComments\AbstractDocumentationCommentTests.cs (1)
135Assert.True(testDocument.CursorPosition.HasValue, "No caret position set!");
DocumentationComments\AbstractXmlTagCompletionTests.cs (1)
45Assert.True(expectedPosition == caretPosition,
Formatting\CoreFormatterTestsBase.cs (2)
153Assert.True(expectedPosition == caretPosition, 270Assert.True(expectedPosition == caretPosition,
LanguageServer\AbstractLanguageServerProtocolTests.cs (1)
724Assert.True(queueAccessor.IsComplete(), "Unexpected queue not complete");
NavigateTo\AbstractNavigateToTests.cs (2)
176Assert.True(expectedItem.PatternMatch.Kind == actualItem.PatternMatch.Kind, string.Format("pattern: {0} expected: {1} actual: {2}", expectedItem.Name, expectedItem.PatternMatch.Kind, actualItem.PatternMatch.Kind)); 177Assert.True(expectedItem.PatternMatch.IsCaseSensitive == actualItem.PatternMatch.IsCaseSensitive, string.Format("pattern: {0} expected: {1} actual: {2}", expectedItem.Name, expectedItem.PatternMatch.IsCaseSensitive, actualItem.PatternMatch.IsCaseSensitive));
Rename\RenamerTests.cs (1)
80Assert.True(remainingErrors.Contains(error), $"Error '{error}' was unexpected");
SignatureHelp\AbstractSignatureHelpProviderTests.cs (6)
185Assert.True(expectedTestItems.Count() == actualSignatureHelpItems.Items.Count(), $"Expected {expectedTestItems.Count()} items, but got {actualSignatureHelpItems.Items.Count()}"); 240Assert.True(expectedTestItem.CurrentParameterIndex == items.SemanticParameterIndex, $"The current parameter is {items.SemanticParameterIndex}, but we expected {expectedTestItem.CurrentParameterIndex}"); 430Assert.True(expectedOrderedItemsOrNull.Count(i => i.IsSelected) == 1, "Only one expected item can be marked with 'IsSelected'"); 431Assert.True(selectedItemIndex != null, "Expected an item to be selected, but no item was actually selected"); 438Assert.True(selectedItemIndex == counter, 443Assert.True(selectedItemIndex != counter,
Structure\AbstractSyntaxStructureProviderTests.cs (4)
54Assert.True(expectedRegions.Length == actualRegions.Length, $"Expected {expectedRegions.Length} regions but there were {actualRegions.Length}"); 74Assert.True(actualRegions.Length == 0, $"Expected no regions but found {actualRegions.Length}."); 89Assert.True(spans.ContainsKey(textSpanName) && spans[textSpanName].Length == 1, $"Test did not specify '{textSpanName}' span."); 90Assert.True(spans.ContainsKey(hintSpanName) && spans[hintSpanName].Length == 1, $"Test did not specify '{hintSpanName}' span.");
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (48)
CodeActions\CodeChangeProviderMetadataTests.cs (4)
44Assert.True(failureMessage.Length == passLength, failureMessage.ToString()); 82Assert.True(failureMessage.Length == passLength, failureMessage.ToString()); 109Assert.True(failureMessage.Length == passLength, failureMessage.ToString()); 136Assert.True(failureMessage.Length == passLength, failureMessage.ToString());
CodeGeneration\AbstractCodeGenerationTests.cs (1)
74Assert.True(cs != null || csSimple != null || vb != null || vbSimple != null,
CodeGeneration\CodeGenerationTests.cs (1)
258Assert.True(exception != null && exception.Message.StartsWith(expectedMessage, StringComparison.Ordinal),
Diagnostics\IDEDiagnosticIDConfigurationTests.cs (2)
79Assert.True(helpLinkUri == string.Empty, $"Expected empty help link for {diagnosticId}"); 91Assert.True(false, $"Invalid help link for {diagnosticId}");
EmbeddedLanguages\StackFrame\StackFrameParserTests.Utilities.cs (1)
107Assert.True(false, PrintDifference());
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (4)
120Assert.True(File.Exists(portableExecutable.FilePath), $"'{portableExecutable.FilePath}' does not exist for reference '{portableExecutable.Display}'"); 121Assert.True(Path.IsPathRooted(portableExecutable.FilePath), $"'{portableExecutable.FilePath}' is not a fully-qualified file name"); 125Assert.True(File.Exists(reference.Display), $"'{reference.Display}' does not exist"); 126Assert.True(Path.IsPathRooted(reference.Display), $"'{reference.Display}' is not a fully-qualified file name");
SymbolFinder\DependentTypeFinderTests.cs (8)
453Assert.True(transitiveDerived.All(d => d.GetBaseTypes().Contains(rootType)), "All results must transitively derive from the type"); 454Assert.True(transitiveDerived.Any(d => !Equals(d.BaseType, rootType)), "At least one result must not immediately derive from the type"); 502Assert.True(transitiveDerived.All(d => d.AllInterfaces.Contains(rootType)), "All results must transitively derive from the type"); 503Assert.True(transitiveDerived.Any(d => !d.Interfaces.Contains(rootType)), "At least one result must not immediately derive from the type"); 554Assert.True(transitiveImpls.All(d => d.AllInterfaces.Contains(rootType)), "All results must transitively derive from the type"); 555Assert.True(transitiveImpls.Any(d => !d.Interfaces.Contains(rootType)), "At least one result must not immediately derive from the type"); 583Assert.True(delegates.Any(i => i.Locations.Any(loc => loc.IsInMetadata)), "We should find a metadata delegate"); 613Assert.True(enums.Any(i => i.Locations.Any(loc => loc.IsInMetadata)), "We should find a metadata enum");
Utilities\AsynchronousOperationListenerTests.cs (17)
96Assert.True(done, "The operation should have completed"); 128Assert.True(done, "Should have waited for the queued operation to finish!"); 160Assert.True(done, "Cancelling should have completed the current task."); 193Assert.True(innerDone, "Should have completed the inner task"); 194Assert.True(outerDone, "Should have completed the outer task"); 237Assert.True(outerDone, "The outer task should have finished!"); 238Assert.True(firstQueuedDone, "The first queued task should have finished"); 239Assert.True(secondQueuedDone, "The second queued task should have finished"); 282Assert.True(done.Task.IsCompleted, "Cancelling should have completed the current task."); 283Assert.True(queuedFinished.Task.IsCompleted, "Continued didn't run, but it was supposed to ignore the cancel."); 320Assert.True(firstDone, "First didn't finish"); 321Assert.True(secondDone, "Should have waited for the second task"); 330Assert.True(signal.Wait(s_unexpectedDelay), "Shouldn't have hit timeout waiting for task to begin"); 332Assert.True(waitTask.Wait(s_unexpectedDelay), "Wait shouldn't have needed to timeout"); 341Assert.True(signal1.Wait(s_unexpectedDelay), "Shouldn't have hit timeout waiting for task to begin"); 342Assert.True(signal2.Wait(s_unexpectedDelay), "Shouldn't have hit timeout waiting for task to begin"); 345Assert.True(waitTask.Wait(s_unexpectedDelay), "Wait shouldn't have needed to timeout");
Utilities\BloomFilterTests.cs (3)
79Assert.True(falsePositivePercentage < (d * 1.5), string.Format("falsePositivePercentage={0}, d={1}", falsePositivePercentage, d)); 199Assert.True(falsePositivePercentage < (d * 1.5), string.Format("falsePositivePercentage={0}, d={1}", falsePositivePercentage, d)); 270Assert.True(falsePositivePercentage < (d * 1.5), string.Format("falsePositivePercentage={0}, d={1}", falsePositivePercentage, d));
Utilities\StackFrameUtils.cs (3)
44Assert.True(expected.ChildCount == actual.ChildCount, PrintChildDifference(expected, actual)); 126Assert.True(actual.IsDefault, diffMessage); 131Assert.True(expected.Length == actual.Length, diffMessage);
ValueTracking\AbstractBaseValueTrackingTests.cs (2)
45Assert.True(itemInfo.Length == items.Length, $"GetTrackedItemsAsync\n\texpected: [{string.Join(",", itemInfo.Select(p => p.text))}]\n\t actual: [{string.Join(",", items)}]"); 58Assert.True(childInfo.Length == children.Length, $"GetTrackedItemsAsync on [{item}]\n\texpected: [{string.Join(",", childInfo.Select(p => p.text))}]\n\t actual: [{string.Join(",", children)}]");
Workspaces\ClassificationTypeNamesTests.cs (2)
37Assert.True(classificationType != null, $"{nameof(ClassificationTypeNames)}.{fieldName} has value \"{classificationTypeName}\", but no matching {nameof(ClassificationTypeDefinition)} was exported."); 42=> Assert.True(ClassificationTypeNames.AllTypeNames.Contains(fieldName), $"Missing token type {fieldName}.");
Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests (1)
RazorPredefinedProviderNameTests.cs (1)
46Assert.True(failureMessage.Length == passLength, failureMessage.ToString());
Microsoft.CodeAnalysis.Features.Test.Utilities (6)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
353Assert.True(false, $"Content of document should never be loaded");
EditAndContinue\Extensions.cs (1)
67Assert.True(Encoding.UTF8.GetByteCount(projectName) <= 20, "Use shorter project names in tests");
EditAndContinue\RudeEditDiagnosticDescription.cs (1)
76Assert.True(false, $"Message format string was not supplied enough arguments.\nRudeEditKind: {RudeEditKind}\nArguments supplied: {_arguments.Length}\nFormat string: {format}");
Snippets\AbstractSnippetProviderTests.cs (3)
60Assert.True(isValidSnippetLocation, "Snippet is unexpectedly invalid on a given position"); 77Assert.True(false, "Expected placeholder locations contains span with invalid annotation"); 88Assert.True(false, $"Placeholder location for index {i} was not specified");
Microsoft.CodeAnalysis.Features.UnitTests (7)
EditAndContinue\EditAndContinueCapabilitiesTests.cs (1)
66Assert.True(service.HasFlag(flag), $"Capability '{name}' was not parsed correctly, so it's impossible for a runtime to enable it!");
EditAndContinue\RudeEditDiagnosticTests.cs (6)
93Assert.True(d.GetMessage().Contains("<1>"), kind.ToString()); 94Assert.True(d.GetMessage().Contains("<2>"), kind.ToString()); 101Assert.True(d.GetMessage().Contains("<1>"), kind.ToString()); 102Assert.True(d.GetMessage().Contains("<2>"), kind.ToString()); 103Assert.True(d.GetMessage().Contains("<3>"), kind.ToString()); 110Assert.True(d.GetMessage().Contains("<1>"), kind.ToString());
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (5)
SemanticTokens\AbstractSemanticTokensTests.cs (5)
79Assert.True(tokens[i] >= 0, "The line offset should never be negative."); 83Assert.True(tokens[i + 1] >= 0, "The character offset should never be negative."); 92Assert.True(currentChar >= 0, "The first token on the line can't be a negative position, but applying an offset took us there."); 97Assert.True(tokenLength >= 0, "The token cannot have a negative length."); 105Assert.True(currentChar + tokenLength <= lineLength,
Microsoft.CodeAnalysis.Rebuild.UnitTests (3)
DeterministicKeyBuilderTests.cs (1)
211Assert.True(false, $"Could not find reference with MVID {expectedMvid}");
RoundTripUtil.cs (2)
178Assert.True(false, $@" 192Assert.True(false, $@"
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (10)
GlobalAssemblyCacheTests.cs (10)
27Assert.True(names.Length >= 1, "At least 1 mscorlib"); 34Assert.True(names.Length >= 1, "At least one 32bit mscorlib"); 41Assert.True(names.Length >= 1, "At least 1 mscorlib"); 48Assert.True(names.Length >= 1, "At least System.Core"); 53Assert.True(name.GetDisplayName().Contains("PublicKeyToken=b77a5c561934e089"), "PublicKeyToken matches"); 57Assert.True(names.Length >= 1, "At least System.Core"); 68Assert.True(names.Length >= 1, "At least System.Core"); 100Assert.True(name.Version >= new Version("2.0.0.0"), "netstandard version must be >= 2.0.0.0"); 108Assert.True(names.Length > 100, "There are at least 100 assemblies in the GAC"); 115Assert.True(gacLocationsUpper.Any(gac => location.StartsWith(gac, StringComparison.OrdinalIgnoreCase)), "Path within some GAC root");
Microsoft.CodeAnalysis.Test.Utilities (51)
Assert\AssertEx.cs (14)
174Assert.True((actual == null) == expected.IsDefault, message); 189Assert.True((expected == null) == actual.IsDefault, message); 219Assert.True(false, message.ToString()); 246Assert.True(false, GetAssertMessage(expected, actual, comparer, message, itemInspector, itemSeparator, expectedValueSourcePath, expectedValueSourceLine)); 262Assert.True(false, GetAssertMessage(expected, actual, comparer, message, itemInspector, itemSeparator, expectedValueSourcePath, expectedValueSourceLine)); 309Assert.True(false, messageBuilder.ToString()); 483Assert.True(result, GetAssertMessage( 499Assert.True(false, message); 510Assert.True(none, string.Format( 520Assert.True(any, string.Format("No expected item was found.\nExisting items: {0}", ToString(actual))); 528Assert.True(all, string.Format( 578Assert.True(false, GetAssertMessage(expected, actual, message, escapeQuotes, expectedValueSourcePath, expectedValueSourceLine)); 604Assert.True(false, message); 955Assert.True(false, builder.ToString());
Assert\AssertXml.cs (1)
53Assert.True(false, message +
CommonTestBase.cs (2)
91Assert.True(expectedOutput == null || 139Assert.True(expectedBlobs.ContainsKey(s), "Expecting marshalling blob for " + (isField ? "field " : "parameter ") + s);
Compilation\CompilationDifference.cs (1)
98Assert.True(sequencePointMarkers.Count > 0, $"No sequence points found in:{Environment.NewLine}{actualPdb}");
Compilation\CompilationExtensions.cs (4)
90Assert.True(emitResult.Success, "Diagnostics:\r\n" + string.Join("\r\n", emitResult.Diagnostics.Select(d => d.ToString()))); 104Assert.True(emitResult.Success, "Diagnostics: " + string.Join(", ", emitResult.Diagnostics.Select(d => d.ToString()))); 300Assert.True(node == operation.Syntax, $"Expected : {node} - Actual : {operation.Syntax}"); 302Assert.True(operation.Type == null || !operation.MustHaveNullType(), $"Unexpected non-null type: {operation.Type}");
Compilation\ControlFlowGraphVerifier.cs (6)
1634Assert.True(CanBeInControlFlowGraph(root), $"Unexpected node kind OperationKind.{root.Kind}"); 1642Assert.True(CanBeInControlFlowGraph(operation), $"Unexpected node kind OperationKind.{operation.Kind}"); 1686Assert.True(false, $"{(symbol.Kind == SymbolKind.Local ? "Local" : "Method")} without owning region {symbol.ToTestDisplayString()} in [{getBlockId(block)}]\n{finalGraph()}"); 1691Assert.True(false, $"Capture [{referencedCaptureIds.First().Value}] without owning region in [{getBlockId(block)}]\n{finalGraph()}"); 1791Assert.True(value, $"{message}\n{finalGraph()}"); 1985Assert.True(false, $"Unhandled node kind OperationKind.{n.Kind}");
Compilation\OperationTreeVerifier.cs (1)
321Assert.True(operation.Type == null || !operation.MustHaveNullType(), $"Unexpected non-null type: {operation.Type}");
Compilation\TestOperationVisitor.cs (3)
588Assert.True(operation.Descendants().All(n => n.IsImplicit), $"Explicit node in default argument value ({operation.Syntax.RawKind}): {operation.Syntax.ToString()}"); 1496Assert.True(false, $"Unexpected symbol {operation.DeconstructSymbol}"); 1540Assert.True(false, $"Unexpected symbol {symbol}");
CompilationVerifier.cs (2)
250Assert.True(found, "Could not find type named " + typeName); 559Assert.True(false, builder.ToString());
Diagnostics\CommonDiagnosticAnalyzers.cs (2)
1131Assert.True(Environment.ProcessorCount > 1, "This analyzer is intended to be used only in a concurrent environment."); 1147Assert.True(context.Compilation.Options.ConcurrentBuild, "This analyzer is intended to be used only when concurrent build is enabled.");
Diagnostics\DiagnosticDescription.cs (1)
525Assert.True(false, "Diagnostic messages should never contain unsubstituted placeholders.\n " + message);
Diagnostics\DiagnosticExtensions.cs (1)
99Assert.True(false, text);
Diagnostics\DiagnosticsHelper.cs (2)
21Assert.True(match.Success, "Could not find a match for \"" + pattern + "\" in:" + Environment.NewLine + source); 28Assert.True(expectedDiagnosticIds.SequenceEqual(actualDiagnosticIds),
Diagnostics\OptionsDiagnosticAnalyzer.cs (1)
68Assert.True(_mismatchedOptions.Count == 0,
Diagnostics\SuppressMessageAttributeTests.cs (1)
1396Assert.True(spans.Length > 0, "Must specify a span within which to generate diagnostics on each token");
Diagnostics\ThrowingDiagnosticAnalyzer.cs (1)
99Assert.True(!handled.Any(h => h == false) && handled.Any(h => true), Environment.NewLine +
Diagnostics\TrackingDiagnosticAnalyzer.cs (3)
102Assert.True(expectedMissingSyntaxKinds.Count == 0, "AllInOne test contains ignored SyntaxKinds: " + string.Join(", ", expectedMissingSyntaxKinds)); 166Assert.True(expected.SequenceEqual(actual), 176Assert.True(missingElements.Count == 0,
FX\ProcessUtilities.cs (1)
147Assert.True(expectedRetCode == process.ExitCode, $"Unexpected exit code: {process.ExitCode} (expecting {expectedRetCode}). Process output: {result}. Process error: {error}");
InstrumentationChecker.cs (1)
403Assert.True(expectedSourceSnippet == null,
Metadata\MetadataSignatureUnitTestHelper.cs (1)
172Assert.True(false, "\n\nExpected:" + expectedText + "\n\nActual:" + actualText + "\n\nDifferences:\n" + diffText);
Metadata\MetadataValidation.cs (1)
44Assert.True(false, "not impl");
ObjectReference.cs (1)
106Assert.True(_strongReference != null, "Reference should still be held.");
Microsoft.CodeAnalysis.UnitTests (44)
AnalyzerAssemblyLoaderTests.cs (1)
1209Assert.True(ex is MissingMethodException or TargetInvocationException, $@"Unexpected exception type: ""{ex.GetType()}""");
Collections\List\CollectionAsserts.cs (2)
32Assert.True(a.MoveNext(), "actual has fewer elements"); 58Assert.True(a.MoveNext(), "actual has fewer elements");
Collections\List\IEnumerable.Generic.Tests.cs (1)
257Assert.True(itemFound, "itemFound");
Collections\List\SegmentedList.Generic.Tests.Misc.cs (9)
378Assert.True(list.Exists(expectedItemDelegate), 383Assert.True((0 < items.Length) == list.Exists((T? item) => { return true; }), 387Assert.True(!list.Exists((T? item) => { return false; }), 392Assert.True(list.Exists((T? item) => { return item == null ? default(T) == null : item.Equals(default(T)); }), 413Assert.True(list.Exists(expectedItemDelegate), 421Assert.True(list.Exists(expectedItemDelegate), 425Assert.True(list.Exists((T item) => { return item != null && (item.Equals(items[0]) || item.Equals(items[1])); }), 688Assert.True(list.TrueForAll(delegate (T item) { return true; }), 692Assert.True((0 == items.Length) == list.TrueForAll(delegate (T item) { return false; }),
Collections\TopologicalSortTests.cs (1)
225Assert.True(seen.Contains(succ), message);
CommonCommandLineParserTests.cs (2)
85Assert.True(false, "Didn't return an error"); 990Assert.True(false, "Didn't throw an exception");
CommonSyntaxTests.cs (2)
24Assert.True(CS.CSharpExtensions.IsCSharpKind((int)kind), kind + " should be C# kind"); 34Assert.True(VB.VisualBasicExtensions.IsVisualBasicKind((int)kind), kind + " should be VB kind");
Diagnostics\SuppressMessageAttributeCompilerTests.cs (1)
29Assert.True(analyzers != null && analyzers.Length > 0, "Must specify at least one diagnostic analyzer to test suppression");
Diagnostics\SuppressMessageTargetSymbolResolverTests.cs (5)
1341Assert.True(pos != null || spans.Count > 0, "Must specify a position or spans marking expected symbols for resolution"); 1373Assert.True(false, 1379Assert.True(expectedSymbol == symbol, 1387Assert.True(expectedSymbols.Contains(symbol), 1419Assert.True(symbols.FirstOrDefault() == null,
FileSystem\PathUtilitiesTests.cs (1)
341Assert.True(isValid == PathUtilities.IsValidFilePath(path), $"Expected {isValid} for \"{path}\"");
MetadataReferences\AssemblyIdentityComparerTests.cs (1)
57Assert.True(AssemblyIdentity.IsFullName(parts2), "Expected full name");
MetadataReferences\AssemblyIdentityDisplayNameTests.cs (1)
147Assert.True(ReferenceEquals(dn1, dn2), "cached full name expected");
MetadataReferences\AssemblyIdentityTests.cs (2)
386Assert.True(equivalent, "Expected equivalent"); 392Assert.True(equivalent, "Expected equivalent");
MetadataReferences\AssemblyMetadataTests.cs (4)
97Assert.True(a.IsImageOwner, "Assembly should own the image"); 98Assert.True(m1.IsImageOwner, "Module should own the image"); 99Assert.True(m2.IsImageOwner, "Module should own the image"); 100Assert.True(m3.IsImageOwner, "Module should own the image");
MetadataReferences\MetadataReferenceTests.cs (1)
554Assert.True(eq, string.Format("expected '{0}' == '{1}'", r.Display, s.Display));
MetadataReferences\ModuleMetadataTests.cs (1)
145Assert.True(m.IsImageOwner, "Metadata should own the image");
Text\TextSpanTest.cs (9)
52Assert.True(s1.Equals(s2), s1.ToString() + " : " + s2.ToString()); 53Assert.True(s1 == s2, s1.ToString() + " : " + s2.ToString()); 68Assert.True(s1 != s2, s1.ToString() + " : " + s2.ToString()); 82Assert.True(s1 != s2, s1.ToString() + " : " + s2.ToString()); 206Assert.True(span1 == span2, span1.ToString() + " : " + span2.ToString()); 211Assert.True(span2 == span1, span2.ToString() + " : " + span1.ToString()); 225Assert.True(span1 != span2, span1.ToString() + " : " + span2.ToString()); 226Assert.True(span1 != span3, span1.ToString() + " : " + span3.ToString()); 227Assert.True(span2 != span3, span2.ToString() + " : " + span3.ToString());
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
CommandLineTests.vb (1)
9538Assert.True(File.Exists(Path.Combine(dir.Path, expectedFile)), "Expected to find: " & expectedFile)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (2)
Attributes\AttributeTests_MarshalAs.vb (2)
42Assert.True(count > 0, "Expected at least one field") 66Assert.True(count > 0, "Expected at least one parameter")
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (2)
Syntax\ManualTests.vb (2)
45Assert.True(Not objUnderTest Is Nothing, "obj can't be Nothing") 51Assert.True(Not objUnderTest Is Nothing, "obj can't be Nothing")
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (11)
CompilationTestUtils.vb (2)
750Assert.True(False, "Should not have any diagnostics") 770Assert.True(False, "Should not have any errors")
ParserTestUtilities.vb (9)
89Assert.True(root.ContainsDiagnostics, "Tree was expected to contain errors.") 388Assert.True(0 <> node.Span.Length OrElse node.Kind = SyntaxKind.CompilationUnit, "Unexpected 0 width node: " & node.Kind.ToString & node.Span.ToString) 452Assert.True(node.SpanStart >= node.Parent.SpanStart AndAlso 800Assert.True(0 <> node.Span.Length, "Unexpected 0 width node: " & node.Kind().ToString & node.Span.ToString) 805Assert.True(0 <> node.Span.Length OrElse node.IsKind(SyntaxKind.EndOfFileToken) OrElse node.IsKind(SyntaxKind.StatementTerminatorToken) OrElse node.IsKind(SyntaxKind.ColonToken), "Unexpected 0 width token: " & node.Kind().ToString & node.Span.ToString) 807Assert.True(0 <> tr.Span.Length, "Unexpected 0 width trivia: " & node.Kind().ToString & node.Span.ToString) 813Assert.True(0 <> tr.Span.Length, "Unexpected 0 width trivia: " & node.Kind().ToString & node.Span.ToString) 842Assert.True(prev.Value.Kind <> tr.Kind, 857Assert.True(node.SpanStart >= node.Parent.SpanStart AndAlso
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (6)
NetCoreTests.cs (6)
45Assert.True(restoreResult.ExitCode == 0, $"{dotNetExeName} failed with exit code {restoreResult.ExitCode}: {restoreResult.Output}"); 252Assert.True(false, $"Unexpected project: {project.Name}"); 329Assert.True(false, $"Encountered unexpected project: {project.FilePath}"); 339Assert.True(actualNames.SetEquals(expectedNames), $"Project names differ!{Environment.NewLine}Actual: {{{actualNames.Join(",")}}}{Environment.NewLine}Expected: {{{expectedNames.Join(",")}}}"); 359Assert.True(false, "OutputFilePath with expected TFM not found."); 488Assert.True(File.Exists(depsJsonFile), $"{depsJsonFile} should exist, or it won't load on some runtimes.");
Microsoft.CodeAnalysis.Workspaces.UnitTests (24)
CodeStyle\EditorConfigCodeStyleParserTests.cs (2)
40Assert.True(result.Value == isEnabled, 42Assert.True(result.Notification.Severity == severity,
FindAllDeclarationsTests.TestSolutionsAndProject.cs (3)
34Assert.True(expectedResultCount == actualResultCount, 51Assert.True(expectedResultCount == actualResultCount, 71Assert.True(
FindReferencesTests.cs (1)
645Assert.True(expectedMatchedLines.Remove(line), $"An unexpected reference was found on line number {line}.");
FunctionIdTests.cs (1)
25Assert.True(false, $"'{nameof(FunctionId)}.{name}' cannot have the same value as '{nameof(FunctionId)}.{existingName}'");
SolutionTests\SolutionTests.cs (15)
2389Assert.True(solution.ProjectIds.Any(), "Solution was expected to have projects"); 2434Assert.True(solution.ContainsProject(pid), "Solution was expected to have project " + pid); 2435Assert.True(project.HasDocuments, "Project was expected to have documents"); 2439Assert.True(project.ContainsDocument(did), "Project was expected to have document " + did); 2456Assert.True(project2.ContainsDocument(did2), "Project was expected to have document " + did2); 2695Assert.True(solution.ContainsProject(project.Id), "Solution was expected to have project " + project.Id); 2710Assert.True(compilation.References.Contains(meta), "Compilation references were expected to contain " + meta); 2739Assert.True(trees.Contains(await doc.GetSyntaxTreeAsync()), "trees list was expected to contain the syntax tree of doc"); 2918Assert.True(sol.ProjectIds.Any(), "Solution was expected to have projects"); 2948Assert.True(sol2.ContainsProject(pid2), "sol2 was expected to contain project " + pid2); 2950Assert.True(sol2.GetProject(pid2).AllProjectReferences.Any(r => r.ProjectId == pid), "sol2 project pid2 was expected to contain project reference " + pid); 2973Assert.True(sol2.ContainsProject(pid2), "sol2 was expected to contain project " + pid2); 2975Assert.True(sol2.GetProject(pid2).AllProjectReferences.Any(r => r.ProjectId == pid), "sol2 pid2 was expected to contain " + pid); 2979Assert.True(sol3.ContainsProject(pid), "sol3 was expected to contain " + pid); 2980Assert.True(sol3.ContainsProject(pid2), "sol3 was expected to contain " + pid2);
UtilityTest\ExceptionHelpersTests.cs (2)
49Assert.True(false, "Should not get here because an exception should be thrown before this point."); 57Assert.True(false, "Should have returned in the catch block before this point.");
Microsoft.CommonLanguageServerProtocol.Framework.UnitTests (1)
ExampleTests.cs (1)
70Assert.True(0 == result, "Server failed to shut down properly");
Microsoft.DotNet.Arcade.Sdk.Tests (2)
GenerateResxSourceTests.cs (2)
52Assert.True(task.Execute(), "Task failed"); 56Assert.True(File.Exists(actualFile), "Actual file does not exist");
Microsoft.DotNet.Helix.Sdk.Tests (1)
HelpersTests.cs (1)
64Assert.True(exists, $"File should exist: {target}");
Microsoft.DotNet.NuGetRepack.Tests (8)
TestHelpers\AssertEx.cs (8)
172Assert.True((actual == null) == expected.IsDefault, message); 184Assert.True((expected == null) == actual.IsDefault, message); 269Assert.True(result, message); 276Assert.True(expectedSet.SetEquals(actual), string.Format("Expected: {0}\nActual: {1}", ToString(expected), ToString(actual))); 284Assert.True(none, string.Format( 294Assert.True(any, string.Format("No expected item was found.\nExisting items: {0}", ToString(actual))); 302Assert.True(all, string.Format( 335Assert.True(AssertEqualityComparer<T>.IsNull(@object), message);
Microsoft.DotNet.Open.Api.Tools.Tests (4)
OpenApiAddURLTests.cs (1)
369Assert.True(_error.ToString().Contains("Aborting to avoid conflicts."), "Should have aborted to avoid conflicts");
OpenApiRefreshTests.cs (2)
38Assert.True(firstWriteTime < secondWriteTime, $"File wasn't updated! {firstWriteTime} {secondWriteTime}"); 68Assert.True(firstWriteTime < secondWriteTime, $"File wasn't updated! {firstWriteTime} {secondWriteTime}");
OpenApiTestBase.cs (1)
111Assert.True(string.IsNullOrEmpty(_error.ToString()), $"Threw error: {_error}");
Microsoft.DotNet.XUnitAssert.Tests (1)
BooleanAssertsTests.cs (1)
95 var ex = Record.Exception(() => Assert.True(false, "Custom User Message"));
Microsoft.Extensions.Caching.Hybrid.Tests (3)
BufferReleaseTests.cs (2)
47Assert.True(cacheItem.NeedsEvictionCallback, "should be pooled memory"); 197Assert.True(cacheItem.NeedsEvictionCallback, "should be pooled memory");
L2Tests.cs (1)
18Assert.True(work, "we didn't expect this to be invoked");
Microsoft.Extensions.Compliance.Testing.Tests (2)
FakeRedactorOptionsValidatorTests.cs (2)
21Assert.True(validationResult.Failed, "Validator passed when it should fail."); 42Assert.True(validationResult.Failed, validationResult.FailureMessage);
Microsoft.Extensions.ML.Tests (2)
FileLoaderTests.cs (1)
76Assert.True(changed.WaitOne(AsyncTestHelper.UnexpectedTimeout), "FileLoader ChangeToken didn't fire before the allotted time.");
UriLoaderTests.cs (1)
55Assert.True(changed.WaitOne(AsyncTestHelper.UnexpectedTimeout), "UriLoader ChangeToken didn't fire before the allotted time.");
Microsoft.Extensions.ServiceDiscovery.Yarp.Tests (2)
YarpServiceDiscoveryTests.cs (2)
259Assert.True(Uri.TryCreate(address, default, out var uri), $"Failed to parse address '{address}' as URI."); 260Assert.True(uri.IsDefaultPort, "URI should use the default port when resolved via DNS.");
Microsoft.Extensions.TimeProvider.Testing.Tests (1)
FakeTimeProviderTests.cs (1)
411Assert.True(true, "Yay, we didn't enter an infinite loop!");
Microsoft.Gen.ComplianceReports.Unit.Tests (4)
test\Generators\Shared\RoslynTestUtils.cs (4)
139Assert.True(expected.Id == actual.Id, 142Assert.True(expectedSpan.Equals(actual.Location.SourceSpan), 166Assert.True(expected.Id == d.Id, 169Assert.True(expectedSpan.Equals(d.Location.SourceSpan),
Microsoft.Gen.ContextualOptions.Unit.Tests (5)
DiagDescriptorsTests.cs (1)
28Assert.True(descriptor.IsEnabledByDefault, descriptor.Id + " should be enabled by default");
test\Generators\Shared\RoslynTestUtils.cs (4)
139Assert.True(expected.Id == actual.Id, 142Assert.True(expectedSpan.Equals(actual.Location.SourceSpan), 166Assert.True(expected.Id == d.Id, 169Assert.True(expectedSpan.Equals(d.Location.SourceSpan),
Microsoft.Gen.Logging.Unit.Tests (5)
DiagDescriptorsTests.cs (1)
29Assert.True(descriptor.IsEnabledByDefault, descriptor.Id + " should be enabled by default");
test\Generators\Shared\RoslynTestUtils.cs (4)
139Assert.True(expected.Id == actual.Id, 142Assert.True(expectedSpan.Equals(actual.Location.SourceSpan), 166Assert.True(expected.Id == d.Id, 169Assert.True(expectedSpan.Equals(d.Location.SourceSpan),
Microsoft.Gen.Metrics.Unit.Tests (5)
DiagDescriptorsTests.cs (1)
28Assert.True(descriptor.IsEnabledByDefault, descriptor.Id + " should be enabled by default");
test\Generators\Shared\RoslynTestUtils.cs (4)
139Assert.True(expected.Id == actual.Id, 142Assert.True(expectedSpan.Equals(actual.Location.SourceSpan), 166Assert.True(expected.Id == d.Id, 169Assert.True(expectedSpan.Equals(d.Location.SourceSpan),
Microsoft.Gen.MetricsReports.Unit.Tests (4)
test\Generators\Shared\RoslynTestUtils.cs (4)
139Assert.True(expected.Id == actual.Id, 142Assert.True(expectedSpan.Equals(actual.Location.SourceSpan), 166Assert.True(expected.Id == d.Id, 169Assert.True(expectedSpan.Equals(d.Location.SourceSpan),
Microsoft.ML.AutoML.Tests (1)
AutoFitTests.cs (1)
682Assert.True(containsMessage,
Microsoft.ML.Benchmarks.Tests (5)
BenchmarksTest.cs (5)
59Assert.True(summary.Reports.Any(), "The \"Summary\" should contain at least one \"BenchmarkReport\" in the \"Reports\" collection"); 61Assert.True(summary.Reports.All(r => r.BuildResult.IsBuildSuccess), 65Assert.True(summary.Reports.All(r => r.ExecuteResults != null), 69Assert.True(summary.Reports.All(r => r.ExecuteResults.Any(er => er.FoundExecutable && er.Results.Any())), 72Assert.True(summary.Reports.All(report => report.AllMeasurements.Any()),
Microsoft.ML.Core.Tests (21)
UnitTests\FileSource.cs (5)
27Assert.True(fileSource.Count == 2, $"Error passing multiple paths to {nameof(MultiFileSource)}"); 39Assert.True(fileSource.Count == 2, $"Error passing concatenated paths to {nameof(MultiFileSource)}"); 42Assert.True(fileSource.Count == 2, $"Error passing concatenated paths to {nameof(MultiFileSource)}"); 74Assert.True(fileSource.Count == 2, $"Error passing concatenated paths to {nameof(MultiFileSource)}"); 77Assert.True(fileSource.Count == 2, $"Error passing concatenated paths to {nameof(MultiFileSource)}");
UnitTests\TestContracts.cs (2)
33Assert.True(caught, "Exception was not caught at all"); 45Assert.True(caught, "Exception was not caught at all");
UnitTests\TestEntryPoints.cs (9)
1632Assert.True(scoreCol.HasValue, "Data scored with binary ensemble does not have a score column"); 1634Assert.True(type is TextDataViewType, "Binary ensemble scored data does not have correct type of metadata."); 1637Assert.True(ReadOnlyMemoryUtils.EqualsStr(AnnotationUtils.Const.ScoreColumnKind.BinaryClassification, kind), 1641Assert.True(scoreCol.HasValue, "Data scored with regression ensemble does not have a score column"); 1643Assert.True(type is TextDataViewType, "Regression ensemble scored data does not have correct type of metadata."); 1645Assert.True(ReadOnlyMemoryUtils.EqualsStr(AnnotationUtils.Const.ScoreColumnKind.Regression, kind), 1649Assert.True(scoreCol.HasValue, "Data scored with anomaly detection ensemble does not have a score column"); 1651Assert.True(type is TextDataViewType, "Anomaly detection ensemble scored data does not have correct type of metadata."); 1653Assert.True(ReadOnlyMemoryUtils.EqualsStr(AnnotationUtils.Const.ScoreColumnKind.AnomalyDetection, kind),
UnitTests\TestVBuffer.cs (5)
765Assert.True(b.IsDense, "Result was not dense, as expected"); 796Assert.True(b.IsDense || !a.IsDense, "Density of a did not imply density of b"); 809Assert.True(bIndices.Remove(i), $"Slot {i} not explicitly represented"); 813Assert.True(aIndices.SetEquals(bIndices), "Indices disagreed on explicit representation"); 1040Assert.True(result, $"Value [{i}] mismatch on expected {expected.GetValues()[i]} vs. actual {actual.GetValues()[i]}");
Microsoft.ML.Predictor.Tests (7)
TestTransposer.cs (7)
78Assert.True(typeof(T) == type.ItemType.RawType, $"{desc} had wrong type for slot cursor"); 79Assert.True(type.Size > 0, $"{desc} expected to be known sized vector but is not"); 81Assert.True(0 != valueCount, $"{desc} expected to have fixed size, but does not"); 93Assert.True(offset < vals.Length, $"{desc} slot cursor went further than it should have"); 95Assert.True(rc == temp.Length, $"{desc} slot cursor yielded vector with unexpected length"); 99Assert.True(valueCount == offset / rc, $"{desc} slot cursor yielded fewer than expected values"); 188Assert.True(trueIndex == index, $"Transpose schema had column '{names[i]}' at unexpected index");
Microsoft.ML.TestFramework (6)
DataPipe\TestDataPipe.cs (1)
1236Assert.True(row < rows, "row cursor cursor returned more rows than expected");
DataPipe\TestDataPipeBase.cs (2)
164Assert.True(d.IsCompatibleWith(p), $"Mismatch on {p.Name}, there was a mismatch, or some unexpected annotations was present."); 168Assert.True(p.IsCompatibleWith(d), $"Mismatch on {p.Name}, something was promised in the annotations but not delivered.");
RemoteExecutor.cs (3)
123Assert.True(process.WaitForExit(options.TimeOut), 136Assert.True(expected == actual, $"Exit code was {process.ExitCode} but it should have been {options.ExpectedExitCode}"); 177fi => Assert.True(fi.Name.IndexOf('<') != -1, $"Field marshaling is not supported by {nameof(RemoteInvoke)}: {fi.Name}"));
Microsoft.ML.TestFrameworkCommon (9)
TestCommon.cs (9)
90Assert.True(sch1.Count == sch2.Count, $"column count mismatch: {sch1.Count} vs {sch2.Count}"); 96Assert.True(name1 == name2, $"column name mismatch at index {col}: {name1} vs {name2}"); 100Assert.True(EqualTypes(type1, type2, exactTypes), $"column type mismatch at index {col}"); 108Assert.True(f1, "TryGetColumnIndex unexpectedly failed"); 109Assert.True(f2, "TryGetColumnIndex unexpectedly failed"); 110Assert.True(col1 == col2, $"TryGetColumnIndex on '{name1}' produced different results: '{col1}' vs '{col2}'"); 250Assert.True(EqualTypes(t1, t2, exactTypes), $"Different {kind} metadata types: {t1} vs {t2}"); 260Assert.True((int)size == t1.GetVectorSize(), $"{kind} metadata type wrong size: {t1.GetVectorSize()} vs {size}"); 264Assert.True(CompareVec(in names1, in names2, (int)size, (a, b) => a.Span.SequenceEqual(b.Span)), $"Different {kind} metadata values");
Microsoft.ML.Tests (4)
OnnxSequenceTypeWithAttributesTest.cs (1)
65Assert.True(onnxOut.Count == 3, "Output missing data.");
Scenarios\Api\TestApi.cs (2)
504Assert.True(idsTest1.Count() > 0, $"CV Split 0 for Column {colname} was empty"); 505Assert.True(idsTest2.Count() > 0, $"CV Split 1 for Column {colname} was empty");
TextLoaderTests.cs (1)
1416Assert.True(threwException, "Invalid file should have thrown an exception");
Microsoft.ML.Tokenizers.Tests (2)
PreTokenizerTests.cs (1)
60Assert.True(encoding.Count >= splitParts.Length, $"Expected to have {encoding.Count} >= {splitParts.Length}");
TitokenTests.cs (1)
517Assert.True((entriesCount * 260) > allocation, $"Memory allocation of {entriesCount} entries for {name}: {allocation} bytes");
Microsoft.Net.Http.Headers.Tests (38)
CacheControlHeaderValueTest.cs (9)
15Assert.True(cacheControl.NoCache, "NoCache"); 17Assert.True(cacheControl.NoStore, "NoStore"); 19Assert.True(cacheControl.MaxStale, "MaxStale"); 21Assert.True(cacheControl.NoTransform, "NoTransform"); 23Assert.True(cacheControl.OnlyIfCached, "OnlyIfCached"); 25Assert.True(cacheControl.Public, "Public"); 27Assert.True(cacheControl.Private, "Private"); 29Assert.True(cacheControl.MustRevalidate, "MustRevalidate"); 31Assert.True(cacheControl.ProxyRevalidate, "ProxyRevalidate");
ContentDispositionHeaderValueTest.cs (3)
469Assert.True(contentDisposition1.Equals(contentDisposition4), "Different casing."); 470Assert.True(contentDisposition2.Equals(contentDisposition5), "Different casing in name."); 692Assert.True(ContentDispositionHeaderValue.TryParse(input, out var result), input);
ContentRangeHeaderValueTest.cs (6)
20Assert.True(range.HasLength, "HasLength"); 40Assert.True(range.HasRange, "HasRange"); 64Assert.True(range.HasRange, "HasRange"); 65Assert.True(range.HasLength, "HasLength"); 136Assert.True(range1.Equals(range4), "bytes 1-2/5 vs. BYTES 1-2/5"); 137Assert.True(range4.Equals(range1), "BYTES 1-2/5 vs. bytes 1-2/5");
EntityTagHeaderValueTest.cs (2)
44Assert.True(etag.IsWeak, "IsWeak"); 94Assert.True(etag1.Equals(etag5), "tag vs. tag..");
MediaTypeHeaderValueTest.cs (2)
382Assert.True(mediaType1.Equals(mediaType4), "Different casing."); 383Assert.True(mediaType2.Equals(mediaType5), "Different casing in charset.");
NameValueHeaderValueTest.cs (6)
220Assert.True(nameValue1.Equals(nameValue2), "<null> vs. <null>."); 236Assert.True(nameValue1.Equals(nameValue2), "<null> vs. string.Empty."); 240Assert.True(nameValue1.Equals(nameValue2), "token vs. TOKEN."); 244Assert.True(nameValue1.Equals(nameValue2), "token vs. token."); 252Assert.True(nameValue1.Equals(nameValue2), "\"quoted string\" vs. \"quoted string\"."); 262Assert.True(nameValue1.Equals(nameValue2), "text vs. TEXT.");
RangeConditionHeaderValueTest.cs (2)
84Assert.True(rangeCondition1!.Equals(rangeCondition2), "\"x\" vs. \"x\""); 88Assert.True(rangeCondition3.Equals(rangeCondition5), "date vs. date");
RangeHeaderValueTest.cs (2)
81Assert.True(range1!.Equals(range2), "bytes=1-2 vs. BYTES=1-2"); 85Assert.True(range5.Equals(range6), "bytes=1-2,3-4 vs. bytes=3-4,1-2");
RangeItemHeaderValueTest.cs (3)
84Assert.True(rangeItem1.Equals(rangeItem5), "1-2 vs. 1-2."); 131Assert.True(RangeHeaderValue.TryParse("byte=" + input, out result), input); 145Assert.True(RangeHeaderValue.TryParse("byte=" + input, out result), input);
StringWithQualityHeaderValueTest.cs (3)
92Assert.True(value1!.Equals(value2), "t; q=0.123 vs. t; q=0.123"); 93Assert.True(value1.Equals(value3), "t; q=0.123 vs. T; q=0.123"); 99Assert.True(value4.Equals(value8), "t vs. T");
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
CodeModel\FileCodeFunctionTests.cs (1)
227Assert.True(testObject.Parent is CodeClass, testObject.Parent.GetType().ToString());
PresentationCore.Tests (2)
BinaryFormat\BinaryFormattedTypes.cs (2)
24Assert.True(iSerializable || serializable, "Type should either implement ISerializable or be marked as [Serializable]"); 49Assert.True(
Roslyn.Test.PdbUtilities (3)
Reader\PdbValidation.cs (3)
328var converter = new PdbConverter(diagnostic => Assert.True(false, diagnostic.ToString())); 593Assert.True(paddedPathLength >= 260, "Path should be at least MAX_PATH long"); 655Assert.True(methodStartTags.Length == 1, "There must be one and only one method start tag per test input.");
Roslyn.VisualStudio.Next.UnitTests (2)
Options\VisualStudioOptionStorageTests.cs (1)
283Assert.True(set.Add(groupName), $"Group {groupName} doesn't have a unique name.");
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (1)
121Assert.True(ex is OperationCanceledException, $"cancellationToken : {source.Token.IsCancellationRequested}/r/n{ex}");
ScenarioTests.Common.Tests (1)
ScenarioTestHelpers.cs (1)
80Assert.True(String.Equals(result, testString), String.Format(" Error: expected response from service: '{0}' Actual was: '{1}'", testString, result));
Security.TransportSecurity.IntegrationTests (32)
Http\ClientCredentialTypeTests.4.1.0.cs (2)
64Assert.True(result == testString, string.Format("Error: expected response from service: '{0}' Actual was: '{1}'", testString, result)); 126Assert.True(expectHeaderSent, "Expect header should have been sent but wasn't");
Https\ClientCredentialTypeTests.4.1.0.cs (3)
78Assert.True(String.Equals(result, testString), 163Assert.True(exception.Message.ToLower().Contains(message), string.Format("Expected exception message to contain: '{0}', actual message is: '{1}'", message, exception.Message)); 202Assert.True(exception.Message.ToLower().Contains(paraMessage), string.Format("Expected exception message to contain: '{0}', actual: '{1}'", paraMessage, exception.Message));
Https\HttpsTests.4.1.0.cs (8)
53Assert.True(result == testString, String.Format("Error: expected response from service: '{0}' Actual was: '{1}'", testString, result)); 103Assert.True(errorBuilder.Length == 0, "Test case FAILED with errors: " + errorBuilder.ToString()); 142Assert.True(errorBuilder.Length == 0, "Test case FAILED with errors: " + errorBuilder.ToString()); 181Assert.True(errorBuilder.Length == 0, "Test case FAILED with errors: " + errorBuilder.ToString()); 220Assert.True(errorBuilder.Length == 0, "Test case FAILED with errors: " + errorBuilder.ToString()); 257Assert.True(myX509CertificateValidator.validateMethodWasCalled, "The Validate method of the X509CertificateValidator was NOT called."); 437Assert.True(expectHeaderSent, "Expect header should have been sent but wasn't"); 560Assert.True(myX509CertificateValidator.validateMethodWasCalled, "The Validate method of the X509CertificateValidator was NOT called.");
Https\HttpsTests.4.1.1.cs (2)
109Assert.True(communicationException != null, "Expected CommunicationException but no exception was thrown."); 110Assert.True(communicationException.GetType().Name == "SecurityNegotiationException",
Tcp\ClientCredentialTypeCertificateCanonicalNameTests.4.1.0.cs (6)
67Assert.True(shouldCallSucceed, errorBuilder.ToString()); 88Assert.True(!shouldCallSucceed, errorBuilder.ToString()); 143Assert.True(shouldCallSucceed, errorBuilder.ToString()); 164Assert.True(!shouldCallSucceed, errorBuilder.ToString()); 229Assert.True(shouldCallSucceed, errorBuilder.ToString()); 248Assert.True(!shouldCallSucceed, errorBuilder.ToString());
Tcp\ClientCredentialTypeTests.4.1.0.cs (1)
103Assert.True(myX509CertificateValidator.validateMethodWasCalled, "The Validate method of the X509CertificateValidator was NOT called.");
Tcp\ClientCredentialTypeTests.4.1.1.cs (3)
108Assert.True(communicationException != null, "Expected CommunicationException but no exception was thrown."); 109Assert.True(communicationException.GetType().Name == "SecurityNegotiationException", 263Assert.True(guid == returnedGuid,
Tcp\IdentityTests.4.1.1.cs (1)
42Assert.True(exception.Message.Contains(Endpoints.Tcp_VerifyDNS_HostName), string.Format("Expected exception message contains: '{0}', actual: '{1}')", Endpoints.Tcp_VerifyDNS_HostName, exception.Message));
Tcp\StreamingTests.4.1.0.cs (6)
242Assert.True(watch.ElapsedMilliseconds >= 4985 && watch.ElapsedMilliseconds < 6000, 283Assert.True(String.Equals(testString, result), String.Format("Error: Expected test string: '{0}' but got '{1}'", testString, result)); 325Assert.True(String.Equals(testString, result), String.Format("Error: Expected test string: '{0}' but got '{1}'", testString, result)); 367Assert.True(String.Equals(testString, result), String.Format("Error: Expected test string: '{0}' but got '{1}'", testString, result)); 396Assert.True(success, "Test Scenario: NetTcp_TransportSecurity_String_Streamed_RoundTrips_WithSingleThreadedSyncContext timed-out."); 415Assert.True(success, "Test Scenario: NetTcp_TransportSecurity_Streamed_Async_RoundTrips_String_WithSingleThreadedSyncContext timed-out.");
Shared.Tests (1)
Pools\PoolTests.cs (1)
77Assert.True(f.SequenceNum < Capacity, $"{i}");
Sockets.BindTests (1)
SocketTransportOptionsTests.cs (1)
43Assert.True(wasCalled, $"Expected {nameof(SocketTransportOptions.CreateBoundListenSocket)} to be called.");
Sockets.FunctionalTests (9)
src\Servers\Kestrel\test\FunctionalTests\Http2\HandshakeTests.cs (2)
73Assert.True(SslApplicationProtocol.Http2.Protocol.Span.SequenceEqual(tlsFeature.ApplicationProtocol.Span), 101Assert.True(SslApplicationProtocol.Http2.Protocol.Span.SequenceEqual(tlsFeature.ApplicationProtocol.Span),
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (6)
71Assert.True(contentLength % bufferLength == 0, $"{nameof(contentLength)} sent must be evenly divisible by {bufferLength}."); 72Assert.True(bufferLength % 256 == 0, $"{nameof(bufferLength)} must be evenly divisible by 256"); 99Assert.True((byte)((total + i) % 256) == receivedBytes[i], "Data received is incorrect"); 507Assert.True(await requestStarted.WaitAsync(TestConstants.DefaultTimeout), "request should have started"); 512Assert.True(await connectionReadFin.WaitAsync(TestConstants.DefaultTimeout), "Connection close event should have been logged"); 522Assert.True(await connectionReset.WaitAsync(TestConstants.DefaultTimeout), "Connection reset event should have been logged");
src\Servers\Kestrel\test\FunctionalTests\ResponseTests.cs (1)
1115Assert.True(totalReceived < totalBytes, $"{nameof(AssertStreamAborted)} Stream completed successfully.");
System.Drawing.Common.Tests (76)
mono\System.Drawing\GraphicsTests.cs (2)
909Assert.True(g.Clip.IsInfinite(g), message + ".Clip.IsInfinite"); 919Assert.True(g.Transform.IsIdentity, message + ".Transform.IsIdentity");
System\Drawing\FontConverterTests.cs (1)
27Assert.True(converter.GetStandardValuesSupported(), "standard values supported");
System\Drawing\IconConverterTests.cs (26)
37Assert.True(_icoConv.CanConvertFrom(typeof(byte[])), "byte[] (no context)"); 38Assert.True(_icoConv.CanConvertFrom(null, typeof(byte[])), "byte[]"); 39Assert.True(_icoConv.CanConvertFrom(null, _iconBytes.GetType()), "_iconBytes.GetType()"); 50Assert.True(_icoConvFrmTD.CanConvertFrom(typeof(byte[])), "TD byte[] (no context)"); 51Assert.True(_icoConvFrmTD.CanConvertFrom(null, typeof(byte[])), "TD byte[]"); 52Assert.True(_icoConvFrmTD.CanConvertFrom(null, _iconBytes.GetType()), "TD _iconBytes.GetType()"); 67Assert.True(_icoConv.CanConvertTo(typeof(string)), "string (no context)"); 68Assert.True(_icoConv.CanConvertTo(null, typeof(string)), "string"); 69Assert.True(_icoConv.CanConvertTo(null, _iconStr.GetType()), "_iconStr.GetType()"); 70Assert.True(_icoConv.CanConvertTo(typeof(byte[])), "byte[] (no context)"); 71Assert.True(_icoConv.CanConvertTo(null, typeof(byte[])), "byte[]"); 72Assert.True(_icoConv.CanConvertTo(null, _iconBytes.GetType()), "_iconBytes.GetType()"); 73Assert.True(_icoConv.CanConvertTo(typeof(Image)), "Image (no context)"); 74Assert.True(_icoConv.CanConvertTo(null, typeof(Image)), "Image"); 75Assert.True(_icoConv.CanConvertTo(typeof(Bitmap)), "Bitmap (no context)"); 76Assert.True(_icoConv.CanConvertTo(null, typeof(Bitmap)), "Bitmap"); 85Assert.True(_icoConvFrmTD.CanConvertTo(typeof(string)), "TD string (no context)"); 86Assert.True(_icoConvFrmTD.CanConvertTo(null, typeof(string)), "TD string"); 87Assert.True(_icoConvFrmTD.CanConvertTo(null, _iconStr.GetType()), "TD _iconStr.GetType()"); 88Assert.True(_icoConvFrmTD.CanConvertTo(typeof(byte[])), "TD byte[] (no context)"); 89Assert.True(_icoConvFrmTD.CanConvertTo(null, typeof(byte[])), "TD byte[]"); 90Assert.True(_icoConvFrmTD.CanConvertTo(null, _iconBytes.GetType()), "TD _iconBytes.GetType()"); 91Assert.True(_icoConvFrmTD.CanConvertTo(typeof(Image)), "TD Image (no context)"); 92Assert.True(_icoConvFrmTD.CanConvertTo(null, typeof(Image)), "TD Image"); 93Assert.True(_icoConvFrmTD.CanConvertTo(typeof(Bitmap)), "TD Bitmap (no context)"); 94Assert.True(_icoConvFrmTD.CanConvertTo(null, typeof(Bitmap)), "TD Bitmap");
System\Drawing\IconTests.cs (1)
844Assert.True(count is 7 or 5, $"count was {count}, expected 5 or 7");
System\Drawing\ImageConverterTests.cs (22)
61Assert.True(_imgConv.CanConvertFrom(typeof(byte[])), "byte[] (no context)"); 62Assert.True(_imgConv.CanConvertFrom(null, typeof(byte[])), "byte[]"); 63Assert.True(_imgConv.CanConvertFrom(null, _imageBytes.GetType()), "_imageBytes.GetType()"); 64Assert.True(_imgConv.CanConvertFrom(typeof(Icon)), "Icon (no context)"); 65Assert.True(_imgConv.CanConvertFrom(null, typeof(Icon)), "Icon"); 76Assert.True(_imgConvFrmTD.CanConvertFrom(typeof(byte[])), "TD byte[] (no context)"); 77Assert.True(_imgConvFrmTD.CanConvertFrom(null, typeof(byte[])), "TD byte[]"); 78Assert.True(_imgConvFrmTD.CanConvertFrom(null, _imageBytes.GetType()), "TD _imageBytes.GetType()"); 93Assert.True(_imgConv.CanConvertTo(typeof(string)), "stirng (no context)"); 94Assert.True(_imgConv.CanConvertTo(null, typeof(string)), "string"); 95Assert.True(_imgConv.CanConvertTo(null, _imageStr.GetType()), "_imageStr.GetType()"); 96Assert.True(_imgConv.CanConvertTo(typeof(byte[])), "byte[] (no context)"); 97Assert.True(_imgConv.CanConvertTo(null, typeof(byte[])), "byte[]"); 98Assert.True(_imgConv.CanConvertTo(null, _imageBytes.GetType()), "_imageBytes.GetType()"); 107Assert.True(_imgConvFrmTD.CanConvertTo(typeof(string)), "TD string (no context)"); 108Assert.True(_imgConvFrmTD.CanConvertTo(null, typeof(string)), "TD string"); 109Assert.True(_imgConvFrmTD.CanConvertTo(null, _imageStr.GetType()), "TD _imageStr.GetType()"); 110Assert.True(_imgConvFrmTD.CanConvertTo(typeof(byte[])), "TD byte[] (no context)"); 111Assert.True(_imgConvFrmTD.CanConvertTo(null, typeof(byte[])), "TD byte[]"); 112Assert.True(_imgConvFrmTD.CanConvertTo(null, _imageBytes.GetType()), "TD _imageBytes.GetType()"); 219Assert.True(_imgConv.GetPropertiesSupported(), "GetPropertiesSupported()"); 220Assert.True(_imgConv.GetPropertiesSupported(null), "GetPropertiesSupported(null)");
System\Drawing\ImageFormatConverterTests.cs (22)
29Assert.True(_imgFmtConv.CanConvertFrom(typeof(string)), "string (no context)"); 30Assert.True(_imgFmtConv.CanConvertFrom(null, typeof(string)), "string"); 36Assert.True(_imgFmtConvFrmTD.CanConvertFrom(typeof(string)), "TD string (no context)"); 37Assert.True(_imgFmtConvFrmTD.CanConvertFrom(null, typeof(string)), "TD string"); 47Assert.True(_imgFmtConv.CanConvertTo(typeof(string)), "string (no context)"); 48Assert.True(_imgFmtConv.CanConvertTo(null, typeof(string)), "string"); 54Assert.True(_imgFmtConvFrmTD.CanConvertTo(typeof(string)), "TD string (no context)"); 55Assert.True(_imgFmtConvFrmTD.CanConvertTo(null, typeof(string)), "TD string"); 160Assert.True(_imgFmtConv.GetStandardValuesSupported(), "GetStandardValuesSupported()"); 161Assert.True(_imgFmtConv.GetStandardValuesSupported(null), "GetStandardValuesSupported(null)"); 228Assert.True(memorybmp, "MemoryBMP"); 229Assert.True(bmp, "Bmp"); 230Assert.True(emf, "Emf"); 231Assert.True(wmf, "Wmf"); 232Assert.True(gif, "Gif"); 233Assert.True(jpeg, "Jpeg"); 234Assert.True(png, "Png"); 235Assert.True(tiff, "Tiff"); 236Assert.True(exif, "Exif"); 237Assert.True(icon, "Icon"); 239Assert.True(heif, "Heif"); 240Assert.True(webp, "Webp");
System\Drawing\Printing\PrinterSettingsTests.cs (2)
194Assert.True(validValues.Contains(printerSettings.LandscapeAngle), $"PrinterSettings.LandscapeAngle ({printerSettings.LandscapeAngle}) must be 0, 90, or 270 degrees."); 201Assert.True(printerSettings.MaximumCopies >= 0, $"PrinterSettings.MaximumCopies ({printerSettings.MaximumCopies}) should not be negative.");
System.ServiceModel.Http.Tests (9)
ServiceModel\BasicHttpBindingTest.cs (4)
40Assert.True(TestHelpers.XmlDictionaryReaderQuotasAreEqual(binding.ReaderQuotas, new XmlDictionaryReaderQuotas()), "XmlDictionaryReaderQuotas"); 65Assert.True(TestHelpers.XmlDictionaryReaderQuotasAreEqual(binding.ReaderQuotas, new XmlDictionaryReaderQuotas()), "XmlDictionaryReaderQuotas"); 89Assert.True(TestHelpers.XmlDictionaryReaderQuotasAreEqual(binding.ReaderQuotas, new XmlDictionaryReaderQuotas()), "XmlDictionaryReaderQuotas"); 210Assert.True(TestHelpers.XmlDictionaryReaderQuotasAreEqual(binding.ReaderQuotas, maxQuota), "Setting Max ReaderQuota failed");
ServiceModel\BasicHttpsBindingTest.cs (3)
38Assert.True(TestHelpers.XmlDictionaryReaderQuotasAreEqual(binding.ReaderQuotas, new XmlDictionaryReaderQuotas()), "XmlDictionaryReaderQuotas"); 63Assert.True(TestHelpers.XmlDictionaryReaderQuotasAreEqual(binding.ReaderQuotas, new XmlDictionaryReaderQuotas()), "XmlDictionaryReaderQuotas"); 198Assert.True(TestHelpers.XmlDictionaryReaderQuotasAreEqual(binding.ReaderQuotas, maxQuota), "Setting Max ReaderQuota failed");
ServiceModel\SecurityBindingElementTest.cs (2)
25Assert.True(securityBindingElement == null, string.Format("securityBindingElement should be null when BasicHttpSecurityMode is '{0}'", securityMode)); 27Assert.True(binding.CanBuildChannelFactory<IRequestChannel>(), string.Format("CanBuildChannelFactory should return true for BasicHttpSecurityMode:'{0}'", securityMode));
System.ServiceModel.NetTcp.Tests (6)
Channels\TcpTransportBindingElementTest.cs (2)
19Assert.True(String.Equals(element.Scheme, "net.tcp"), String.Format("Scheme property expected '{0}' but actual was '{1}'", "net.tcp", element.Scheme)); 23Assert.True(element.ConnectionPoolSettings != null, "ConnectionPoolSettings should not be null.");
ServiceModel\MessageSecurityOverTcpTest.cs (2)
16Assert.True(msot != null, "MessageSecurityOverTcp default ctor failed"); 50Assert.True(actual == credentialType,
ServiceModel\NetTcpBindingTest.cs (1)
24Assert.True(TestHelpers.XmlDictionaryReaderQuotasAreEqual(binding.ReaderQuotas, new XmlDictionaryReaderQuotas()), "XmlDictionaryReaderQuotas");
ServiceModel\TcpTransportSecurityTest.cs (1)
19Assert.True(transport.ClientCredentialType == TcpClientCredentialType.Windows,
System.ServiceModel.Primitives.Tests (127)
Channels\BehaviorExtensionTest.cs (4)
45Assert.True(String.Equals(testMessageBody, result), 48Assert.True(TestOperationBehaviorAttribute.operationBehaviorSet, "TestOperationBehavior attribute on IBehaviorExtensionServerInterface.Process operation should have triggered ApplyClientBehavior() call"); 79Assert.True(String.Equals(testMessageBody, result), 82Assert.True(TestContractBehaviorAttribute.contractBehaviorSet, "TestContractBehavior attribute on IBehaviorExtensionServerInterface2 constract should have triggered ApplyClientBehavior() call");
Channels\BinaryMessageEncodingBindingElementTest.cs (1)
24Assert.True(TestHelpers.XmlDictionaryReaderQuotasAreEqual(bindingElement.ReaderQuotas, new XmlDictionaryReaderQuotas()),
Channels\CommunicationObjectTest.cs (40)
35Assert.True(String.Equals(expectedOpens, actualOpens, StringComparison.Ordinal), 41Assert.True(String.Equals(expectedCloses, actualCloses, StringComparison.Ordinal), 71Assert.True(String.Equals(expectedOpens, actualOpens, StringComparison.Ordinal), 77Assert.True(String.Equals(expectedCloses, actualCloses, StringComparison.Ordinal), 99Assert.True(String.Equals(expectedCloses, actualCloses, StringComparison.Ordinal), 103Assert.True(mco.State == CommunicationState.Closed, 127Assert.True(String.Equals(expectedOpens, actualOpens, StringComparison.Ordinal), 133Assert.True(String.Equals(expectedCloses, actualCloses, StringComparison.Ordinal), 162Assert.True(String.Equals(expectedOpens, actualOpens, StringComparison.Ordinal), 168Assert.True(String.Equals(expectedCloses, actualCloses, StringComparison.Ordinal), 188Assert.True(data.StateAfterCreate == CommunicationState.Created, 192Assert.True(data.StateEnterOnOpening == CommunicationState.Opening, 195Assert.True(data.StateLeaveOnOpening == CommunicationState.Opening, 199Assert.True(data.StateEnterOnOpen == CommunicationState.Opening, 202Assert.True(data.StateLeaveOnOpen == CommunicationState.Opening, 206Assert.True(data.StateEnterOnOpened == CommunicationState.Opening, 209Assert.True(data.StateLeaveOnOpened == CommunicationState.Opened, 213Assert.True(data.StateEnterOnClosing == CommunicationState.Closing, 216Assert.True(data.StateLeaveOnClosing == CommunicationState.Closing, 220Assert.True(data.StateEnterOnClose == CommunicationState.Closing, 223Assert.True(data.StateLeaveOnClose == CommunicationState.Closing, 227Assert.True(data.StateEnterOnClosed == CommunicationState.Closing, 230Assert.True(data.StateLeaveOnClosed == CommunicationState.Closed, 255Assert.True(data.StateAfterCreate == CommunicationState.Created, 259Assert.True(data.StateEnterOnOpening == CommunicationState.Opening, 262Assert.True(data.StateLeaveOnOpening == CommunicationState.Opening, 266Assert.True(data.StateEnterOnBeginOpen == CommunicationState.Opening, 269Assert.True(data.StateLeaveOnBeginOpen == CommunicationState.Opening, 273Assert.True(data.StateEnterOnOpened == CommunicationState.Opening, 276Assert.True(data.StateLeaveOnOpened == CommunicationState.Opened, 280Assert.True(data.StateEnterOnClosing == CommunicationState.Closing, 283Assert.True(data.StateLeaveOnClosing == CommunicationState.Closing, 287Assert.True(data.StateEnterOnBeginClose == CommunicationState.Closing, 290Assert.True(data.StateLeaveOnBeginClose == CommunicationState.Closing, 294Assert.True(data.StateEnterOnClosed == CommunicationState.Closing, 297Assert.True(data.StateLeaveOnClosed == CommunicationState.Closed, 322Assert.True(String.Equals(exceptionMessage, actualException.Message), 349Assert.True(String.Equals(exceptionMessage, actualException.Message), 376Assert.True(String.Equals(exceptionMessage, actualException.Message), 407Assert.True(String.Equals(exceptionMessage, actualException.Message),
Channels\CustomChannelTest.cs (30)
75Assert.True(String.Equals(testMessageBody, result), 82Assert.True(String.Equals(expectedOpens, actualOpens, StringComparison.Ordinal), 87Assert.True(String.Equals(expectedCloses, actualCloses, StringComparison.Ordinal), 92Assert.True(String.Equals(expectedOpens, actualOpens, StringComparison.Ordinal), 97Assert.True(String.Equals(expectedCloses, actualCloses, StringComparison.Ordinal), 101Assert.True(factory.State == CommunicationState.Closed, 104Assert.True(((ICommunicationObject)channel).State == CommunicationState.Closed, 172Assert.True(String.Equals(testMessageBody, result), 179Assert.True(String.Equals(expectedOpens, actualOpens, StringComparison.Ordinal), 184Assert.True(String.Equals(expectedCloses, actualCloses, StringComparison.Ordinal), 189Assert.True(String.Equals(expectedOpens, actualOpens, StringComparison.Ordinal), 194Assert.True(String.Equals(expectedCloses, actualCloses, StringComparison.Ordinal), 198Assert.True(factory.State == CommunicationState.Closed, 201Assert.True(((ICommunicationObject)channel).State == CommunicationState.Closed, 251Assert.True(String.Equals(expectedExceptionMessage, actualException.Message), 306Assert.True(String.Equals(expectedExceptionMessage, actualException.Message), 365Assert.True(String.Equals(testMessageBody, result), 372Assert.True(String.Equals(expectedOpens, actualOpens, StringComparison.Ordinal), 377Assert.True(String.Equals(expectedCloses, actualCloses, StringComparison.Ordinal), 382Assert.True(String.Equals(expectedOpens, actualOpens, StringComparison.Ordinal), 387Assert.True(String.Equals(expectedCloses, actualCloses, StringComparison.Ordinal), 391Assert.True(factory.State == CommunicationState.Closed, 394Assert.True(((ICommunicationObject)channel).State == CommunicationState.Closed, 433Assert.True(initializeCalled, "Initialize was not called."); 471Assert.True(String.Equals(caughtException.Message, thrownException.Message), 523Assert.True(beginInitializeCalled, "BeginDisplayInitializationUI was not called."); 524Assert.True(endInitializeCalled, "EndDisplayInitializationUI was not called."); 574Assert.True(beginInitializeCalled, "BeginDisplayInitializationUI was not called."); 575Assert.True(endInitializeCalled, "EndDisplayInitializationUI was not called."); 725Assert.True(string.Equals(thrownException.Message, caughtException.Message),
Description\ContractDescriptionTest.cs (7)
70Assert.True(results == null, results); 126Assert.True(results == null, results); 166Assert.True(results == null, results); 189Assert.True(operation != null, "Failed to find Hello operation in contract."); 190Assert.True(operation.IsOneWay, "Expected Hello operation to be IsOneWay."); 193Assert.True(operation != null, "Failed to find Reply operation in contract."); 194Assert.True(operation.IsOneWay, "Expected Reply operation to be IsOneWay.");
Description\OperationBehaviorTest.cs (2)
37Assert.True(MyOperationBehavior.errorBuilder.Length == 0, "Test case FAILED with errors: " + MyOperationBehavior.errorBuilder.ToString()); 38Assert.True(waitAll, "None of the IOperationBehavior methods were called.");
Description\OperationContractAttributeTest.cs (2)
21Assert.True(oca.IsInitiating, "IsInitiating should have been true"); 22Assert.True(!oca.IsTerminating, "IsTerminating should have been false");
ServiceModel\ChannelFactoryTest.cs (11)
39Assert.True(typeof(IRequestChannel).GetTypeInfo().IsAssignableFrom(channel.GetType().GetTypeInfo()), 43Assert.True(typeof(IRequestChannel).GetTypeInfo().IsAssignableFrom(channel2.GetType().GetTypeInfo()), 96Assert.True(typeof(IRequestChannel).GetTypeInfo().IsAssignableFrom(channel.GetType().GetTypeInfo()), 100Assert.True(typeof(IRequestChannel).GetTypeInfo().IsAssignableFrom(channel2.GetType().GetTypeInfo()), 152Assert.True(typeof(IRequestChannel).GetTypeInfo().IsAssignableFrom(channel.GetType().GetTypeInfo()), 196Assert.True(typeof(IWcfServiceGenerated).GetTypeInfo().IsAssignableFrom(channel.GetType().GetTypeInfo()), 218Assert.True(CommunicationState.Created == factory.State, 222Assert.True(CommunicationState.Opened == factory.State, 226Assert.True(CommunicationState.Closed == factory.State, 257Assert.True(allowCookies == (cookieManager != null), 262Assert.True(allowCookies == (cookieManager.CookieContainer != null),
ServiceModel\DuplexChannelFactoryTest.cs (3)
109Assert.True(exception.Message.Contains("BasicHttpBinding"), 229Assert.True(typeof(IWcfDuplexService).GetTypeInfo().IsAssignableFrom(channel.GetType().GetTypeInfo()), 233Assert.True(typeof(IWcfDuplexService).GetTypeInfo().IsAssignableFrom(channel2.GetType().GetTypeInfo()),
ServiceModel\ExtensionCollection.cs (2)
22Assert.True(collection.Count == 2, $"Expected the collection to contain 2 items, instead it contained '{collection.Count}' items."); 28Assert.True(myCollection.Count == 2, $"Expected the collection to contain 2 items of type 'IMyExtension', instead it contained: '{myCollection.Count}' items.");
ServiceModel\MessageContractTest.4.4.0.cs (11)
35Assert.True(String.Equals(name, attribute.Name), 137Assert.True(results == null, results); 214Assert.True(hasProperty, String.Format("Expected message property '{0}'", TestTypeConstants_4_4_0.MessageContract_Request_PropertyName)); 215Assert.True(String.Equals(request.requestTestProperty, propertyValue), 293Assert.True(String.Equals(request.requestTestProperty, reply.requestTestProperty), 305Assert.True(hasHeader, String.Format("Expected header '{0}'", name)); 314Assert.True(values.Length == headerValues.Count, 319Assert.True(headerValues.Contains(value), 327Assert.True(array2 != null, 330Assert.True(array1.Length == array2.Length, 336Assert.True(array1[i] == array2[i],
ServiceModel\MessageContractTest.cs (2)
22Assert.True(messageCA.WrapperName == null, "WrapperName should be null"); 23Assert.True(messageCA.WrapperNamespace == null, "WrapperNamespace should be null");
ServiceModel\SynchronizedCollection.cs (12)
21Assert.True(coll.Count == size, string.Format("collection count was wrong! Expected: {0} got: {1}", size, coll.Count)); 25Assert.True(coll[i] == i, string.Format("coll element {0} was wrong! Expected: {1} got: {2} ", i, i, coll[i])); 26Assert.True(coll.IndexOf(i) == i, string.Format("coll IndexOf wasn't right! Expected: {0} got: {1}" , i, coll.IndexOf(i))); 27Assert.True(coll.Contains(i), string.Format("coll Contains failed to find the value {0}.", i)); 33Assert.True(coll2[i] == i, string.Format("coll2 element was wrong! expected: {0} got: {1} ", i, coll2[i])); 39Assert.True(coll3[i] == i + 1, string.Format("coll3 element {0} was wrong! expected: {1} got: {2}", i, i+1, coll3[i])); 49Assert.True(e.Current.Equals(n++), string.Format("Expected: {0}, got:{1}", n-1, e.Current)); 52Assert.True(n == 100, string.Format("Expect number of elements: {0}, got:{1}", 100, n)); 58Assert.True(array[i + 1] == i, string.Format("After CopyTo, Element {0} was wrong! Expected: {1} got: {2}", i, i+1, array[i + 1])); 65Assert.True(coll.Count == size, string.Format("Expect number of elements after modification: {0}, got: {1}", size, coll.Count)); 69Assert.True(coll[i] == i, string.Format("coll element was wrong after modification! Expected: {0} got: {1} ", i, coll[i])); 73Assert.True(coll.Count == 0, string.Format("Clear operation failed!, expected: 0, actual {0}", coll.Count));
System.ServiceModel.UnixDomainSocket.Tests (4)
Channels\UnixDomainSocketTransportBindingElementTest.cs (2)
19Assert.True(String.Equals(element.Scheme, "net.uds"), String.Format("Scheme property expected '{0}' but actual was '{1}'", "net.uds", element.Scheme)); 23Assert.True(element.ConnectionPoolSettings != null, "ConnectionPoolSettings should not be null.");
ServiceModel\UnixDomainSocketBindingTest.cs (1)
25Assert.True(TestHelpers.XmlDictionaryReaderQuotasAreEqual(binding.ReaderQuotas, new XmlDictionaryReaderQuotas()), "XmlDictionaryReaderQuotas");
ServiceModel\UnixDomainSocketTransportSecurityTest.cs (1)
19Assert.True(transport.ClientCredentialType == UnixDomainSocketClientCredentialType.Default,
System.Windows.Forms.Design.Tests (2)
EnsureDesignerTests.cs (1)
22Assert.True(forwardedTypes.Contains(designer.FullName), $"{designer.FullName} must be type forwarded");
EnsureEditorsTests.cs (1)
35Assert.True(forwardedTypes.Contains(editor.FullName), $"{editor.FullName} must be type forwarded");
System.Windows.Forms.Tests (7)
System\Resources\ResXResourceSetTests.cs (2)
19Assert.True(File.Exists(resxFileName), $@"RESX file ""{resxFileName}"" not found, make sure it's in the root folder of the unit test project"); 39Assert.True(File.Exists(resxFileName), $@"RESX file ""{resxFileName}"" not found, make sure it's in the root folder of the unit test project");
System\Windows\Forms\Application.ParkingWindowTests.cs (1)
29Assert.True(ex is null, $"Expected no exception, but got: {ex.Message}"); // Actually need to check whether GC.Collect() does not throw exception.
System\Windows\Forms\ApplicationTests.cs (1)
98Assert.True(Application.UseVisualStyles, "New Visual Styles will not be applied on WinForms app. This is a high priority bug and must be looked into");
System\Windows\Forms\DataGridViewElementTests.cs (1)
366Assert.True(type == typeof(DataGridViewBand) || type == typeof(DataGridViewColumn) ||
System\Windows\Forms\PropertyGridTests.cs (1)
3955Assert.True(foundTypeForward, "Did not find TypeForwardedAttribute.");
System\Windows\Forms\StatusStripTests.cs (1)
125Assert.True(control.Renderer is ToolStripSystemRenderer or ToolStripProfessionalRenderer, "Renderer is not one of the expected types.");
System.Windows.Forms.UI.IntegrationTests (1)
ButtonTests.cs (1)
361Assert.True(InputLanguage.CurrentInputLanguage.LayoutName == "US", "Please, switch to the US input language");
Templates.Blazor.Tests (20)
BlazorWasmTemplateTest.cs (3)
110Assert.True(File.Exists(Path.Combine(publishDir, "service-worker.js")), "service-worker.js should be published"); 111Assert.True(File.Exists(Path.Combine(publishDir, "service-worker-assets.js")), "service-worker-assets.js should be published"); 130Assert.True(doesExist, $"Expected file to exist, but it doesn't: {path}");
src\ProjectTemplates\Shared\AspNetProcess.cs (5)
162Assert.True(html.Links.Length == page.Links.Count(), $"Expected {page.Url} to have {page.Links.Count()} links but it had {html.Links.Length}"); 168Assert.True(anchor.PathName.EndsWith(expectedLink, StringComparison.Ordinal), $"Expected next link on {page.Url} to be {expectedLink} but it was {anchor.PathName}: {html.Source.Text}"); 173Assert.True(string.Equals(anchor.Href, expectedLink), $"Expected next link to be {expectedLink} but it was {anchor.Href}."); 179Assert.True(IsSuccessStatusCode(result), $"{anchor.Href} is a broken link!"); 269Assert.True(statusCode == response.StatusCode, $"Expected {requestUrl} to have status '{statusCode}' but it was '{response.StatusCode}'.");
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
110Assert.True(doesExist, $"Expected file to exist, but it doesn't: {path}");
src\ProjectTemplates\Shared\ProcessLock.cs (1)
28Assert.True(await Semaphore.WaitAsync(timeout.Value), $"Unable to acquire process lock for process {Name}");
src\ProjectTemplates\Shared\Project.cs (9)
126Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create", this, createResult)); 144Assert.True(0 == restoreResult.ExitCode, ErrorMessages.GetFailedProcessMessage("restore", this, restoreResult)); 170Assert.True(0 == result.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", this, result)); 193Assert.True(0 == result.ExitCode, ErrorMessages.GetFailedProcessMessage("build", this, result)); 244Assert.True(0 == processResult.ExitCode, ErrorMessages.GetFailedProcessMessage("run EF migrations", this, processResult)); 264Assert.True(0 == processResult.ExitCode, ErrorMessages.GetFailedProcessMessage("update database", this, processResult)); 304Assert.True(doesExist, "Expected file to exist, but it doesn't: " + path); 424Assert.True(result.ExitCode == 0, result.GetFormattedOutput()); 528Assert.True(File.Exists(sourceFile), $"Log for '{ProjectName}' not found in '{sourceFile}'. Execution output: {result.Output}");
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
111Assert.True(result.ExitCode == 0, result.GetFormattedOutput());
Templates.Blazor.WebAssembly.Auth.Tests (17)
src\ProjectTemplates\Shared\AspNetProcess.cs (5)
162Assert.True(html.Links.Length == page.Links.Count(), $"Expected {page.Url} to have {page.Links.Count()} links but it had {html.Links.Length}"); 168Assert.True(anchor.PathName.EndsWith(expectedLink, StringComparison.Ordinal), $"Expected next link on {page.Url} to be {expectedLink} but it was {anchor.PathName}: {html.Source.Text}"); 173Assert.True(string.Equals(anchor.Href, expectedLink), $"Expected next link to be {expectedLink} but it was {anchor.Href}."); 179Assert.True(IsSuccessStatusCode(result), $"{anchor.Href} is a broken link!"); 269Assert.True(statusCode == response.StatusCode, $"Expected {requestUrl} to have status '{statusCode}' but it was '{response.StatusCode}'.");
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
110Assert.True(doesExist, $"Expected file to exist, but it doesn't: {path}");
src\ProjectTemplates\Shared\ProcessLock.cs (1)
28Assert.True(await Semaphore.WaitAsync(timeout.Value), $"Unable to acquire process lock for process {Name}");
src\ProjectTemplates\Shared\Project.cs (9)
126Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create", this, createResult)); 144Assert.True(0 == restoreResult.ExitCode, ErrorMessages.GetFailedProcessMessage("restore", this, restoreResult)); 170Assert.True(0 == result.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", this, result)); 193Assert.True(0 == result.ExitCode, ErrorMessages.GetFailedProcessMessage("build", this, result)); 244Assert.True(0 == processResult.ExitCode, ErrorMessages.GetFailedProcessMessage("run EF migrations", this, processResult)); 264Assert.True(0 == processResult.ExitCode, ErrorMessages.GetFailedProcessMessage("update database", this, processResult)); 304Assert.True(doesExist, "Expected file to exist, but it doesn't: " + path); 424Assert.True(result.ExitCode == 0, result.GetFormattedOutput()); 528Assert.True(File.Exists(sourceFile), $"Log for '{ProjectName}' not found in '{sourceFile}'. Execution output: {result.Output}");
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
111Assert.True(result.ExitCode == 0, result.GetFormattedOutput());
Templates.Blazor.WebAssembly.Tests (17)
src\ProjectTemplates\Shared\AspNetProcess.cs (5)
162Assert.True(html.Links.Length == page.Links.Count(), $"Expected {page.Url} to have {page.Links.Count()} links but it had {html.Links.Length}"); 168Assert.True(anchor.PathName.EndsWith(expectedLink, StringComparison.Ordinal), $"Expected next link on {page.Url} to be {expectedLink} but it was {anchor.PathName}: {html.Source.Text}"); 173Assert.True(string.Equals(anchor.Href, expectedLink), $"Expected next link to be {expectedLink} but it was {anchor.Href}."); 179Assert.True(IsSuccessStatusCode(result), $"{anchor.Href} is a broken link!"); 269Assert.True(statusCode == response.StatusCode, $"Expected {requestUrl} to have status '{statusCode}' but it was '{response.StatusCode}'.");
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
110Assert.True(doesExist, $"Expected file to exist, but it doesn't: {path}");
src\ProjectTemplates\Shared\ProcessLock.cs (1)
28Assert.True(await Semaphore.WaitAsync(timeout.Value), $"Unable to acquire process lock for process {Name}");
src\ProjectTemplates\Shared\Project.cs (9)
126Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create", this, createResult)); 144Assert.True(0 == restoreResult.ExitCode, ErrorMessages.GetFailedProcessMessage("restore", this, restoreResult)); 170Assert.True(0 == result.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", this, result)); 193Assert.True(0 == result.ExitCode, ErrorMessages.GetFailedProcessMessage("build", this, result)); 244Assert.True(0 == processResult.ExitCode, ErrorMessages.GetFailedProcessMessage("run EF migrations", this, processResult)); 264Assert.True(0 == processResult.ExitCode, ErrorMessages.GetFailedProcessMessage("update database", this, processResult)); 304Assert.True(doesExist, "Expected file to exist, but it doesn't: " + path); 424Assert.True(result.ExitCode == 0, result.GetFormattedOutput()); 528Assert.True(File.Exists(sourceFile), $"Log for '{ProjectName}' not found in '{sourceFile}'. Execution output: {result.Output}");
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
111Assert.True(result.ExitCode == 0, result.GetFormattedOutput());
Templates.Mvc.Tests (18)
RazorPagesTemplateTest.cs (1)
313Assert.True(doesExist, $"Expected file to exist, but it doesn't: {path}");
src\ProjectTemplates\Shared\AspNetProcess.cs (5)
162Assert.True(html.Links.Length == page.Links.Count(), $"Expected {page.Url} to have {page.Links.Count()} links but it had {html.Links.Length}"); 168Assert.True(anchor.PathName.EndsWith(expectedLink, StringComparison.Ordinal), $"Expected next link on {page.Url} to be {expectedLink} but it was {anchor.PathName}: {html.Source.Text}"); 173Assert.True(string.Equals(anchor.Href, expectedLink), $"Expected next link to be {expectedLink} but it was {anchor.Href}."); 179Assert.True(IsSuccessStatusCode(result), $"{anchor.Href} is a broken link!"); 269Assert.True(statusCode == response.StatusCode, $"Expected {requestUrl} to have status '{statusCode}' but it was '{response.StatusCode}'.");
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
110Assert.True(doesExist, $"Expected file to exist, but it doesn't: {path}");
src\ProjectTemplates\Shared\ProcessLock.cs (1)
28Assert.True(await Semaphore.WaitAsync(timeout.Value), $"Unable to acquire process lock for process {Name}");
src\ProjectTemplates\Shared\Project.cs (9)
126Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create", this, createResult)); 144Assert.True(0 == restoreResult.ExitCode, ErrorMessages.GetFailedProcessMessage("restore", this, restoreResult)); 170Assert.True(0 == result.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", this, result)); 193Assert.True(0 == result.ExitCode, ErrorMessages.GetFailedProcessMessage("build", this, result)); 244Assert.True(0 == processResult.ExitCode, ErrorMessages.GetFailedProcessMessage("run EF migrations", this, processResult)); 264Assert.True(0 == processResult.ExitCode, ErrorMessages.GetFailedProcessMessage("update database", this, processResult)); 304Assert.True(doesExist, "Expected file to exist, but it doesn't: " + path); 424Assert.True(result.ExitCode == 0, result.GetFormattedOutput()); 528Assert.True(File.Exists(sourceFile), $"Log for '{ProjectName}' not found in '{sourceFile}'. Execution output: {result.Output}");
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
111Assert.True(result.ExitCode == 0, result.GetFormattedOutput());
Templates.Tests (22)
BaselineTest.cs (1)
128Assert.True(doesExist, "Expected file to exist, but it doesn't: " + path);
GrpcTemplateTest.cs (2)
106Assert.True(serverProcess.Process.HasExited, "built"); 124Assert.True(aspNetProcess.Process.HasExited, "published");
IdentityUIPackageTest.cs (2)
155Assert.True(response?.StatusCode == HttpStatusCode.OK, $"Couldn't find file '{file}'"); 164Assert.True(doesExist, $"Expected file to exist, but it doesn't: {path}");
src\ProjectTemplates\Shared\AspNetProcess.cs (5)
162Assert.True(html.Links.Length == page.Links.Count(), $"Expected {page.Url} to have {page.Links.Count()} links but it had {html.Links.Length}"); 168Assert.True(anchor.PathName.EndsWith(expectedLink, StringComparison.Ordinal), $"Expected next link on {page.Url} to be {expectedLink} but it was {anchor.PathName}: {html.Source.Text}"); 173Assert.True(string.Equals(anchor.Href, expectedLink), $"Expected next link to be {expectedLink} but it was {anchor.Href}."); 179Assert.True(IsSuccessStatusCode(result), $"{anchor.Href} is a broken link!"); 269Assert.True(statusCode == response.StatusCode, $"Expected {requestUrl} to have status '{statusCode}' but it was '{response.StatusCode}'.");
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
110Assert.True(doesExist, $"Expected file to exist, but it doesn't: {path}");
src\ProjectTemplates\Shared\ProcessLock.cs (1)
28Assert.True(await Semaphore.WaitAsync(timeout.Value), $"Unable to acquire process lock for process {Name}");
src\ProjectTemplates\Shared\Project.cs (9)
126Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create", this, createResult)); 144Assert.True(0 == restoreResult.ExitCode, ErrorMessages.GetFailedProcessMessage("restore", this, restoreResult)); 170Assert.True(0 == result.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", this, result)); 193Assert.True(0 == result.ExitCode, ErrorMessages.GetFailedProcessMessage("build", this, result)); 244Assert.True(0 == processResult.ExitCode, ErrorMessages.GetFailedProcessMessage("run EF migrations", this, processResult)); 264Assert.True(0 == processResult.ExitCode, ErrorMessages.GetFailedProcessMessage("update database", this, processResult)); 304Assert.True(doesExist, "Expected file to exist, but it doesn't: " + path); 424Assert.True(result.ExitCode == 0, result.GetFormattedOutput()); 528Assert.True(File.Exists(sourceFile), $"Log for '{ProjectName}' not found in '{sourceFile}'. Execution output: {result.Output}");
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
111Assert.True(result.ExitCode == 0, result.GetFormattedOutput());
VBCSCompiler.UnitTests (2)
ClientConnectionHandlerTests.cs (2)
42Assert.True(false, "Should not reach compilation"); 86Assert.True(false, "Should not reach compilation when compilations are disallowed");