1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-15 22:57:44 -05:00

Rename to include async suffix

This commit is contained in:
Bernd Schoolmann
2025-06-05 18:48:00 +02:00
parent af976cd515
commit cb9ff16f5a
2 changed files with 6 additions and 6 deletions

View File

@ -25,7 +25,7 @@ public class UsersControllerTests
SutProvider<UsersController> sutProvider)
{
sutProvider.GetDependency<IUserRepository>().GetPublicKeyAsync(Arg.Any<Guid>()).ReturnsNull();
await Assert.ThrowsAsync<NotFoundException>(() => sutProvider.Sut.GetPublicKey(new Guid().ToString()));
await Assert.ThrowsAsync<NotFoundException>(() => sutProvider.Sut.GetPublicKeyAsync(new Guid().ToString()));
}
[Theory]
@ -34,7 +34,7 @@ public class UsersControllerTests
SutProvider<UsersController> sutProvider)
{
sutProvider.GetDependency<IUserRepository>().GetByIdAsync(Arg.Any<Guid>()).ReturnsNull();
await Assert.ThrowsAsync<NotFoundException>(() => sutProvider.Sut.GetAccountKeys(new Guid().ToString()));
await Assert.ThrowsAsync<NotFoundException>(() => sutProvider.Sut.GetAccountKeysAsync(new Guid().ToString()));
}
[Theory]
@ -53,7 +53,7 @@ public class UsersControllerTests
sutProvider.GetDependency<IUserRepository>().GetByIdAsync(userId).Returns(user);
sutProvider.GetDependency<IUserSignatureKeyPairRepository>().GetByUserIdAsync(userId).Returns(new SignatureKeyPairData(SignatureAlgorithm.Ed25519, "wrappedSigningKey", "verifyingKey"));
var result = await sutProvider.Sut.GetAccountKeys(userId.ToString());
var result = await sutProvider.Sut.GetAccountKeysAsync(userId.ToString());
Assert.NotNull(result);
Assert.Equal("publicKey", result.PublicKey);
Assert.Equal("signedPublicKey", result.SignedPublicKey);
@ -76,7 +76,7 @@ public class UsersControllerTests
sutProvider.GetDependency<IUserRepository>().GetByIdAsync(userId).Returns(user);
sutProvider.GetDependency<IUserSignatureKeyPairRepository>().GetByUserIdAsync(userId).ReturnsNull();
var result = await sutProvider.Sut.GetAccountKeys(userId.ToString());
var result = await sutProvider.Sut.GetAccountKeysAsync(userId.ToString());
Assert.NotNull(result);
Assert.Equal("publicKey", result.PublicKey);
Assert.Null(result.SignedPublicKey);