diff options
author | crupest <crupest@outlook.com> | 2021-04-27 19:29:20 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-04-27 19:29:20 +0800 |
commit | a6150c487e7a0eb3fb1d9874d2fa7de61cdbfd30 (patch) | |
tree | 65ad2e897051d36ca49896e0df66841df4bffd6f /BackEnd/Timeline.Tests/Services | |
parent | cb3d8d0997679d2b9a961ec92b6555af4c4ef53f (diff) | |
download | timeline-a6150c487e7a0eb3fb1d9874d2fa7de61cdbfd30.tar.gz timeline-a6150c487e7a0eb3fb1d9874d2fa7de61cdbfd30.tar.bz2 timeline-a6150c487e7a0eb3fb1d9874d2fa7de61cdbfd30.zip |
refactor: ...
Diffstat (limited to 'BackEnd/Timeline.Tests/Services')
-rw-r--r-- | BackEnd/Timeline.Tests/Services/SearchServiceTest.cs | 8 | ||||
-rw-r--r-- | BackEnd/Timeline.Tests/Services/ServiceTestBase.cs | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/BackEnd/Timeline.Tests/Services/SearchServiceTest.cs b/BackEnd/Timeline.Tests/Services/SearchServiceTest.cs index 0aa412b2..1e94076e 100644 --- a/BackEnd/Timeline.Tests/Services/SearchServiceTest.cs +++ b/BackEnd/Timeline.Tests/Services/SearchServiceTest.cs @@ -35,10 +35,10 @@ namespace Timeline.Tests.Services [Fact]
public async Task UserSearch_Should_Work()
{
- await UserService.CreateUser("hahaha", "p");
- var u2 = await UserService.CreateUser("bababa", "p");
- await UserService.ModifyUser(u2.Id, new ModifyUserParams { Nickname = "hahaha" });
- await UserService.CreateUser("bbbbbb", "p");
+ await UserService.CreateUserAsync(new CreateUserParams("hahaha", "p"));
+ var u2 = await UserService.CreateUserAsync(new CreateUserParams("bababa", "p"));
+ await UserService.ModifyUserAsync(u2.Id, new ModifyUserParams { Nickname = "hahaha" });
+ await UserService.CreateUserAsync(new CreateUserParams("bbbbbb", "p"));
var searchResult = await _service.SearchUser("hah");
searchResult.Items.Should().HaveCount(2);
diff --git a/BackEnd/Timeline.Tests/Services/ServiceTestBase.cs b/BackEnd/Timeline.Tests/Services/ServiceTestBase.cs index 0f4efe95..2c1bdea8 100644 --- a/BackEnd/Timeline.Tests/Services/ServiceTestBase.cs +++ b/BackEnd/Timeline.Tests/Services/ServiceTestBase.cs @@ -37,8 +37,8 @@ namespace Timeline.Tests.Services UserService = new UserService(NullLogger<UserService>.Instance, Database, new PasswordService(), Clock);
TimelineService = new TimelineService(Database, UserService, Clock);
- UserId = await UserService.GetUserIdByUsername("user");
- AdminId = await UserService.GetUserIdByUsername("admin");
+ UserId = await UserService.GetUserIdByUsernameAsync("user");
+ AdminId = await UserService.GetUserIdByUsernameAsync("admin");
await OnInitializeAsync();
OnInitialize();
|