Skip to main content

Definition

Assembly: MSTest.TestFramework.Extensions.dll Namespace: Microsoft.VisualStudio.TestTools.UnitTesting

Syntax

Summary

This type is defined in MSTest.TestFramework.Extensions.

Methods

LogAndReturnMessageContentAsync Extension

Extension method from Microsoft.VisualStudio.TestTools.UnitTesting.Breakdance_MsTest2_TestContextExtensions
Attempts to unwrap the Content and log it to the testContext if possible.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<string>

Remarks

This exists in order to safely allow the tests to continue in the absence of correct content. This is because the tests should log the response content BEFORE failing the test for an incorrect StatusCode.