From 03549a181521009baf6d353a98f4cb8804602cdc Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Tue, 20 Aug 2019 23:41:36 +0800 Subject: Use etag for cache. --- Timeline.Tests/Helpers/AssertionResponseExtensions.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Timeline.Tests/Helpers/AssertionResponseExtensions.cs') diff --git a/Timeline.Tests/Helpers/AssertionResponseExtensions.cs b/Timeline.Tests/Helpers/AssertionResponseExtensions.cs index 38617b92..e67a172a 100644 --- a/Timeline.Tests/Helpers/AssertionResponseExtensions.cs +++ b/Timeline.Tests/Helpers/AssertionResponseExtensions.cs @@ -23,7 +23,8 @@ namespace Timeline.Tests.Helpers string padding = new string('\t', context.Depth); var res = (HttpResponseMessage)value; - return $"{newline}{padding} Status Code: {res.StatusCode} ; Body: {res.Content.ReadAsStringAsync().Result} ;"; + var body = res.Content.ReadAsStringAsync().Result; + return $"{newline}{padding} Status Code: {res.StatusCode} ; Body: {body.Substring(0, Math.Min(body.Length, 20))} ;"; } } -- cgit v1.2.3