diff options
author | 杨宇千 <crupest@outlook.com> | 2019-08-20 23:41:36 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-08-20 23:41:36 +0800 |
commit | 03549a181521009baf6d353a98f4cb8804602cdc (patch) | |
tree | 4554d77dcf4e10cdfa9955e496c0ede22788448a /Timeline.Tests/Helpers | |
parent | 7814ed7059f74cfecfa8a0c9aa4f9946d1015364 (diff) | |
download | timeline-03549a181521009baf6d353a98f4cb8804602cdc.tar.gz timeline-03549a181521009baf6d353a98f4cb8804602cdc.tar.bz2 timeline-03549a181521009baf6d353a98f4cb8804602cdc.zip |
Use etag for cache.
Diffstat (limited to 'Timeline.Tests/Helpers')
-rw-r--r-- | Timeline.Tests/Helpers/AssertionResponseExtensions.cs | 3 |
1 files changed, 2 insertions, 1 deletions
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))} ;";
}
}
|