File tree Expand file tree Collapse file tree
src/Platform/Microsoft.Testing.Platform.MSBuild/Tasks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,17 +71,16 @@ internal static void FromFailedTest(this FailedTestInfoRequest failedTestInfoReq
7171 string nameAndPlace = place == null
7272 ? $ "{ failedTestInfoRequest . DisplayName } ({ failedTestInfoRequest . Duration } )"
7373 : $ "{ failedTestInfoRequest . DisplayName } ({ failedTestInfoRequest . Duration } ): { place } ";
74- string ? singleLineError = JoinSingleLineAndShorten ( nameAndPlace , failedTestInfoRequest . ErrorMessage ) ;
7574
76- message = singleLineError ! ;
75+ message = JoinSingleLineAndShorten ( nameAndPlace , failedTestInfoRequest . ErrorMessage ) ;
7776 }
7877 }
7978
80- private static string ? JoinSingleLineAndShorten ( string first , string ? second )
79+ private static string JoinSingleLineAndShorten ( string first , string ? second )
8180 => second == null
8281 ? SingleLineAndShorten ( first )
8382 : SingleLineAndShorten ( first ) + " " + SingleLineAndShorten ( second ) ;
8483
85- private static string ? SingleLineAndShorten ( string ? text )
86- => text == null ? null : ( text . Length <= 1000 ? text : text [ ..1000 ] ) . Replace ( '\r ' , ' ' ) . Replace ( '\n ' , ' ' ) ;
84+ private static string SingleLineAndShorten ( string text ) =>
85+ ( text . Length <= 1000 ? text : text [ ..1000 ] ) . Replace ( '\r ' , ' ' ) . Replace ( '\n ' , ' ' ) ;
8786}
You can’t perform that action at this time.
0 commit comments