You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
internalstatic/* for testing */string?GetErrorText(string?testDisplayName,string?explanation,Exception?exception,stringseverity,IFileSystemfileSystem,ILoggerlogger)
168
+
internalstatic/* for testing */string?GetErrorText(stringtestDisplayName,string?explanation,Exception?exception,stringseverity,IFileSystemfileSystem,ILoggerlogger,stringtargetFrameworkMoniker)
@@ -33,24 +25,17 @@ public void ReportsTheFirstExistingFileInStackTraceWithTheRightLineNumberAndEsca
33
25
34
26
// Trim ##. If we keep it, then when the test fails, the assertion failure will get printed to screen and picked up incorrectly by AzDO, because it scans all output for the ##vso... pattern
Assert.AreEqual("vso[task.logissue type=severity;sourcepath=test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsTests.cs;linenumber=27;columnnumber=1][MyTestDisplayName] this is an error%0Awith%0Dnewline",text,$"\nLogs:\n{string.Join("\n",logger.Logs)}");
Assert.AreEqual("vso[task.logissue type=severity;sourcepath=test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsTests.cs;linenumber=19;columnnumber=1][MyTestDisplayName] [net9.0] this is an error%0Awith%0Dnewline",text,$"\nLogs:\n{string.Join("\n",logger.Logs)}");
thrownewException("this is an error\nwith\rnewline");
54
39
}
55
40
catch(Exceptionex)
56
41
{
@@ -59,9 +44,8 @@ public void ReportsWithoutDisplayNameWhenNull()
59
44
60
45
// Trim ##. If we keep it, then when the test fails, the assertion failure will get printed to screen and picked up incorrectly by AzDO, because it scans all output for the ##vso... pattern
Assert.AreEqual("vso[task.logissue type=severity;sourcepath=test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsTests.cs;linenumber=53;columnnumber=1]this is an error",text,$"\nLogs:\n{string.Join("\n",logger.Logs)}");
0 commit comments