diff options
author | crupest <crupest@outlook.com> | 2020-11-15 17:38:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-15 17:38:10 +0800 |
commit | fa7b123be84afe020fc582535cc270e8cf24e85b (patch) | |
tree | 58d88a6412f718c1d6b304d7ee9580eaf1ab6c3a /BackEnd/Timeline.Tests/IntegratedTests/HttpClientUserExtensions.cs | |
parent | 379b4bafe982a8a8cd3158f0a9fa38a563dbdb57 (diff) | |
parent | 9f9f02c94f1248ecf02860a6c90c2ee1e2992c46 (diff) | |
download | timeline-fa7b123be84afe020fc582535cc270e8cf24e85b.tar.gz timeline-fa7b123be84afe020fc582535cc270e8cf24e85b.tar.bz2 timeline-fa7b123be84afe020fc582535cc270e8cf24e85b.zip |
Merge pull request #186 from crupest/unittest
Refactor unit tests.
Diffstat (limited to 'BackEnd/Timeline.Tests/IntegratedTests/HttpClientUserExtensions.cs')
-rw-r--r-- | BackEnd/Timeline.Tests/IntegratedTests/HttpClientUserExtensions.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/BackEnd/Timeline.Tests/IntegratedTests/HttpClientUserExtensions.cs b/BackEnd/Timeline.Tests/IntegratedTests/HttpClientUserExtensions.cs new file mode 100644 index 00000000..81787eef --- /dev/null +++ b/BackEnd/Timeline.Tests/IntegratedTests/HttpClientUserExtensions.cs @@ -0,0 +1,12 @@ +using System.Net.Http;
+using System.Threading.Tasks;
+using Timeline.Models.Http;
+
+namespace Timeline.Tests.IntegratedTests
+{
+ public static class HttpClientUserExtensions
+ {
+ public static Task<UserInfo> GetUserAsync(this HttpClient client, string username)
+ => client.TestGetAsync<UserInfo>($"users/{username}");
+ }
+}
|