From e22da3a53e1d3303ef10008f3ac6875d4a628689 Mon Sep 17 00:00:00 2001 From: Justin Baur <19896123+justindbaur@users.noreply.github.com> Date: Thu, 22 Feb 2024 10:59:08 -0600 Subject: [PATCH] Replace `async void` with `async Task` (#3835) --- .../AccessPoliciesControllerTests.cs | 92 +++++++++---------- .../Controllers/ProjectsControllerTests.cs | 36 ++++---- .../Controllers/SecretsControllerTests.cs | 44 ++++----- .../SecretsManagerEventsControllerTests.cs | 6 +- .../ServiceAccountsControllerTests.cs | 42 ++++----- .../Vault/Controllers/SyncControllerTests.cs | 2 +- ...sertWebAuthnLoginCredentialCommandTests.cs | 10 +- ...eateWebAuthnLoginCredentialCommandTests.cs | 4 +- ...fHostedGetOrganizationLicenseQueryTests.cs | 10 +- .../Services/StripePaymentServiceTests.cs | 34 +++---- .../Tools/Services/SendServiceTests.cs | 46 +++++----- .../OrganizationRepositoryTests.cs | 14 +-- .../OrganizationUserRepositoryTests.cs | 8 +- .../Repositories/PolicyRepositoryTests.cs | 2 +- .../AuthRequestRepositoryTests.cs | 2 +- .../EmergencyAccessRepositoryTests.cs | 2 +- .../Repositories/SsoConfigRepositoryTests.cs | 12 +-- .../Repositories/SsoUserRepositoryTests.cs | 8 +- .../Repositories/CollectionRepository.cs | 2 +- .../Repositories/DeviceRepositoryTests.cs | 2 +- .../InstallationRepositoryTests.cs | 2 +- .../OrganizationSponsorshipRepositoryTests.cs | 6 +- .../Repositories/TaxRateRepositoryTests.cs | 2 +- .../TransactionRepositoryTests.cs | 2 +- .../Repositories/UserRepositoryTests.cs | 22 ++--- .../Tools/Repositories/SendRepositoryTests.cs | 2 +- .../Repositories/CipherRepositoryTests.cs | 6 +- .../Repositories/FolderRepositoryTests.cs | 2 +- 28 files changed, 211 insertions(+), 211 deletions(-) diff --git a/test/Api.Test/SecretsManager/Controllers/AccessPoliciesControllerTests.cs b/test/Api.Test/SecretsManager/Controllers/AccessPoliciesControllerTests.cs index c3bba40e8..616c8af08 100644 --- a/test/Api.Test/SecretsManager/Controllers/AccessPoliciesControllerTests.cs +++ b/test/Api.Test/SecretsManager/Controllers/AccessPoliciesControllerTests.cs @@ -109,7 +109,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData(PermissionType.RunAsAdmin)] [BitAutoData(PermissionType.RunAsUserWithPermission)] - public async void GetProjectAccessPolicies_ReturnsEmptyList( + public async Task GetProjectAccessPolicies_ReturnsEmptyList( PermissionType permissionType, SutProvider sutProvider, Guid id, Project data) @@ -144,7 +144,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void GetProjectAccessPolicies_UserWithoutPermission_Throws( + public async Task GetProjectAccessPolicies_UserWithoutPermission_Throws( SutProvider sutProvider, Guid id, Project data) @@ -163,7 +163,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData(PermissionType.RunAsAdmin)] [BitAutoData(PermissionType.RunAsUserWithPermission)] - public async void GetProjectAccessPolicies_Success( + public async Task GetProjectAccessPolicies_Success( PermissionType permissionType, SutProvider sutProvider, Guid id, @@ -202,7 +202,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void GetProjectAccessPolicies_ProjectsExist_UserWithoutPermission_Throws( + public async Task GetProjectAccessPolicies_ProjectsExist_UserWithoutPermission_Throws( SutProvider sutProvider, Guid id, Project data, @@ -225,7 +225,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData(PermissionType.RunAsAdmin)] [BitAutoData(PermissionType.RunAsUserWithPermission)] - public async void GetServiceAccountGrantedPolicies_ReturnsEmptyList( + public async Task GetServiceAccountGrantedPolicies_ReturnsEmptyList( PermissionType permissionType, SutProvider sutProvider, Guid id, ServiceAccount data) @@ -257,7 +257,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData(PermissionType.RunAsAdmin)] [BitAutoData(PermissionType.RunAsUserWithPermission)] - public async void GetServiceAccountGrantedPolicies_Success( + public async Task GetServiceAccountGrantedPolicies_Success( PermissionType permissionType, SutProvider sutProvider, Guid id, @@ -289,7 +289,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void CreateProjectAccessPolicies_RequestMoreThanMax_Throws( + public async Task CreateProjectAccessPolicies_RequestMoreThanMax_Throws( SutProvider sutProvider, Guid id, Project mockProject, @@ -311,7 +311,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void CreateProjectAccessPolicies_ProjectDoesNotExist_Throws( + public async Task CreateProjectAccessPolicies_ProjectDoesNotExist_Throws( SutProvider sutProvider, Guid id, AccessPoliciesCreateRequest request) @@ -325,7 +325,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void CreateProjectAccessPolicies_DuplicatePolicy_Throws( + public async Task CreateProjectAccessPolicies_DuplicatePolicy_Throws( SutProvider sutProvider, Guid id, Project mockProject, @@ -348,7 +348,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void CreateProjectAccessPolicies_NoAccess_Throws( + public async Task CreateProjectAccessPolicies_NoAccess_Throws( SutProvider sutProvider, Guid id, Project mockProject, @@ -377,7 +377,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void CreateProjectAccessPolicies_Success( + public async Task CreateProjectAccessPolicies_Success( SutProvider sutProvider, Guid id, Project mockProject, @@ -405,7 +405,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void CreateServiceAccountGrantedPolicies_RequestMoreThanMax_Throws( + public async Task CreateServiceAccountGrantedPolicies_RequestMoreThanMax_Throws( SutProvider sutProvider, Guid id, ServiceAccount serviceAccount, @@ -428,7 +428,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void CreateServiceAccountGrantedPolicies_ServiceAccountDoesNotExist_Throws( + public async Task CreateServiceAccountGrantedPolicies_ServiceAccountDoesNotExist_Throws( SutProvider sutProvider, Guid id, List request) @@ -442,7 +442,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void CreateServiceAccountGrantedPolicies_DuplicatePolicy_Throws( + public async Task CreateServiceAccountGrantedPolicies_DuplicatePolicy_Throws( SutProvider sutProvider, Guid id, ServiceAccount serviceAccount, @@ -467,7 +467,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void CreateServiceAccountGrantedPolicies_NoAccess_Throws( + public async Task CreateServiceAccountGrantedPolicies_NoAccess_Throws( SutProvider sutProvider, Guid id, ServiceAccount serviceAccount, @@ -494,7 +494,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void CreateServiceAccountGrantedPolicies_Success( + public async Task CreateServiceAccountGrantedPolicies_Success( SutProvider sutProvider, Guid id, ServiceAccount serviceAccount, @@ -520,7 +520,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void UpdateAccessPolicies_NoAccess_Throws( + public async Task UpdateAccessPolicies_NoAccess_Throws( SutProvider sutProvider, Guid id, UserProjectAccessPolicy data, @@ -542,7 +542,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void UpdateAccessPolicies_Success( + public async Task UpdateAccessPolicies_Success( SutProvider sutProvider, Guid id, UserProjectAccessPolicy data, @@ -563,7 +563,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void DeleteAccessPolicies_NoAccess_Throws(SutProvider sutProvider, Guid id) + public async Task DeleteAccessPolicies_NoAccess_Throws(SutProvider sutProvider, Guid id) { sutProvider.GetDependency() .AuthorizeAsync(Arg.Any(), new UserProjectAccessPolicy(), @@ -579,7 +579,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void DeleteAccessPolicies_Success(SutProvider sutProvider, Guid id) + public async Task DeleteAccessPolicies_Success(SutProvider sutProvider, Guid id) { sutProvider.GetDependency() .AuthorizeAsync(Arg.Any(), new UserProjectAccessPolicy(), @@ -595,7 +595,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData(PermissionType.RunAsAdmin)] [BitAutoData(PermissionType.RunAsUserWithPermission)] - public async void GetPeoplePotentialGrantees_ReturnsEmptyList( + public async Task GetPeoplePotentialGrantees_ReturnsEmptyList( PermissionType permissionType, SutProvider sutProvider, Guid id) @@ -617,7 +617,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void GetPeoplePotentialGrantees_UserWithoutPermission_Throws( + public async Task GetPeoplePotentialGrantees_UserWithoutPermission_Throws( SutProvider sutProvider, Guid id) { @@ -640,7 +640,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData(PermissionType.RunAsAdmin)] [BitAutoData(PermissionType.RunAsUserWithPermission)] - public async void GetPeoplePotentialGrantees_Success( + public async Task GetPeoplePotentialGrantees_Success( PermissionType permissionType, SutProvider sutProvider, Guid id, @@ -665,7 +665,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData(PermissionType.RunAsAdmin)] [BitAutoData(PermissionType.RunAsUserWithPermission)] - public async void GetServiceAccountsPotentialGrantees_ReturnsEmptyList( + public async Task GetServiceAccountsPotentialGrantees_ReturnsEmptyList( PermissionType permissionType, SutProvider sutProvider, Guid id) @@ -683,7 +683,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void GetServiceAccountsPotentialGranteesAsync_UserWithoutPermission_Throws( + public async Task GetServiceAccountsPotentialGranteesAsync_UserWithoutPermission_Throws( SutProvider sutProvider, Guid id) { @@ -700,7 +700,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData(PermissionType.RunAsAdmin)] [BitAutoData(PermissionType.RunAsUserWithPermission)] - public async void GetServiceAccountsPotentialGranteesAsync_Success( + public async Task GetServiceAccountsPotentialGranteesAsync_Success( PermissionType permissionType, SutProvider sutProvider, Guid id, @@ -724,7 +724,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData(PermissionType.RunAsAdmin)] [BitAutoData(PermissionType.RunAsUserWithPermission)] - public async void GetProjectPotentialGrantees_ReturnsEmptyList( + public async Task GetProjectPotentialGrantees_ReturnsEmptyList( PermissionType permissionType, SutProvider sutProvider, Guid id) @@ -742,7 +742,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void GetProjectPotentialGrantees_UserWithoutPermission_Throws( + public async Task GetProjectPotentialGrantees_UserWithoutPermission_Throws( SutProvider sutProvider, Guid id) { @@ -759,7 +759,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData(PermissionType.RunAsAdmin)] [BitAutoData(PermissionType.RunAsUserWithPermission)] - public async void GetProjectPotentialGrantees_Success( + public async Task GetProjectPotentialGrantees_Success( PermissionType permissionType, SutProvider sutProvider, Guid id, @@ -783,7 +783,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData(PermissionType.RunAsAdmin)] [BitAutoData(PermissionType.RunAsUserWithPermission)] - public async void GetProjectPeopleAccessPolicies_ReturnsEmptyList( + public async Task GetProjectPeopleAccessPolicies_ReturnsEmptyList( PermissionType permissionType, SutProvider sutProvider, Guid id, Project data) @@ -817,7 +817,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void GetProjectPeopleAccessPolicies_UserWithoutPermission_Throws( + public async Task GetProjectPeopleAccessPolicies_UserWithoutPermission_Throws( SutProvider sutProvider, Guid id, Project data) @@ -835,7 +835,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void GetProjectPeopleAccessPolicies_ProjectsExist_UserWithoutPermission_Throws( + public async Task GetProjectPeopleAccessPolicies_ProjectsExist_UserWithoutPermission_Throws( SutProvider sutProvider, Guid id, Project data, @@ -858,7 +858,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData(PermissionType.RunAsAdmin)] [BitAutoData(PermissionType.RunAsUserWithPermission)] - public async void GetProjectPeopleAccessPolicies_Success( + public async Task GetProjectPeopleAccessPolicies_Success( PermissionType permissionType, SutProvider sutProvider, Guid id, @@ -897,7 +897,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void PutProjectPeopleAccessPolicies_ProjectDoesNotExist_Throws( + public async Task PutProjectPeopleAccessPolicies_ProjectDoesNotExist_Throws( SutProvider sutProvider, Guid id, PeopleAccessPoliciesRequestModel request) @@ -911,7 +911,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void PutProjectPeopleAccessPoliciesAsync_DuplicatePolicy_Throws( + public async Task PutProjectPeopleAccessPoliciesAsync_DuplicatePolicy_Throws( SutProvider sutProvider, Project project, PeopleAccessPoliciesRequestModel request) @@ -929,7 +929,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void PutProjectPeopleAccessPoliciesAsync_NoAccess_Throws( + public async Task PutProjectPeopleAccessPoliciesAsync_NoAccess_Throws( SutProvider sutProvider, Project project, PeopleAccessPoliciesRequestModel request) @@ -949,7 +949,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void PutProjectPeopleAccessPoliciesAsync_Success( + public async Task PutProjectPeopleAccessPoliciesAsync_Success( SutProvider sutProvider, Guid userId, Project project, @@ -973,7 +973,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void GetServiceAccountPeopleAccessPoliciesAsync_ServiceAccountDoesntExist_ThrowsNotFound( + public async Task GetServiceAccountPeopleAccessPoliciesAsync_ServiceAccountDoesntExist_ThrowsNotFound( SutProvider sutProvider, ServiceAccount data) { @@ -989,7 +989,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData(PermissionType.RunAsAdmin)] [BitAutoData(PermissionType.RunAsUserWithPermission)] - public async void GetServiceAccountPeopleAccessPoliciesAsync_ReturnsEmptyList( + public async Task GetServiceAccountPeopleAccessPoliciesAsync_ReturnsEmptyList( PermissionType permissionType, SutProvider sutProvider, ServiceAccount data) @@ -1020,7 +1020,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void GetServiceAccountPeopleAccessPoliciesAsync_UserWithoutPermission_Throws( + public async Task GetServiceAccountPeopleAccessPoliciesAsync_UserWithoutPermission_Throws( SutProvider sutProvider, ServiceAccount data) { @@ -1039,7 +1039,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData(PermissionType.RunAsAdmin)] [BitAutoData(PermissionType.RunAsUserWithPermission)] - public async void GetServiceAccountPeopleAccessPoliciesAsync_Success( + public async Task GetServiceAccountPeopleAccessPoliciesAsync_Success( PermissionType permissionType, SutProvider sutProvider, ServiceAccount data, @@ -1073,7 +1073,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void PutServiceAccountPeopleAccessPolicies_ServiceAccountDoesNotExist_Throws( + public async Task PutServiceAccountPeopleAccessPolicies_ServiceAccountDoesNotExist_Throws( SutProvider sutProvider, ServiceAccount data, PeopleAccessPoliciesRequestModel request) @@ -1087,7 +1087,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void PutServiceAccountPeopleAccessPolicies_DuplicatePolicy_Throws( + public async Task PutServiceAccountPeopleAccessPolicies_DuplicatePolicy_Throws( SutProvider sutProvider, ServiceAccount data, PeopleAccessPoliciesRequestModel request) @@ -1105,7 +1105,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void PutServiceAccountPeopleAccessPolicies_NotCanReadWrite_Throws( + public async Task PutServiceAccountPeopleAccessPolicies_NotCanReadWrite_Throws( SutProvider sutProvider, ServiceAccount data, PeopleAccessPoliciesRequestModel request) @@ -1122,7 +1122,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void PutServiceAccountPeopleAccessPolicies_NoAccess_Throws( + public async Task PutServiceAccountPeopleAccessPolicies_NoAccess_Throws( SutProvider sutProvider, ServiceAccount data, PeopleAccessPoliciesRequestModel request) @@ -1143,7 +1143,7 @@ public class AccessPoliciesControllerTests [Theory] [BitAutoData] - public async void PutServiceAccountPeopleAccessPolicies_Success( + public async Task PutServiceAccountPeopleAccessPolicies_Success( SutProvider sutProvider, ServiceAccount data, Guid userId, diff --git a/test/Api.Test/SecretsManager/Controllers/ProjectsControllerTests.cs b/test/Api.Test/SecretsManager/Controllers/ProjectsControllerTests.cs index aba196ecf..eb7991a0a 100644 --- a/test/Api.Test/SecretsManager/Controllers/ProjectsControllerTests.cs +++ b/test/Api.Test/SecretsManager/Controllers/ProjectsControllerTests.cs @@ -44,7 +44,7 @@ public class ProjectsControllerTests [Theory] [BitAutoData] - public async void ListByOrganization_SmAccessDenied_Throws(SutProvider sutProvider, Guid data) + public async Task ListByOrganization_SmAccessDenied_Throws(SutProvider sutProvider, Guid data) { sutProvider.GetDependency().AccessSecretsManager(data).Returns(false); @@ -54,7 +54,7 @@ public class ProjectsControllerTests [Theory] [BitAutoData(PermissionType.RunAsAdmin)] [BitAutoData(PermissionType.RunAsUserWithPermission)] - public async void ListByOrganization_ReturnsEmptyList(PermissionType permissionType, + public async Task ListByOrganization_ReturnsEmptyList(PermissionType permissionType, SutProvider sutProvider, Guid data) { switch (permissionType) @@ -78,7 +78,7 @@ public class ProjectsControllerTests [Theory] [BitAutoData(PermissionType.RunAsAdmin)] [BitAutoData(PermissionType.RunAsUserWithPermission)] - public async void ListByOrganization_Success(PermissionType permissionType, + public async Task ListByOrganization_Success(PermissionType permissionType, SutProvider sutProvider, Guid data, Project mockProject) { switch (permissionType) @@ -105,7 +105,7 @@ public class ProjectsControllerTests [Theory] [BitAutoData] - public async void Create_NoAccess_Throws(SutProvider sutProvider, + public async Task Create_NoAccess_Throws(SutProvider sutProvider, Guid orgId, ProjectCreateRequestModel data) { sutProvider.GetDependency() @@ -125,7 +125,7 @@ public class ProjectsControllerTests [Theory] [BitAutoData] - public async void Create_AtMaxProjects_Throws(SutProvider sutProvider, + public async Task Create_AtMaxProjects_Throws(SutProvider sutProvider, Guid orgId, ProjectCreateRequestModel data) { sutProvider.GetDependency() @@ -143,7 +143,7 @@ public class ProjectsControllerTests [Theory] [BitAutoData] - public async void Create_Success(SutProvider sutProvider, + public async Task Create_Success(SutProvider sutProvider, Guid orgId, ProjectCreateRequestModel data) { sutProvider.GetDependency() @@ -164,7 +164,7 @@ public class ProjectsControllerTests [Theory] [BitAutoData] - public async void Update_NoAccess_Throws(SutProvider sutProvider, + public async Task Update_NoAccess_Throws(SutProvider sutProvider, Guid userId, ProjectUpdateRequestModel data, Project existingProject) { sutProvider.GetDependency() @@ -184,7 +184,7 @@ public class ProjectsControllerTests [Theory] [BitAutoData] - public async void Update_Success(SutProvider sutProvider, + public async Task Update_Success(SutProvider sutProvider, Guid userId, ProjectUpdateRequestModel data, Project existingProject) { sutProvider.GetDependency() @@ -205,7 +205,7 @@ public class ProjectsControllerTests [Theory] [BitAutoData] - public async void Get_SmAccessDenied_Throws(SutProvider sutProvider, Guid data, Guid orgId) + public async Task Get_SmAccessDenied_Throws(SutProvider sutProvider, Guid data, Guid orgId) { SetupAdmin(sutProvider, orgId); sutProvider.GetDependency().AccessSecretsManager(orgId).Returns(false); @@ -214,7 +214,7 @@ public class ProjectsControllerTests [Theory] [BitAutoData] - public async void Get_ThrowsNotFound(SutProvider sutProvider, Guid data, Guid orgId) + public async Task Get_ThrowsNotFound(SutProvider sutProvider, Guid data, Guid orgId) { SetupAdmin(sutProvider, orgId); await Assert.ThrowsAsync(() => sutProvider.Sut.GetAsync(data)); @@ -223,7 +223,7 @@ public class ProjectsControllerTests [Theory] [BitAutoData(PermissionType.RunAsAdmin)] [BitAutoData(PermissionType.RunAsUserWithPermission)] - public async void Get_Success(PermissionType permissionType, SutProvider sutProvider, + public async Task Get_Success(PermissionType permissionType, SutProvider sutProvider, Guid orgId, Guid data) { switch (permissionType) @@ -252,7 +252,7 @@ public class ProjectsControllerTests [Theory] [BitAutoData] - public async void Get_UserWithoutPermission_Throws(SutProvider sutProvider, Guid orgId, + public async Task Get_UserWithoutPermission_Throws(SutProvider sutProvider, Guid orgId, Guid data) { SetupUserWithPermission(sutProvider, orgId); @@ -267,7 +267,7 @@ public class ProjectsControllerTests [Theory] [BitAutoData] - public async void BulkDeleteProjects_NoProjectsFound_ThrowsNotFound( + public async Task BulkDeleteProjects_NoProjectsFound_ThrowsNotFound( SutProvider sutProvider, List data) { var ids = data.Select(project => project.Id).ToList(); @@ -277,7 +277,7 @@ public class ProjectsControllerTests [Theory] [BitAutoData] - public async void BulkDeleteProjects_ProjectsFoundMisMatch_ThrowsNotFound( + public async Task BulkDeleteProjects_ProjectsFoundMisMatch_ThrowsNotFound( SutProvider sutProvider, List data, Project mockProject) { data.Add(mockProject); @@ -288,7 +288,7 @@ public class ProjectsControllerTests [Theory] [BitAutoData] - public async void BulkDeleteProjects_OrganizationMistMatch_ThrowsNotFound( + public async Task BulkDeleteProjects_OrganizationMistMatch_ThrowsNotFound( SutProvider sutProvider, List data) { @@ -299,7 +299,7 @@ public class ProjectsControllerTests [Theory] [BitAutoData] - public async void BulkDeleteProjects_NoAccessToSecretsManager_ThrowsNotFound( + public async Task BulkDeleteProjects_NoAccessToSecretsManager_ThrowsNotFound( SutProvider sutProvider, List data) { @@ -316,7 +316,7 @@ public class ProjectsControllerTests [Theory] [BitAutoData] - public async void BulkDeleteProjects_ReturnsAccessDeniedForProjectsWithoutAccess_Success( + public async Task BulkDeleteProjects_ReturnsAccessDeniedForProjectsWithoutAccess_Success( SutProvider sutProvider, List data) { @@ -346,7 +346,7 @@ public class ProjectsControllerTests [Theory] [BitAutoData] - public async void BulkDeleteProjects_Success(SutProvider sutProvider, List data) + public async Task BulkDeleteProjects_Success(SutProvider sutProvider, List data) { var ids = data.Select(project => project.Id).ToList(); var organizationId = data.First().OrganizationId; diff --git a/test/Api.Test/SecretsManager/Controllers/SecretsControllerTests.cs b/test/Api.Test/SecretsManager/Controllers/SecretsControllerTests.cs index 373bf8b18..241bf724b 100644 --- a/test/Api.Test/SecretsManager/Controllers/SecretsControllerTests.cs +++ b/test/Api.Test/SecretsManager/Controllers/SecretsControllerTests.cs @@ -28,7 +28,7 @@ public class SecretsControllerTests { [Theory] [BitAutoData] - public async void GetSecretsByOrganization_ReturnsEmptyList(SutProvider sutProvider, Guid id, Guid organizationId, Guid userId, AccessClientType accessType) + public async Task GetSecretsByOrganization_ReturnsEmptyList(SutProvider sutProvider, Guid id, Guid organizationId, Guid userId, AccessClientType accessType) { sutProvider.GetDependency().AccessSecretsManager(id).Returns(true); sutProvider.GetDependency().OrganizationAdmin(organizationId).Returns(true); @@ -45,7 +45,7 @@ public class SecretsControllerTests [Theory] [BitAutoData(PermissionType.RunAsAdmin)] [BitAutoData(PermissionType.RunAsUserWithPermission)] - public async void GetSecretsByOrganization_Success(PermissionType permissionType, SutProvider sutProvider, Core.SecretsManager.Entities.Secret resultSecret, Guid organizationId, Guid userId, Core.SecretsManager.Entities.Project mockProject, AccessClientType accessType) + public async Task GetSecretsByOrganization_Success(PermissionType permissionType, SutProvider sutProvider, Core.SecretsManager.Entities.Secret resultSecret, Guid organizationId, Guid userId, Core.SecretsManager.Entities.Project mockProject, AccessClientType accessType) { sutProvider.GetDependency().AccessSecretsManager(default).ReturnsForAnyArgs(true); sutProvider.GetDependency().GetManyByOrganizationIdAsync(default, default, default) @@ -76,7 +76,7 @@ public class SecretsControllerTests [Theory] [BitAutoData] - public async void GetSecretsByOrganization_AccessDenied_Throws(SutProvider sutProvider, Core.SecretsManager.Entities.Secret resultSecret) + public async Task GetSecretsByOrganization_AccessDenied_Throws(SutProvider sutProvider, Core.SecretsManager.Entities.Secret resultSecret) { sutProvider.GetDependency().AccessSecretsManager(default).ReturnsForAnyArgs(false); @@ -86,7 +86,7 @@ public class SecretsControllerTests [Theory] [BitAutoData] - public async void GetSecret_NotFound(SutProvider sutProvider) + public async Task GetSecret_NotFound(SutProvider sutProvider) { await Assert.ThrowsAsync(() => sutProvider.Sut.GetAsync(Guid.NewGuid())); } @@ -94,7 +94,7 @@ public class SecretsControllerTests [Theory] [BitAutoData(PermissionType.RunAsAdmin)] [BitAutoData(PermissionType.RunAsUserWithPermission)] - public async void GetSecret_Success(PermissionType permissionType, SutProvider sutProvider, Secret resultSecret, Guid userId, Guid organizationId, Project mockProject) + public async Task GetSecret_Success(PermissionType permissionType, SutProvider sutProvider, Secret resultSecret, Guid userId, Guid organizationId, Project mockProject) { sutProvider.GetDependency().AccessSecretsManager(organizationId).Returns(true); sutProvider.GetDependency().GetProperUserId(default).ReturnsForAnyArgs(userId); @@ -128,7 +128,7 @@ public class SecretsControllerTests [Theory] [BitAutoData] - public async void CreateSecret_NoAccess_Throws(SutProvider sutProvider, SecretCreateRequestModel data, Guid organizationId, Guid userId) + public async Task CreateSecret_NoAccess_Throws(SutProvider sutProvider, SecretCreateRequestModel data, Guid organizationId, Guid userId) { // We currently only allow a secret to be in one project at a time if (data.ProjectIds != null && data.ProjectIds.Length > 1) @@ -152,7 +152,7 @@ public class SecretsControllerTests [Theory] [BitAutoData] - public async void CreateSecret_Success(SutProvider sutProvider, SecretCreateRequestModel data, Guid organizationId, Guid userId) + public async Task CreateSecret_Success(SutProvider sutProvider, SecretCreateRequestModel data, Guid organizationId, Guid userId) { // We currently only allow a secret to be in one project at a time if (data.ProjectIds != null && data.ProjectIds.Length > 1) @@ -177,7 +177,7 @@ public class SecretsControllerTests [Theory] [BitAutoData] - public async void UpdateSecret_NoAccess_Throws(SutProvider sutProvider, SecretUpdateRequestModel data, Guid secretId, Guid organizationId, Secret mockSecret) + public async Task UpdateSecret_NoAccess_Throws(SutProvider sutProvider, SecretUpdateRequestModel data, Guid secretId, Guid organizationId, Secret mockSecret) { // We currently only allow a secret to be in one project at a time if (data.ProjectIds != null && data.ProjectIds.Length > 1) @@ -200,7 +200,7 @@ public class SecretsControllerTests [Theory] [BitAutoData] - public async void UpdateSecret_SecretDoesNotExist_Throws(SutProvider sutProvider, SecretUpdateRequestModel data, Guid secretId, Guid organizationId) + public async Task UpdateSecret_SecretDoesNotExist_Throws(SutProvider sutProvider, SecretUpdateRequestModel data, Guid secretId, Guid organizationId) { // We currently only allow a secret to be in one project at a time if (data.ProjectIds != null && data.ProjectIds.Length > 1) @@ -222,7 +222,7 @@ public class SecretsControllerTests [Theory] [BitAutoData] - public async void UpdateSecret_Success(SutProvider sutProvider, SecretUpdateRequestModel data, Guid secretId, Guid organizationId, Secret mockSecret) + public async Task UpdateSecret_Success(SutProvider sutProvider, SecretUpdateRequestModel data, Guid secretId, Guid organizationId, Secret mockSecret) { // We currently only allow a secret to be in one project at a time if (data.ProjectIds != null && data.ProjectIds.Length > 1) @@ -245,7 +245,7 @@ public class SecretsControllerTests [Theory] [BitAutoData] - public async void BulkDelete_NoSecretsFound_ThrowsNotFound(SutProvider sutProvider, List data) + public async Task BulkDelete_NoSecretsFound_ThrowsNotFound(SutProvider sutProvider, List data) { var ids = data.Select(s => s.Id).ToList(); sutProvider.GetDependency().GetManyByIds(Arg.Is(ids)).ReturnsForAnyArgs(new List()); @@ -255,7 +255,7 @@ public class SecretsControllerTests [Theory] [BitAutoData] - public async void BulkDelete_SecretsFoundMisMatch_ThrowsNotFound(SutProvider sutProvider, List data, Secret mockSecret) + public async Task BulkDelete_SecretsFoundMisMatch_ThrowsNotFound(SutProvider sutProvider, List data, Secret mockSecret) { data.Add(mockSecret); var ids = data.Select(s => s.Id).ToList(); @@ -266,7 +266,7 @@ public class SecretsControllerTests [Theory] [BitAutoData] - public async void BulkDelete_OrganizationMistMatch_ThrowsNotFound(SutProvider sutProvider, List data) + public async Task BulkDelete_OrganizationMistMatch_ThrowsNotFound(SutProvider sutProvider, List data) { var ids = data.Select(s => s.Id).ToList(); sutProvider.GetDependency().GetManyByIds(Arg.Is(ids)).ReturnsForAnyArgs(data); @@ -276,7 +276,7 @@ public class SecretsControllerTests [Theory] [BitAutoData] - public async void BulkDelete_NoAccessToSecretsManager_ThrowsNotFound(SutProvider sutProvider, List data) + public async Task BulkDelete_NoAccessToSecretsManager_ThrowsNotFound(SutProvider sutProvider, List data) { var ids = data.Select(s => s.Id).ToList(); var organizationId = data.First().OrganizationId; @@ -292,7 +292,7 @@ public class SecretsControllerTests [Theory] [BitAutoData] - public async void BulkDelete_ReturnsAccessDeniedForSecretsWithoutAccess_Success(SutProvider sutProvider, List data) + public async Task BulkDelete_ReturnsAccessDeniedForSecretsWithoutAccess_Success(SutProvider sutProvider, List data) { var ids = data.Select(s => s.Id).ToList(); var organizationId = data.First().OrganizationId; @@ -321,7 +321,7 @@ public class SecretsControllerTests [Theory] [BitAutoData] - public async void BulkDelete_Success(SutProvider sutProvider, List data) + public async Task BulkDelete_Success(SutProvider sutProvider, List data) { var ids = data.Select(sa => sa.Id).ToList(); var organizationId = data.First().OrganizationId; @@ -349,7 +349,7 @@ public class SecretsControllerTests [Theory] [BitAutoData] - public async void GetSecretsByIds_NoSecretsFound_ThrowsNotFound(SutProvider sutProvider, + public async Task GetSecretsByIds_NoSecretsFound_ThrowsNotFound(SutProvider sutProvider, List data) { var (ids, request) = BuildGetSecretsRequestModel(data); @@ -359,7 +359,7 @@ public class SecretsControllerTests [Theory] [BitAutoData] - public async void GetSecretsByIds_SecretsFoundMisMatch_ThrowsNotFound(SutProvider sutProvider, + public async Task GetSecretsByIds_SecretsFoundMisMatch_ThrowsNotFound(SutProvider sutProvider, List data, Secret mockSecret) { var (ids, request) = BuildGetSecretsRequestModel(data); @@ -371,7 +371,7 @@ public class SecretsControllerTests [Theory] [BitAutoData] - public async void GetSecretsByIds_OrganizationMisMatch_ThrowsNotFound(SutProvider sutProvider, + public async Task GetSecretsByIds_OrganizationMisMatch_ThrowsNotFound(SutProvider sutProvider, List data) { var (ids, request) = BuildGetSecretsRequestModel(data); @@ -381,7 +381,7 @@ public class SecretsControllerTests [Theory] [BitAutoData] - public async void GetSecretsByIds_NoAccessToSecretsManager_ThrowsNotFound( + public async Task GetSecretsByIds_NoAccessToSecretsManager_ThrowsNotFound( SutProvider sutProvider, List data) { var (ids, request) = BuildGetSecretsRequestModel(data); @@ -395,7 +395,7 @@ public class SecretsControllerTests [Theory] [BitAutoData] - public async void GetSecretsByIds_AccessDenied_ThrowsNotFound(SutProvider sutProvider, + public async Task GetSecretsByIds_AccessDenied_ThrowsNotFound(SutProvider sutProvider, List data) { var (ids, request) = BuildGetSecretsRequestModel(data); @@ -413,7 +413,7 @@ public class SecretsControllerTests [Theory] [BitAutoData] - public async void GetSecretsByIds_Success(SutProvider sutProvider, List data) + public async Task GetSecretsByIds_Success(SutProvider sutProvider, List data) { var (ids, request) = BuildGetSecretsRequestModel(data); var organizationId = SetOrganizations(ref data); diff --git a/test/Api.Test/SecretsManager/Controllers/SecretsManagerEventsControllerTests.cs b/test/Api.Test/SecretsManager/Controllers/SecretsManagerEventsControllerTests.cs index 63eecf148..9827c863c 100644 --- a/test/Api.Test/SecretsManager/Controllers/SecretsManagerEventsControllerTests.cs +++ b/test/Api.Test/SecretsManager/Controllers/SecretsManagerEventsControllerTests.cs @@ -20,7 +20,7 @@ public class SecretsManagerEventsControllerTests { [Theory] [BitAutoData] - public async void GetServiceAccountEvents_NoAccess_Throws(SutProvider sutProvider, + public async Task GetServiceAccountEvents_NoAccess_Throws(SutProvider sutProvider, ServiceAccount data) { sutProvider.GetDependency().GetByIdAsync(default).ReturnsForAnyArgs(data); @@ -37,7 +37,7 @@ public class SecretsManagerEventsControllerTests [Theory] [BitAutoData] - public async void GetServiceAccountEvents_DateRangeOver_Throws( + public async Task GetServiceAccountEvents_DateRangeOver_Throws( SutProvider sutProvider, ServiceAccount data) { @@ -59,7 +59,7 @@ public class SecretsManagerEventsControllerTests [Theory] [BitAutoData] - public async void GetServiceAccountEvents_Success(SutProvider sutProvider, + public async Task GetServiceAccountEvents_Success(SutProvider sutProvider, ServiceAccount data) { sutProvider.GetDependency().GetByIdAsync(default).ReturnsForAnyArgs(data); diff --git a/test/Api.Test/SecretsManager/Controllers/ServiceAccountsControllerTests.cs b/test/Api.Test/SecretsManager/Controllers/ServiceAccountsControllerTests.cs index 6e23a4dfe..731494a84 100644 --- a/test/Api.Test/SecretsManager/Controllers/ServiceAccountsControllerTests.cs +++ b/test/Api.Test/SecretsManager/Controllers/ServiceAccountsControllerTests.cs @@ -31,7 +31,7 @@ public class ServiceAccountsControllerTests { [Theory] [BitAutoData] - public async void GetServiceAccountsByOrganization_ReturnsEmptyList( + public async Task GetServiceAccountsByOrganization_ReturnsEmptyList( SutProvider sutProvider, Guid id) { sutProvider.GetDependency().AccessSecretsManager(id).Returns(true); @@ -47,7 +47,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData] - public async void GetServiceAccountsByOrganization_Success(SutProvider sutProvider, + public async Task GetServiceAccountsByOrganization_Success(SutProvider sutProvider, ServiceAccountSecretsDetails resultServiceAccount) { sutProvider.GetDependency().AccessSecretsManager(default).ReturnsForAnyArgs(true); @@ -66,7 +66,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData] - public async void GetServiceAccountsByOrganization_AccessDenied_Throws( + public async Task GetServiceAccountsByOrganization_AccessDenied_Throws( SutProvider sutProvider, Guid orgId) { sutProvider.GetDependency().AccessSecretsManager(default).ReturnsForAnyArgs(false); @@ -77,7 +77,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData] - public async void CreateServiceAccount_NoAccess_Throws(SutProvider sutProvider, + public async Task CreateServiceAccount_NoAccess_Throws(SutProvider sutProvider, ServiceAccountCreateRequestModel data, Guid organizationId) { sutProvider.GetDependency() @@ -95,7 +95,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData(0)] - public async void CreateServiceAccount_WhenAutoscalingNotRequired_DoesNotCallUpdateSubscription( + public async Task CreateServiceAccount_WhenAutoscalingNotRequired_DoesNotCallUpdateSubscription( int newSlotsRequired, SutProvider sutProvider, ServiceAccountCreateRequestModel data, Organization organization) { @@ -113,7 +113,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData(1)] [BitAutoData(2)] - public async void CreateServiceAccount_WhenAutoscalingRequired_CallsUpdateSubscription(int newSlotsRequired, + public async Task CreateServiceAccount_WhenAutoscalingRequired_CallsUpdateSubscription(int newSlotsRequired, SutProvider sutProvider, ServiceAccountCreateRequestModel data, Organization organization) { @@ -135,7 +135,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData] - public async void CreateServiceAccount_Success(SutProvider sutProvider, + public async Task CreateServiceAccount_Success(SutProvider sutProvider, ServiceAccountCreateRequestModel data, Guid organizationId, Organization mockOrg) { mockOrg.Id = organizationId; @@ -155,7 +155,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData] - public async void UpdateServiceAccount_NoAccess_Throws(SutProvider sutProvider, + public async Task UpdateServiceAccount_NoAccess_Throws(SutProvider sutProvider, ServiceAccountUpdateRequestModel data, ServiceAccount existingServiceAccount) { sutProvider.GetDependency() @@ -174,7 +174,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData] - public async void UpdateServiceAccount_Success(SutProvider sutProvider, + public async Task UpdateServiceAccount_Success(SutProvider sutProvider, ServiceAccountUpdateRequestModel data, ServiceAccount existingServiceAccount) { sutProvider.GetDependency() @@ -191,7 +191,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData] - public async void CreateAccessToken_NoAccess_Throws(SutProvider sutProvider, + public async Task CreateAccessToken_NoAccess_Throws(SutProvider sutProvider, AccessTokenCreateRequestModel data, ServiceAccount serviceAccount, string mockClientSecret) { sutProvider.GetDependency().GetByIdAsync(serviceAccount.Id).Returns(serviceAccount); @@ -212,7 +212,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData] - public async void CreateAccessToken_Success(SutProvider sutProvider, + public async Task CreateAccessToken_Success(SutProvider sutProvider, AccessTokenCreateRequestModel data, ServiceAccount serviceAccount, string mockClientSecret) { sutProvider.GetDependency().GetByIdAsync(serviceAccount.Id).Returns(serviceAccount); @@ -231,7 +231,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData] - public async void GetAccessTokens_NoAccess_Throws(SutProvider sutProvider, + public async Task GetAccessTokens_NoAccess_Throws(SutProvider sutProvider, ServiceAccount data, ICollection resultApiKeys) { sutProvider.GetDependency().GetByIdAsync(default).ReturnsForAnyArgs(data); @@ -254,7 +254,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData] - public async void GetAccessTokens_Success(SutProvider sutProvider, ServiceAccount data, + public async Task GetAccessTokens_Success(SutProvider sutProvider, ServiceAccount data, ICollection resultApiKeys) { sutProvider.GetDependency().GetByIdAsync(default).ReturnsForAnyArgs(data); @@ -279,7 +279,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData] - public async void RevokeAccessTokens_NoAccess_Throws(SutProvider sutProvider, + public async Task RevokeAccessTokens_NoAccess_Throws(SutProvider sutProvider, RevokeAccessTokensRequest data, ServiceAccount serviceAccount) { sutProvider.GetDependency().GetByIdAsync(serviceAccount.Id).Returns(serviceAccount); @@ -295,7 +295,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData] - public async void RevokeAccessTokens_Success(SutProvider sutProvider, + public async Task RevokeAccessTokens_Success(SutProvider sutProvider, RevokeAccessTokensRequest data, ServiceAccount serviceAccount) { sutProvider.GetDependency().GetByIdAsync(serviceAccount.Id).Returns(serviceAccount); @@ -310,7 +310,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData] - public async void BulkDelete_NoServiceAccountsFound_ThrowsNotFound(SutProvider sutProvider, List data) + public async Task BulkDelete_NoServiceAccountsFound_ThrowsNotFound(SutProvider sutProvider, List data) { var ids = data.Select(sa => sa.Id).ToList(); sutProvider.GetDependency().GetManyByIds(Arg.Is(ids)).ReturnsForAnyArgs(new List()); @@ -320,7 +320,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData] - public async void BulkDelete_ServiceAccountsFoundMisMatch_ThrowsNotFound(SutProvider sutProvider, List data, ServiceAccount mockSa) + public async Task BulkDelete_ServiceAccountsFoundMisMatch_ThrowsNotFound(SutProvider sutProvider, List data, ServiceAccount mockSa) { data.Add(mockSa); var ids = data.Select(sa => sa.Id).ToList(); @@ -331,7 +331,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData] - public async void BulkDelete_OrganizationMistMatch_ThrowsNotFound(SutProvider sutProvider, List data) + public async Task BulkDelete_OrganizationMistMatch_ThrowsNotFound(SutProvider sutProvider, List data) { var ids = data.Select(sa => sa.Id).ToList(); sutProvider.GetDependency().GetManyByIds(Arg.Is(ids)).ReturnsForAnyArgs(data); @@ -341,7 +341,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData] - public async void BulkDelete_NoAccessToSecretsManager_ThrowsNotFound(SutProvider sutProvider, List data) + public async Task BulkDelete_NoAccessToSecretsManager_ThrowsNotFound(SutProvider sutProvider, List data) { var ids = data.Select(sa => sa.Id).ToList(); var organizationId = data.First().OrganizationId; @@ -357,7 +357,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData] - public async void BulkDelete_ReturnsAccessDeniedForProjectsWithoutAccess_Success(SutProvider sutProvider, List data) + public async Task BulkDelete_ReturnsAccessDeniedForProjectsWithoutAccess_Success(SutProvider sutProvider, List data) { var ids = data.Select(sa => sa.Id).ToList(); var organizationId = data.First().OrganizationId; @@ -386,7 +386,7 @@ public class ServiceAccountsControllerTests [Theory] [BitAutoData] - public async void BulkDelete_Success(SutProvider sutProvider, List data) + public async Task BulkDelete_Success(SutProvider sutProvider, List data) { var ids = data.Select(sa => sa.Id).ToList(); var organizationId = data.First().OrganizationId; diff --git a/test/Api.Test/Vault/Controllers/SyncControllerTests.cs b/test/Api.Test/Vault/Controllers/SyncControllerTests.cs index 33a8902e8..b5be5f0f6 100644 --- a/test/Api.Test/Vault/Controllers/SyncControllerTests.cs +++ b/test/Api.Test/Vault/Controllers/SyncControllerTests.cs @@ -313,7 +313,7 @@ public class SyncControllerTests } - private async void AssertMethodsCalledAsync(IUserService userService, + private async Task AssertMethodsCalledAsync(IUserService userService, IOrganizationUserRepository organizationUserRepository, IProviderUserRepository providerUserRepository, IFolderRepository folderRepository, ICipherRepository cipherRepository, ISendRepository sendRepository, diff --git a/test/Core.Test/Auth/UserFeatures/WebAuthnLogin/AssertWebAuthnLoginCredentialCommandTests.cs b/test/Core.Test/Auth/UserFeatures/WebAuthnLogin/AssertWebAuthnLoginCredentialCommandTests.cs index 22fdeeee2..37181002e 100644 --- a/test/Core.Test/Auth/UserFeatures/WebAuthnLogin/AssertWebAuthnLoginCredentialCommandTests.cs +++ b/test/Core.Test/Auth/UserFeatures/WebAuthnLogin/AssertWebAuthnLoginCredentialCommandTests.cs @@ -20,7 +20,7 @@ namespace Bit.Core.Test.Auth.UserFeatures.WebAuthnLogin; public class AssertWebAuthnLoginCredentialCommandTests { [Theory, BitAutoData] - internal async void InvalidUserHandle_ThrowsBadRequestException(SutProvider sutProvider, AssertionOptions options, AuthenticatorAssertionRawResponse response) + internal async Task InvalidUserHandle_ThrowsBadRequestException(SutProvider sutProvider, AssertionOptions options, AuthenticatorAssertionRawResponse response) { // Arrange response.Response.UserHandle = Encoding.UTF8.GetBytes("invalid-user-handle"); @@ -33,7 +33,7 @@ public class AssertWebAuthnLoginCredentialCommandTests } [Theory, BitAutoData] - internal async void UserNotFound_ThrowsBadRequestException(SutProvider sutProvider, User user, AssertionOptions options, AuthenticatorAssertionRawResponse response) + internal async Task UserNotFound_ThrowsBadRequestException(SutProvider sutProvider, User user, AssertionOptions options, AuthenticatorAssertionRawResponse response) { // Arrange response.Response.UserHandle = user.Id.ToByteArray(); @@ -47,7 +47,7 @@ public class AssertWebAuthnLoginCredentialCommandTests } [Theory, BitAutoData] - internal async void NoMatchingCredentialExists_ThrowsBadRequestException(SutProvider sutProvider, User user, AssertionOptions options, AuthenticatorAssertionRawResponse response) + internal async Task NoMatchingCredentialExists_ThrowsBadRequestException(SutProvider sutProvider, User user, AssertionOptions options, AuthenticatorAssertionRawResponse response) { // Arrange response.Response.UserHandle = user.Id.ToByteArray(); @@ -62,7 +62,7 @@ public class AssertWebAuthnLoginCredentialCommandTests } [Theory, BitAutoData] - internal async void AssertionFails_ThrowsBadRequestException(SutProvider sutProvider, User user, AssertionOptions options, AuthenticatorAssertionRawResponse response, WebAuthnCredential credential, AssertionVerificationResult assertionResult) + internal async Task AssertionFails_ThrowsBadRequestException(SutProvider sutProvider, User user, AssertionOptions options, AuthenticatorAssertionRawResponse response, WebAuthnCredential credential, AssertionVerificationResult assertionResult) { // Arrange var credentialId = Guid.NewGuid().ToByteArray(); @@ -83,7 +83,7 @@ public class AssertWebAuthnLoginCredentialCommandTests } [Theory, BitAutoData] - internal async void AssertionSucceeds_ReturnsUserAndCredential(SutProvider sutProvider, User user, AssertionOptions options, AuthenticatorAssertionRawResponse response, WebAuthnCredential credential, AssertionVerificationResult assertionResult) + internal async Task AssertionSucceeds_ReturnsUserAndCredential(SutProvider sutProvider, User user, AssertionOptions options, AuthenticatorAssertionRawResponse response, WebAuthnCredential credential, AssertionVerificationResult assertionResult) { // Arrange var credentialId = Guid.NewGuid().ToByteArray(); diff --git a/test/Core.Test/Auth/UserFeatures/WebAuthnLogin/CreateWebAuthnLoginCredentialCommandTests.cs b/test/Core.Test/Auth/UserFeatures/WebAuthnLogin/CreateWebAuthnLoginCredentialCommandTests.cs index 8fbb68e59..c7490e8ed 100644 --- a/test/Core.Test/Auth/UserFeatures/WebAuthnLogin/CreateWebAuthnLoginCredentialCommandTests.cs +++ b/test/Core.Test/Auth/UserFeatures/WebAuthnLogin/CreateWebAuthnLoginCredentialCommandTests.cs @@ -17,7 +17,7 @@ namespace Bit.Core.Test.Auth.UserFeatures.WebAuthnLogin; public class CreateWebAuthnLoginCredentialCommandTests { [Theory, BitAutoData] - internal async void ExceedsExistingCredentialsLimit_ReturnsFalse(SutProvider sutProvider, User user, CredentialCreateOptions options, AuthenticatorAttestationRawResponse response, Generator credentialGenerator) + internal async Task ExceedsExistingCredentialsLimit_ReturnsFalse(SutProvider sutProvider, User user, CredentialCreateOptions options, AuthenticatorAttestationRawResponse response, Generator credentialGenerator) { // Arrange var existingCredentials = credentialGenerator.Take(CreateWebAuthnLoginCredentialCommand.MaxCredentialsPerUser).ToList(); @@ -32,7 +32,7 @@ public class CreateWebAuthnLoginCredentialCommandTests } [Theory, BitAutoData] - internal async void DoesNotExceedExistingCredentialsLimit_CreatesCredential(SutProvider sutProvider, User user, CredentialCreateOptions options, AuthenticatorAttestationRawResponse response, Generator credentialGenerator) + internal async Task DoesNotExceedExistingCredentialsLimit_CreatesCredential(SutProvider sutProvider, User user, CredentialCreateOptions options, AuthenticatorAttestationRawResponse response, Generator credentialGenerator) { // Arrange var existingCredentials = credentialGenerator.Take(CreateWebAuthnLoginCredentialCommand.MaxCredentialsPerUser - 1).ToList(); diff --git a/test/Core.Test/OrganizationFeatures/OrganizationLicenses/SelfHostedGetOrganizationLicenseQueryTests.cs b/test/Core.Test/OrganizationFeatures/OrganizationLicenses/SelfHostedGetOrganizationLicenseQueryTests.cs index f57fc8c34..0e5b73d11 100644 --- a/test/Core.Test/OrganizationFeatures/OrganizationLicenses/SelfHostedGetOrganizationLicenseQueryTests.cs +++ b/test/Core.Test/OrganizationFeatures/OrganizationLicenses/SelfHostedGetOrganizationLicenseQueryTests.cs @@ -28,7 +28,7 @@ public class SelfHostedGetOrganizationLicenseQueryTests [Theory] [BitAutoData] [OrganizationLicenseCustomize] - public async void GetLicenseAsync_Success(Organization organization, + public async Task GetLicenseAsync_Success(Organization organization, OrganizationConnection billingSyncConnection, BillingSyncConfig config, OrganizationLicense license) { var sutProvider = GetSutProvider(config, JsonSerializer.Serialize(license)); @@ -41,7 +41,7 @@ public class SelfHostedGetOrganizationLicenseQueryTests [Theory] [BitAutoData] - public async void GetLicenseAsync_WhenNotSelfHosted_Throws(Organization organization, + public async Task GetLicenseAsync_WhenNotSelfHosted_Throws(Organization organization, OrganizationConnection billingSyncConnection, BillingSyncConfig config) { var sutProvider = GetSutProvider(config); @@ -54,7 +54,7 @@ public class SelfHostedGetOrganizationLicenseQueryTests [Theory] [BitAutoData] - public async void GetLicenseAsync_WhenCloudCommunicationDisabled_Throws(Organization organization, + public async Task GetLicenseAsync_WhenCloudCommunicationDisabled_Throws(Organization organization, OrganizationConnection billingSyncConnection, BillingSyncConfig config) { var sutProvider = GetSutProvider(config); @@ -67,7 +67,7 @@ public class SelfHostedGetOrganizationLicenseQueryTests [Theory] [BitAutoData] - public async void GetLicenseAsync_WhenCantUseConnection_Throws(Organization organization, + public async Task GetLicenseAsync_WhenCantUseConnection_Throws(Organization organization, OrganizationConnection billingSyncConnection, BillingSyncConfig config) { var sutProvider = GetSutProvider(config); @@ -80,7 +80,7 @@ public class SelfHostedGetOrganizationLicenseQueryTests [Theory] [BitAutoData] - public async void GetLicenseAsync_WhenNullResponse_Throws(Organization organization, + public async Task GetLicenseAsync_WhenNullResponse_Throws(Organization organization, OrganizationConnection billingSyncConnection, BillingSyncConfig config) { var sutProvider = GetSutProvider(config); diff --git a/test/Core.Test/Services/StripePaymentServiceTests.cs b/test/Core.Test/Services/StripePaymentServiceTests.cs index b4dbdaa7f..9362e4264 100644 --- a/test/Core.Test/Services/StripePaymentServiceTests.cs +++ b/test/Core.Test/Services/StripePaymentServiceTests.cs @@ -25,7 +25,7 @@ public class StripePaymentServiceTests [BitAutoData(PaymentMethodType.Credit)] [BitAutoData(PaymentMethodType.WireTransfer)] [BitAutoData(PaymentMethodType.Check)] - public async void PurchaseOrganizationAsync_Invalid(PaymentMethodType paymentMethodType, SutProvider sutProvider) + public async Task PurchaseOrganizationAsync_Invalid(PaymentMethodType paymentMethodType, SutProvider sutProvider) { var exception = await Assert.ThrowsAsync( () => sutProvider.Sut.PurchaseOrganizationAsync(null, paymentMethodType, null, null, 0, 0, false, null, false, -1, -1)); @@ -34,7 +34,7 @@ public class StripePaymentServiceTests } [Theory, BitAutoData] - public async void PurchaseOrganizationAsync_Stripe_ProviderOrg_Coupon_Add(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo, bool provider = true) + public async Task PurchaseOrganizationAsync_Stripe_ProviderOrg_Coupon_Add(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo, bool provider = true) { var plan = StaticStore.GetPlan(PlanType.EnterpriseAnnually); @@ -88,7 +88,7 @@ public class StripePaymentServiceTests } [Theory, BitAutoData] - public async void PurchaseOrganizationAsync_SM_Stripe_ProviderOrg_Coupon_Add(SutProvider sutProvider, Organization organization, + public async Task PurchaseOrganizationAsync_SM_Stripe_ProviderOrg_Coupon_Add(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo, bool provider = true) { var plan = StaticStore.GetPlan(PlanType.EnterpriseAnnually); @@ -145,7 +145,7 @@ public class StripePaymentServiceTests } [Theory, BitAutoData] - public async void PurchaseOrganizationAsync_Stripe(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) + public async Task PurchaseOrganizationAsync_Stripe(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) { var plan = StaticStore.GetPlan(PlanType.EnterpriseAnnually); organization.UseSecretsManager = true; @@ -201,7 +201,7 @@ public class StripePaymentServiceTests } [Theory, BitAutoData] - public async void PurchaseOrganizationAsync_Stripe_PM(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) + public async Task PurchaseOrganizationAsync_Stripe_PM(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) { var plan = StaticStore.GetPlan(PlanType.EnterpriseAnnually); paymentToken = "pm_" + paymentToken; @@ -258,7 +258,7 @@ public class StripePaymentServiceTests } [Theory, BitAutoData] - public async void PurchaseOrganizationAsync_Stripe_Declined(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) + public async Task PurchaseOrganizationAsync_Stripe_Declined(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) { var plan = StaticStore.GetPlan(PlanType.EnterpriseAnnually); paymentToken = "pm_" + paymentToken; @@ -291,7 +291,7 @@ public class StripePaymentServiceTests } [Theory, BitAutoData] - public async void PurchaseOrganizationAsync_SM_Stripe_Declined(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) + public async Task PurchaseOrganizationAsync_SM_Stripe_Declined(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) { var plan = StaticStore.GetPlan(PlanType.EnterpriseAnnually); paymentToken = "pm_" + paymentToken; @@ -325,7 +325,7 @@ public class StripePaymentServiceTests } [Theory, BitAutoData] - public async void PurchaseOrganizationAsync_Stripe_RequiresAction(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) + public async Task PurchaseOrganizationAsync_Stripe_RequiresAction(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) { var plan = StaticStore.GetPlan(PlanType.EnterpriseAnnually); @@ -356,7 +356,7 @@ public class StripePaymentServiceTests } [Theory, BitAutoData] - public async void PurchaseOrganizationAsync_SM_Stripe_RequiresAction(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) + public async Task PurchaseOrganizationAsync_SM_Stripe_RequiresAction(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) { var plan = StaticStore.GetPlan(PlanType.EnterpriseAnnually); @@ -388,7 +388,7 @@ public class StripePaymentServiceTests } [Theory, BitAutoData] - public async void PurchaseOrganizationAsync_Paypal(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) + public async Task PurchaseOrganizationAsync_Paypal(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) { var plan = StaticStore.GetPlan(PlanType.EnterpriseAnnually); @@ -452,7 +452,7 @@ public class StripePaymentServiceTests } [Theory, BitAutoData] - public async void PurchaseOrganizationAsync_SM_Paypal(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) + public async Task PurchaseOrganizationAsync_SM_Paypal(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) { var plan = StaticStore.GetPlan(PlanType.EnterpriseAnnually); organization.UseSecretsManager = true; @@ -525,7 +525,7 @@ public class StripePaymentServiceTests } [Theory, BitAutoData] - public async void PurchaseOrganizationAsync_Paypal_FailedCreate(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) + public async Task PurchaseOrganizationAsync_Paypal_FailedCreate(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) { var plan = StaticStore.GetPlan(PlanType.EnterpriseAnnually); @@ -542,7 +542,7 @@ public class StripePaymentServiceTests } [Theory, BitAutoData] - public async void PurchaseOrganizationAsync_SM_Paypal_FailedCreate(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) + public async Task PurchaseOrganizationAsync_SM_Paypal_FailedCreate(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) { var plan = StaticStore.GetPlan(PlanType.EnterpriseAnnually); @@ -560,7 +560,7 @@ public class StripePaymentServiceTests } [Theory, BitAutoData] - public async void PurchaseOrganizationAsync_PayPal_Declined(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) + public async Task PurchaseOrganizationAsync_PayPal_Declined(SutProvider sutProvider, Organization organization, string paymentToken, TaxInfo taxInfo) { var plans = StaticStore.GetPlan(PlanType.EnterpriseAnnually); paymentToken = "pm_" + paymentToken; @@ -604,7 +604,7 @@ public class StripePaymentServiceTests } [Theory, BitAutoData] - public async void UpgradeFreeOrganizationAsync_Success(SutProvider sutProvider, + public async Task UpgradeFreeOrganizationAsync_Success(SutProvider sutProvider, Organization organization, TaxInfo taxInfo) { organization.GatewaySubscriptionId = null; @@ -649,7 +649,7 @@ public class StripePaymentServiceTests } [Theory, BitAutoData] - public async void UpgradeFreeOrganizationAsync_SM_Success(SutProvider sutProvider, + public async Task UpgradeFreeOrganizationAsync_SM_Success(SutProvider sutProvider, Organization organization, TaxInfo taxInfo) { organization.GatewaySubscriptionId = null; @@ -694,7 +694,7 @@ public class StripePaymentServiceTests } [Theory, BitAutoData] - public async void UpgradeFreeOrganizationAsync_WhenCustomerHasNoAddress_UpdatesCustomerAddressWithTaxInfo( + public async Task UpgradeFreeOrganizationAsync_WhenCustomerHasNoAddress_UpdatesCustomerAddressWithTaxInfo( SutProvider sutProvider, Organization organization, TaxInfo taxInfo) diff --git a/test/Core.Test/Tools/Services/SendServiceTests.cs b/test/Core.Test/Tools/Services/SendServiceTests.cs index d3a4159a5..0174efa67 100644 --- a/test/Core.Test/Tools/Services/SendServiceTests.cs +++ b/test/Core.Test/Tools/Services/SendServiceTests.cs @@ -45,7 +45,7 @@ public class SendServiceTests [Theory] [BitAutoData(SendType.File)] [BitAutoData(SendType.Text)] - public async void SaveSendAsync_DisableSend_Applies_throws(SendType sendType, + public async Task SaveSendAsync_DisableSend_Applies_throws(SendType sendType, SutProvider sutProvider, Send send) { SaveSendAsync_Setup(sendType, disableSendPolicyAppliesToUser: true, sutProvider, send); @@ -56,7 +56,7 @@ public class SendServiceTests [Theory] [BitAutoData(SendType.File)] [BitAutoData(SendType.Text)] - public async void SaveSendAsync_DisableSend_DoesntApply_success(SendType sendType, + public async Task SaveSendAsync_DisableSend_DoesntApply_success(SendType sendType, SutProvider sutProvider, Send send) { SaveSendAsync_Setup(sendType, disableSendPolicyAppliesToUser: false, sutProvider, send); @@ -92,7 +92,7 @@ public class SendServiceTests [Theory] [BitAutoData(SendType.File)] [BitAutoData(SendType.Text)] - public async void SaveSendAsync_DisableHideEmail_Applies_throws(SendType sendType, + public async Task SaveSendAsync_DisableHideEmail_Applies_throws(SendType sendType, SutProvider sutProvider, Send send, Policy policy) { SaveSendAsync_Setup(sendType, false, sutProvider, send); @@ -104,7 +104,7 @@ public class SendServiceTests [Theory] [BitAutoData(SendType.File)] [BitAutoData(SendType.Text)] - public async void SaveSendAsync_DisableHideEmail_DoesntApply_success(SendType sendType, + public async Task SaveSendAsync_DisableHideEmail_DoesntApply_success(SendType sendType, SutProvider sutProvider, Send send, Policy policy) { SaveSendAsync_Setup(sendType, false, sutProvider, send); @@ -117,7 +117,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void SaveSendAsync_ExistingSend_Updates(SutProvider sutProvider, + public async Task SaveSendAsync_ExistingSend_Updates(SutProvider sutProvider, Send send) { send.Id = Guid.NewGuid(); @@ -138,7 +138,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void SaveFileSendAsync_TextType_ThrowsBadRequest(SutProvider sutProvider, + public async Task SaveFileSendAsync_TextType_ThrowsBadRequest(SutProvider sutProvider, Send send) { send.Type = SendType.Text; @@ -152,7 +152,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void SaveFileSendAsync_EmptyFile_ThrowsBadRequest(SutProvider sutProvider, + public async Task SaveFileSendAsync_EmptyFile_ThrowsBadRequest(SutProvider sutProvider, Send send) { send.Type = SendType.File; @@ -166,7 +166,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void SaveFileSendAsync_UserCannotAccessPremium_ThrowsBadRequest(SutProvider sutProvider, + public async Task SaveFileSendAsync_UserCannotAccessPremium_ThrowsBadRequest(SutProvider sutProvider, Send send) { var user = new User @@ -194,7 +194,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void SaveFileSendAsync_UserHasUnconfirmedEmail_ThrowsBadRequest(SutProvider sutProvider, + public async Task SaveFileSendAsync_UserHasUnconfirmedEmail_ThrowsBadRequest(SutProvider sutProvider, Send send) { var user = new User @@ -223,7 +223,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void SaveFileSendAsync_UserCanAccessPremium_HasNoStorage_ThrowsBadRequest(SutProvider sutProvider, + public async Task SaveFileSendAsync_UserCanAccessPremium_HasNoStorage_ThrowsBadRequest(SutProvider sutProvider, Send send) { var user = new User @@ -255,7 +255,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void SaveFileSendAsync_UserCanAccessPremium_StorageFull_ThrowsBadRequest(SutProvider sutProvider, + public async Task SaveFileSendAsync_UserCanAccessPremium_StorageFull_ThrowsBadRequest(SutProvider sutProvider, Send send) { var user = new User @@ -287,7 +287,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void SaveFileSendAsync_UserCanAccessPremium_IsNotPremium_IsSelfHosted_GiantFile_ThrowsBadRequest(SutProvider sutProvider, + public async Task SaveFileSendAsync_UserCanAccessPremium_IsNotPremium_IsSelfHosted_GiantFile_ThrowsBadRequest(SutProvider sutProvider, Send send) { var user = new User @@ -320,7 +320,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void SaveFileSendAsync_UserCanAccessPremium_IsNotPremium_IsNotSelfHosted_TwoGigabyteFile_ThrowsBadRequest(SutProvider sutProvider, + public async Task SaveFileSendAsync_UserCanAccessPremium_IsNotPremium_IsNotSelfHosted_TwoGigabyteFile_ThrowsBadRequest(SutProvider sutProvider, Send send) { var user = new User @@ -353,7 +353,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void SaveFileSendAsync_ThroughOrg_MaxStorageIsNull_ThrowsBadRequest(SutProvider sutProvider, + public async Task SaveFileSendAsync_ThroughOrg_MaxStorageIsNull_ThrowsBadRequest(SutProvider sutProvider, Send send) { var org = new Organization @@ -379,7 +379,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void SaveFileSendAsync_ThroughOrg_MaxStorageIsNull_TwoGBFile_ThrowsBadRequest(SutProvider sutProvider, + public async Task SaveFileSendAsync_ThroughOrg_MaxStorageIsNull_TwoGBFile_ThrowsBadRequest(SutProvider sutProvider, Send send) { var org = new Organization @@ -405,7 +405,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void SaveFileSendAsync_ThroughOrg_MaxStorageIsOneGB_TwoGBFile_ThrowsBadRequest(SutProvider sutProvider, + public async Task SaveFileSendAsync_ThroughOrg_MaxStorageIsOneGB_TwoGBFile_ThrowsBadRequest(SutProvider sutProvider, Send send) { var org = new Organization @@ -431,7 +431,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void SaveFileSendAsync_HasEnoughStorage_Success(SutProvider sutProvider, + public async Task SaveFileSendAsync_HasEnoughStorage_Success(SutProvider sutProvider, Send send) { var user = new User @@ -485,7 +485,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void SaveFileSendAsync_HasEnoughStorage_SendFileThrows_CleansUp(SutProvider sutProvider, + public async Task SaveFileSendAsync_HasEnoughStorage_SendFileThrows_CleansUp(SutProvider sutProvider, Send send) { var user = new User @@ -543,7 +543,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void UpdateFileToExistingSendAsync_SendNull_ThrowsBadRequest(SutProvider sutProvider) + public async Task UpdateFileToExistingSendAsync_SendNull_ThrowsBadRequest(SutProvider sutProvider) { var badRequest = await Assert.ThrowsAsync(() => @@ -555,7 +555,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void UpdateFileToExistingSendAsync_SendDataNull_ThrowsBadRequest(SutProvider sutProvider, + public async Task UpdateFileToExistingSendAsync_SendDataNull_ThrowsBadRequest(SutProvider sutProvider, Send send) { send.Data = null; @@ -569,7 +569,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void UpdateFileToExistingSendAsync_NotFileType_ThrowsBadRequest(SutProvider sutProvider, + public async Task UpdateFileToExistingSendAsync_NotFileType_ThrowsBadRequest(SutProvider sutProvider, Send send) { var badRequest = await Assert.ThrowsAsync(() => @@ -581,7 +581,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void UpdateFileToExistingSendAsync_Success(SutProvider sutProvider, + public async Task UpdateFileToExistingSendAsync_Success(SutProvider sutProvider, Send send) { var fileContents = "Test file content"; @@ -605,7 +605,7 @@ public class SendServiceTests [Theory] [BitAutoData] - public async void UpdateFileToExistingSendAsync_InvalidSize(SutProvider sutProvider, + public async Task UpdateFileToExistingSendAsync_InvalidSize(SutProvider sutProvider, Send send) { var fileContents = "Test file content"; diff --git a/test/Infrastructure.EFIntegration.Test/AdminConsole/Repositories/OrganizationRepositoryTests.cs b/test/Infrastructure.EFIntegration.Test/AdminConsole/Repositories/OrganizationRepositoryTests.cs index e75b3bd6e..a62f7531d 100644 --- a/test/Infrastructure.EFIntegration.Test/AdminConsole/Repositories/OrganizationRepositoryTests.cs +++ b/test/Infrastructure.EFIntegration.Test/AdminConsole/Repositories/OrganizationRepositoryTests.cs @@ -14,7 +14,7 @@ namespace Bit.Infrastructure.EFIntegration.Test.Repositories; public class OrganizationRepositoryTests { [CiSkippedTheory, EfOrganizationAutoData] - public async void CreateAsync_Works_DataMatches( + public async Task CreateAsync_Works_DataMatches( Organization organization, SqlRepo.OrganizationRepository sqlOrganizationRepo, OrganizationCompare equalityComparer, List suts) @@ -37,7 +37,7 @@ public class OrganizationRepositoryTests } [CiSkippedTheory, EfOrganizationAutoData] - public async void ReplaceAsync_Works_DataMatches(Organization postOrganization, + public async Task ReplaceAsync_Works_DataMatches(Organization postOrganization, Organization replaceOrganization, SqlRepo.OrganizationRepository sqlOrganizationRepo, OrganizationCompare equalityComparer, List suts) { @@ -65,7 +65,7 @@ public class OrganizationRepositoryTests } [CiSkippedTheory, EfOrganizationAutoData] - public async void DeleteAsync_Works_DataMatches(Organization organization, + public async Task DeleteAsync_Works_DataMatches(Organization organization, SqlRepo.OrganizationRepository sqlOrganizationRepo, List suts) { foreach (var sut in suts) @@ -94,7 +94,7 @@ public class OrganizationRepositoryTests } [CiSkippedTheory, EfOrganizationAutoData] - public async void GetByIdentifierAsync_Works_DataMatches(Organization organization, + public async Task GetByIdentifierAsync_Works_DataMatches(Organization organization, SqlRepo.OrganizationRepository sqlOrganizationRepo, OrganizationCompare equalityComparer, List suts) { @@ -116,7 +116,7 @@ public class OrganizationRepositoryTests } [CiSkippedTheory, EfOrganizationAutoData] - public async void GetManyByEnabledAsync_Works_DataMatches(Organization organization, + public async Task GetManyByEnabledAsync_Works_DataMatches(Organization organization, SqlRepo.OrganizationRepository sqlOrganizationRepo, List suts) { var returnedOrgs = new List(); @@ -137,7 +137,7 @@ public class OrganizationRepositoryTests // testing data matches here would require manipulating all organization abilities in the db [CiSkippedTheory, EfOrganizationAutoData] - public async void GetManyAbilitiesAsync_Works(SqlRepo.OrganizationRepository sqlOrganizationRepo, List suts) + public async Task GetManyAbilitiesAsync_Works(SqlRepo.OrganizationRepository sqlOrganizationRepo, List suts) { var list = new List(); foreach (var sut in suts) @@ -150,7 +150,7 @@ public class OrganizationRepositoryTests } [CiSkippedTheory, EfOrganizationUserAutoData] - public async void SearchUnassignedAsync_Works(OrganizationUser orgUser, User user, Organization org, + public async Task SearchUnassignedAsync_Works(OrganizationUser orgUser, User user, Organization org, List efOrgUserRepos, List efOrgRepos, List efUserRepos, SqlRepo.OrganizationUserRepository sqlOrgUserRepo, SqlRepo.OrganizationRepository sqlOrgRepo, SqlRepo.UserRepository sqlUserRepo) { diff --git a/test/Infrastructure.EFIntegration.Test/AdminConsole/Repositories/OrganizationUserRepositoryTests.cs b/test/Infrastructure.EFIntegration.Test/AdminConsole/Repositories/OrganizationUserRepositoryTests.cs index c29fd28b2..21d4ca347 100644 --- a/test/Infrastructure.EFIntegration.Test/AdminConsole/Repositories/OrganizationUserRepositoryTests.cs +++ b/test/Infrastructure.EFIntegration.Test/AdminConsole/Repositories/OrganizationUserRepositoryTests.cs @@ -23,7 +23,7 @@ namespace Bit.Infrastructure.EFIntegration.Test.Repositories; public class OrganizationUserRepositoryTests { [CiSkippedTheory, EfOrganizationUserAutoData] - public async void CreateAsync_Works_DataMatches(OrganizationUser orgUser, User user, Organization org, + public async Task CreateAsync_Works_DataMatches(OrganizationUser orgUser, User user, Organization org, OrganizationUserCompare equalityComparer, List suts, List efOrgRepos, List efUserRepos, SqlRepo.OrganizationUserRepository sqlOrgUserRepo, SqlRepo.UserRepository sqlUserRepo, @@ -61,7 +61,7 @@ public class OrganizationUserRepositoryTests } [CiSkippedTheory, EfOrganizationUserAutoData] - public async void ReplaceAsync_Works_DataMatches( + public async Task ReplaceAsync_Works_DataMatches( OrganizationUser postOrgUser, OrganizationUser replaceOrgUser, User user, @@ -113,7 +113,7 @@ public class OrganizationUserRepositoryTests } [CiSkippedTheory, EfOrganizationUserAutoData] - public async void DeleteAsync_Works_DataMatches(OrganizationUser orgUser, User user, Organization org, List suts, + public async Task DeleteAsync_Works_DataMatches(OrganizationUser orgUser, User user, Organization org, List suts, List efUserRepos, List efOrgRepos, SqlRepo.OrganizationUserRepository sqlOrgUserRepo, SqlRepo.UserRepository sqlUserRepo, SqlRepo.OrganizationRepository sqlOrgRepo) @@ -166,7 +166,7 @@ public class OrganizationUserRepositoryTests [EfPolicyApplicableToUserInlineAutoData(OrganizationUserType.User, false, OrganizationUserStatusType.Confirmed, false, false)] // Policy disabled [EfPolicyApplicableToUserInlineAutoData(OrganizationUserType.User, false, OrganizationUserStatusType.Confirmed, true, false)] // No policy of Type [EfPolicyApplicableToUserInlineAutoData(OrganizationUserType.User, false, OrganizationUserStatusType.Invited, true, false)] // User not minStatus - public async void GetByUserIdWithPolicyDetailsAsync_Works_DataMatches( + public async Task GetByUserIdWithPolicyDetailsAsync_Works_DataMatches( // Inline data OrganizationUserType userType, bool canManagePolicies, diff --git a/test/Infrastructure.EFIntegration.Test/AdminConsole/Repositories/PolicyRepositoryTests.cs b/test/Infrastructure.EFIntegration.Test/AdminConsole/Repositories/PolicyRepositoryTests.cs index e7ae7c50b..30374243d 100644 --- a/test/Infrastructure.EFIntegration.Test/AdminConsole/Repositories/PolicyRepositoryTests.cs +++ b/test/Infrastructure.EFIntegration.Test/AdminConsole/Repositories/PolicyRepositoryTests.cs @@ -14,7 +14,7 @@ namespace Bit.Infrastructure.EFIntegration.Test.AdminConsole.Repositories; public class PolicyRepositoryTests { [CiSkippedTheory, EfPolicyAutoData] - public async void CreateAsync_Works_DataMatches( + public async Task CreateAsync_Works_DataMatches( Policy policy, Organization organization, PolicyCompare equalityComparer, diff --git a/test/Infrastructure.EFIntegration.Test/Auth/Repositories/AuthRequestRepositoryTests.cs b/test/Infrastructure.EFIntegration.Test/Auth/Repositories/AuthRequestRepositoryTests.cs index 64025b106..0b349ca9f 100644 --- a/test/Infrastructure.EFIntegration.Test/Auth/Repositories/AuthRequestRepositoryTests.cs +++ b/test/Infrastructure.EFIntegration.Test/Auth/Repositories/AuthRequestRepositoryTests.cs @@ -15,7 +15,7 @@ namespace Bit.Infrastructure.EFIntegration.Test.Auth.Repositories; public class AuthRequestRepositoryTests { [CiSkippedTheory, EfAuthRequestAutoData] - public async void CreateAsync_Works_DataMatches( + public async Task CreateAsync_Works_DataMatches( AuthRequest authRequest, AuthRequestCompare equalityComparer, List suts, diff --git a/test/Infrastructure.EFIntegration.Test/Auth/Repositories/EmergencyAccessRepositoryTests.cs b/test/Infrastructure.EFIntegration.Test/Auth/Repositories/EmergencyAccessRepositoryTests.cs index 0bb6b0306..d03c1d93d 100644 --- a/test/Infrastructure.EFIntegration.Test/Auth/Repositories/EmergencyAccessRepositoryTests.cs +++ b/test/Infrastructure.EFIntegration.Test/Auth/Repositories/EmergencyAccessRepositoryTests.cs @@ -14,7 +14,7 @@ namespace Bit.Infrastructure.EFIntegration.Test.Auth.Repositories; public class EmergencyAccessRepositoryTests { [CiSkippedTheory, EfEmergencyAccessAutoData] - public async void CreateAsync_Works_DataMatches( + public async Task CreateAsync_Works_DataMatches( EmergencyAccess emergencyAccess, List users, EmergencyAccessCompare equalityComparer, diff --git a/test/Infrastructure.EFIntegration.Test/Auth/Repositories/SsoConfigRepositoryTests.cs b/test/Infrastructure.EFIntegration.Test/Auth/Repositories/SsoConfigRepositoryTests.cs index e3d1f68ac..12a118756 100644 --- a/test/Infrastructure.EFIntegration.Test/Auth/Repositories/SsoConfigRepositoryTests.cs +++ b/test/Infrastructure.EFIntegration.Test/Auth/Repositories/SsoConfigRepositoryTests.cs @@ -13,7 +13,7 @@ namespace Bit.Infrastructure.EFIntegration.Test.Auth.Repositories; public class SsoConfigRepositoryTests { [CiSkippedTheory, EfSsoConfigAutoData] - public async void CreateAsync_Works_DataMatches(SsoConfig ssoConfig, Organization org, + public async Task CreateAsync_Works_DataMatches(SsoConfig ssoConfig, Organization org, SsoConfigCompare equalityComparer, List suts, List efOrgRepos, SqlAuthRepo.SsoConfigRepository sqlSsoConfigRepo, SqlRepo.OrganizationRepository sqlOrganizationRepo) @@ -49,7 +49,7 @@ public class SsoConfigRepositoryTests } [CiSkippedTheory, EfSsoConfigAutoData] - public async void ReplaceAsync_Works_DataMatches(SsoConfig postSsoConfig, SsoConfig replaceSsoConfig, + public async Task ReplaceAsync_Works_DataMatches(SsoConfig postSsoConfig, SsoConfig replaceSsoConfig, Organization org, SsoConfigCompare equalityComparer, List suts, List efOrgRepos, SqlAuthRepo.SsoConfigRepository sqlSsoConfigRepo, SqlRepo.OrganizationRepository sqlOrganizationRepo) @@ -94,7 +94,7 @@ public class SsoConfigRepositoryTests } [CiSkippedTheory, EfSsoConfigAutoData] - public async void DeleteAsync_Works_DataMatches(SsoConfig ssoConfig, Organization org, List suts, + public async Task DeleteAsync_Works_DataMatches(SsoConfig ssoConfig, Organization org, List suts, List efOrgRepos, SqlAuthRepo.SsoConfigRepository sqlSsoConfigRepo, SqlRepo.OrganizationRepository sqlOrganizationRepo) { @@ -131,7 +131,7 @@ public class SsoConfigRepositoryTests } [CiSkippedTheory, EfSsoConfigAutoData] - public async void GetByOrganizationIdAsync_Works_DataMatches(SsoConfig ssoConfig, Organization org, + public async Task GetByOrganizationIdAsync_Works_DataMatches(SsoConfig ssoConfig, Organization org, SsoConfigCompare equalityComparer, List suts, List efOrgRepos, SqlAuthRepo.SsoConfigRepository sqlSsoConfigRepo, SqlRepo.OrganizationRepository sqlOrgRepo) @@ -168,7 +168,7 @@ public class SsoConfigRepositoryTests } [CiSkippedTheory, EfSsoConfigAutoData] - public async void GetByIdentifierAsync_Works_DataMatches(SsoConfig ssoConfig, Organization org, + public async Task GetByIdentifierAsync_Works_DataMatches(SsoConfig ssoConfig, Organization org, SsoConfigCompare equalityComparer, List suts, List efOrgRepos, SqlAuthRepo.SsoConfigRepository sqlSsoConfigRepo, SqlRepo.OrganizationRepository sqlOrgRepo) @@ -206,7 +206,7 @@ public class SsoConfigRepositoryTests // Testing that data matches here would involve manipulating all SsoConfig records in the db [CiSkippedTheory, EfSsoConfigAutoData] - public async void GetManyByRevisionNotBeforeDate_Works(SsoConfig ssoConfig, DateTime notBeforeDate, + public async Task GetManyByRevisionNotBeforeDate_Works(SsoConfig ssoConfig, DateTime notBeforeDate, Organization org, List suts, List efOrgRepos) { diff --git a/test/Infrastructure.EFIntegration.Test/Auth/Repositories/SsoUserRepositoryTests.cs b/test/Infrastructure.EFIntegration.Test/Auth/Repositories/SsoUserRepositoryTests.cs index b8d00d074..f5841e937 100644 --- a/test/Infrastructure.EFIntegration.Test/Auth/Repositories/SsoUserRepositoryTests.cs +++ b/test/Infrastructure.EFIntegration.Test/Auth/Repositories/SsoUserRepositoryTests.cs @@ -14,7 +14,7 @@ namespace Bit.Infrastructure.EFIntegration.Test.Auth.Repositories; public class SsoUserRepositoryTests { [CiSkippedTheory, EfSsoUserAutoData] - public async void CreateAsync_Works_DataMatches(SsoUser ssoUser, User user, Organization org, + public async Task CreateAsync_Works_DataMatches(SsoUser ssoUser, User user, Organization org, SsoUserCompare equalityComparer, List suts, List efOrgRepos, List efUserRepos, SqlAuthRepo.SsoUserRepository sqlSsoUserRepo, SqlRepo.OrganizationRepository sqlOrgRepo, @@ -52,7 +52,7 @@ public class SsoUserRepositoryTests } [CiSkippedTheory, EfSsoUserAutoData] - public async void ReplaceAsync_Works_DataMatches(SsoUser postSsoUser, SsoUser replaceSsoUser, + public async Task ReplaceAsync_Works_DataMatches(SsoUser postSsoUser, SsoUser replaceSsoUser, Organization org, User user, SsoUserCompare equalityComparer, List suts, List efUserRepos, List efOrgRepos, SqlAuthRepo.SsoUserRepository sqlSsoUserRepo, @@ -101,7 +101,7 @@ public class SsoUserRepositoryTests } [CiSkippedTheory, EfSsoUserAutoData] - public async void DeleteAsync_Works_DataMatches(SsoUser ssoUser, Organization org, User user, List suts, + public async Task DeleteAsync_Works_DataMatches(SsoUser ssoUser, Organization org, User user, List suts, List efUserRepos, List efOrgRepos, SqlAuthRepo.SsoUserRepository sqlSsoUserRepo, SqlRepo.UserRepository sqlUserRepo, SqlRepo.OrganizationRepository sqlOrganizationRepo) @@ -143,7 +143,7 @@ public class SsoUserRepositoryTests } [CiSkippedTheory, EfSsoUserAutoData] - public async void DeleteAsync_UserIdOrganizationId_Works_DataMatches(SsoUser ssoUser, + public async Task DeleteAsync_UserIdOrganizationId_Works_DataMatches(SsoUser ssoUser, User user, Organization org, List suts, List efUserRepos, List efOrgRepos, SqlAuthRepo.SsoUserRepository sqlSsoUserRepo, SqlRepo.UserRepository sqlUserRepo, SqlRepo.OrganizationRepository sqlOrgRepo diff --git a/test/Infrastructure.EFIntegration.Test/Repositories/CollectionRepository.cs b/test/Infrastructure.EFIntegration.Test/Repositories/CollectionRepository.cs index f8eee19f2..2148cb5b5 100644 --- a/test/Infrastructure.EFIntegration.Test/Repositories/CollectionRepository.cs +++ b/test/Infrastructure.EFIntegration.Test/Repositories/CollectionRepository.cs @@ -14,7 +14,7 @@ namespace Bit.Infrastructure.EFIntegration.Test.Repositories; public class CollectionRepositoryTests { [CiSkippedTheory, BitAutoData] - public async void CreateAsync_Works_DataMatches( + public async Task CreateAsync_Works_DataMatches( Collection collection, Organization organization, CollectionCompare equalityComparer, diff --git a/test/Infrastructure.EFIntegration.Test/Repositories/DeviceRepositoryTests.cs b/test/Infrastructure.EFIntegration.Test/Repositories/DeviceRepositoryTests.cs index fc1f5c8b3..078fed046 100644 --- a/test/Infrastructure.EFIntegration.Test/Repositories/DeviceRepositoryTests.cs +++ b/test/Infrastructure.EFIntegration.Test/Repositories/DeviceRepositoryTests.cs @@ -11,7 +11,7 @@ namespace Bit.Infrastructure.EFIntegration.Test.Repositories; public class DeviceRepositoryTests { [CiSkippedTheory, EfDeviceAutoData] - public async void CreateAsync_Works_DataMatches(Device device, User user, + public async Task CreateAsync_Works_DataMatches(Device device, User user, DeviceCompare equalityComparer, List suts, List efUserRepos, SqlRepo.DeviceRepository sqlDeviceRepo, SqlRepo.UserRepository sqlUserRepo) diff --git a/test/Infrastructure.EFIntegration.Test/Repositories/InstallationRepositoryTests.cs b/test/Infrastructure.EFIntegration.Test/Repositories/InstallationRepositoryTests.cs index 9827b0c03..3e4f7eb5d 100644 --- a/test/Infrastructure.EFIntegration.Test/Repositories/InstallationRepositoryTests.cs +++ b/test/Infrastructure.EFIntegration.Test/Repositories/InstallationRepositoryTests.cs @@ -11,7 +11,7 @@ namespace Bit.Infrastructure.EFIntegration.Test.Repositories; public class InstallationRepositoryTests { [CiSkippedTheory, EfInstallationAutoData] - public async void CreateAsync_Works_DataMatches( + public async Task CreateAsync_Works_DataMatches( Installation installation, InstallationCompare equalityComparer, List suts, diff --git a/test/Infrastructure.EFIntegration.Test/Repositories/OrganizationSponsorshipRepositoryTests.cs b/test/Infrastructure.EFIntegration.Test/Repositories/OrganizationSponsorshipRepositoryTests.cs index b7179ec5a..56d5b3f08 100644 --- a/test/Infrastructure.EFIntegration.Test/Repositories/OrganizationSponsorshipRepositoryTests.cs +++ b/test/Infrastructure.EFIntegration.Test/Repositories/OrganizationSponsorshipRepositoryTests.cs @@ -12,7 +12,7 @@ namespace Bit.Infrastructure.EFIntegration.Test.Repositories; public class OrganizationSponsorshipRepositoryTests { [CiSkippedTheory, EfOrganizationSponsorshipAutoData] - public async void CreateAsync_Works_DataMatches( + public async Task CreateAsync_Works_DataMatches( OrganizationSponsorship organizationSponsorship, Organization sponsoringOrg, List efOrgRepos, SqlRepo.OrganizationRepository sqlOrganizationRepo, @@ -47,7 +47,7 @@ public class OrganizationSponsorshipRepositoryTests } [CiSkippedTheory, EfOrganizationSponsorshipAutoData] - public async void ReplaceAsync_Works_DataMatches(OrganizationSponsorship postOrganizationSponsorship, + public async Task ReplaceAsync_Works_DataMatches(OrganizationSponsorship postOrganizationSponsorship, OrganizationSponsorship replaceOrganizationSponsorship, Organization sponsoringOrg, List efOrgRepos, SqlRepo.OrganizationRepository sqlOrganizationRepo, @@ -89,7 +89,7 @@ public class OrganizationSponsorshipRepositoryTests } [CiSkippedTheory, EfOrganizationSponsorshipAutoData] - public async void DeleteAsync_Works_DataMatches(OrganizationSponsorship organizationSponsorship, + public async Task DeleteAsync_Works_DataMatches(OrganizationSponsorship organizationSponsorship, Organization sponsoringOrg, List efOrgRepos, SqlRepo.OrganizationRepository sqlOrganizationRepo, diff --git a/test/Infrastructure.EFIntegration.Test/Repositories/TaxRateRepositoryTests.cs b/test/Infrastructure.EFIntegration.Test/Repositories/TaxRateRepositoryTests.cs index 8892f6c70..e2c6d03b4 100644 --- a/test/Infrastructure.EFIntegration.Test/Repositories/TaxRateRepositoryTests.cs +++ b/test/Infrastructure.EFIntegration.Test/Repositories/TaxRateRepositoryTests.cs @@ -11,7 +11,7 @@ namespace Bit.Infrastructure.EFIntegration.Test.Repositories; public class TaxRateRepositoryTests { [CiSkippedTheory, EfTaxRateAutoData] - public async void CreateAsync_Works_DataMatches( + public async Task CreateAsync_Works_DataMatches( TaxRate taxRate, TaxRateCompare equalityComparer, List suts, diff --git a/test/Infrastructure.EFIntegration.Test/Repositories/TransactionRepositoryTests.cs b/test/Infrastructure.EFIntegration.Test/Repositories/TransactionRepositoryTests.cs index e43ff98cb..6a6957c4b 100644 --- a/test/Infrastructure.EFIntegration.Test/Repositories/TransactionRepositoryTests.cs +++ b/test/Infrastructure.EFIntegration.Test/Repositories/TransactionRepositoryTests.cs @@ -13,7 +13,7 @@ public class TransactionRepositoryTests { [CiSkippedTheory, EfUserTransactionAutoData, EfOrganizationTransactionAutoData] - public async void CreateAsync_Works_DataMatches( + public async Task CreateAsync_Works_DataMatches( Transaction transaction, User user, Organization org, diff --git a/test/Infrastructure.EFIntegration.Test/Repositories/UserRepositoryTests.cs b/test/Infrastructure.EFIntegration.Test/Repositories/UserRepositoryTests.cs index a7d97d1c7..066a550fa 100644 --- a/test/Infrastructure.EFIntegration.Test/Repositories/UserRepositoryTests.cs +++ b/test/Infrastructure.EFIntegration.Test/Repositories/UserRepositoryTests.cs @@ -15,7 +15,7 @@ namespace Bit.Infrastructure.EFIntegration.Test.Repositories; public class UserRepositoryTests { [CiSkippedTheory, EfUserAutoData] - public async void CreateAsync_Works_DataMatches( + public async Task CreateAsync_Works_DataMatches( User user, UserCompare equalityComparer, List suts, SqlRepo.UserRepository sqlUserRepo @@ -41,7 +41,7 @@ public class UserRepositoryTests } [CiSkippedTheory, EfUserAutoData] - public async void ReplaceAsync_Works_DataMatches(User postUser, User replaceUser, + public async Task ReplaceAsync_Works_DataMatches(User postUser, User replaceUser, UserCompare equalityComparer, List suts, SqlRepo.UserRepository sqlUserRepo) { @@ -65,7 +65,7 @@ public class UserRepositoryTests } [CiSkippedTheory, EfUserAutoData] - public async void DeleteAsync_Works_DataMatches(User user, List suts, SqlRepo.UserRepository sqlUserRepo) + public async Task DeleteAsync_Works_DataMatches(User user, List suts, SqlRepo.UserRepository sqlUserRepo) { foreach (var sut in suts) { @@ -93,7 +93,7 @@ public class UserRepositoryTests } [CiSkippedTheory, EfUserAutoData] - public async void GetByEmailAsync_Works_DataMatches(User user, UserCompare equalityComparer, + public async Task GetByEmailAsync_Works_DataMatches(User user, UserCompare equalityComparer, List suts, SqlRepo.UserRepository sqlUserRepo) { var savedUsers = new List(); @@ -113,7 +113,7 @@ public class UserRepositoryTests } [CiSkippedTheory, EfUserAutoData] - public async void GetKdfInformationByEmailAsync_Works_DataMatches(User user, + public async Task GetKdfInformationByEmailAsync_Works_DataMatches(User user, UserKdfInformationCompare equalityComparer, List suts, SqlRepo.UserRepository sqlUserRepo) { @@ -135,7 +135,7 @@ public class UserRepositoryTests } [CiSkippedTheory, EfUserAutoData] - public async void SearchAsync_Works_DataMatches(User user, int skip, int take, + public async Task SearchAsync_Works_DataMatches(User user, int skip, int take, UserCompare equalityCompare, List suts, SqlRepo.UserRepository sqlUserRepo) { @@ -157,7 +157,7 @@ public class UserRepositoryTests } [CiSkippedTheory, EfUserAutoData] - public async void GetManyByPremiumAsync_Works_DataMatches(User user, + public async Task GetManyByPremiumAsync_Works_DataMatches(User user, List suts, SqlRepo.UserRepository sqlUserRepo) { var returnedUsers = new List(); @@ -178,7 +178,7 @@ public class UserRepositoryTests } [CiSkippedTheory, EfUserAutoData] - public async void GetPublicKeyAsync_Works_DataMatches(User user, List suts, + public async Task GetPublicKeyAsync_Works_DataMatches(User user, List suts, SqlRepo.UserRepository sqlUserRepo) { var returnedKeys = new List(); @@ -199,7 +199,7 @@ public class UserRepositoryTests } [CiSkippedTheory, EfUserAutoData] - public async void GetAccountRevisionDateAsync(User user, List suts, + public async Task GetAccountRevisionDateAsync(User user, List suts, SqlRepo.UserRepository sqlUserRepo) { var returnedKeys = new List(); @@ -220,7 +220,7 @@ public class UserRepositoryTests } [CiSkippedTheory, EfUserAutoData] - public async void UpdateRenewalReminderDateAsync_Works_DataMatches(User user, + public async Task UpdateRenewalReminderDateAsync_Works_DataMatches(User user, DateTime updatedReminderDate, List suts, SqlRepo.UserRepository sqlUserRepo) { @@ -249,7 +249,7 @@ public class UserRepositoryTests } [CiSkippedTheory, EfUserAutoData] - public async void GetBySsoUserAsync_Works_DataMatches(User user, Organization org, + public async Task GetBySsoUserAsync_Works_DataMatches(User user, Organization org, SsoUser ssoUser, UserCompare equalityComparer, List suts, List ssoUserRepos, List orgRepos, SqlRepo.UserRepository sqlUserRepo, SqlAuthRepo.SsoUserRepository sqlSsoUserRepo, diff --git a/test/Infrastructure.EFIntegration.Test/Tools/Repositories/SendRepositoryTests.cs b/test/Infrastructure.EFIntegration.Test/Tools/Repositories/SendRepositoryTests.cs index a14892b9b..ae03d639f 100644 --- a/test/Infrastructure.EFIntegration.Test/Tools/Repositories/SendRepositoryTests.cs +++ b/test/Infrastructure.EFIntegration.Test/Tools/Repositories/SendRepositoryTests.cs @@ -15,7 +15,7 @@ namespace Bit.Infrastructure.EFIntegration.Test.Tools.Repositories; public class SendRepositoryTests { [CiSkippedTheory, EfUserSendAutoData, EfOrganizationSendAutoData] - public async void CreateAsync_Works_DataMatches( + public async Task CreateAsync_Works_DataMatches( Send send, User user, Organization org, diff --git a/test/Infrastructure.EFIntegration.Test/Vault/Repositories/CipherRepositoryTests.cs b/test/Infrastructure.EFIntegration.Test/Vault/Repositories/CipherRepositoryTests.cs index 2197df1cd..3618d5dd0 100644 --- a/test/Infrastructure.EFIntegration.Test/Vault/Repositories/CipherRepositoryTests.cs +++ b/test/Infrastructure.EFIntegration.Test/Vault/Repositories/CipherRepositoryTests.cs @@ -19,7 +19,7 @@ namespace Bit.Infrastructure.EFIntegration.Test.Repositories; public class CipherRepositoryTests { [Theory(Skip = "Run ad-hoc"), EfUserCipherCustomize, BitAutoData] - public async void RefreshDb(List suts) + public async Task RefreshDb(List suts) { foreach (var sut in suts) { @@ -87,7 +87,7 @@ public class CipherRepositoryTests } [CiSkippedTheory, EfUserCipherCustomize, BitAutoData] - public async void CreateAsync_BumpsUserAccountRevisionDate(Cipher cipher, User user, List suts, List efUserRepos) + public async Task CreateAsync_BumpsUserAccountRevisionDate(Cipher cipher, User user, List suts, List efUserRepos) { var bumpedUsers = new List(); foreach (var sut in suts) @@ -110,7 +110,7 @@ public class CipherRepositoryTests } [CiSkippedTheory, EfOrganizationCipherCustomize, BitAutoData] - public async void CreateAsync_BumpsOrgUserAccountRevisionDates(Cipher cipher, List users, + public async Task CreateAsync_BumpsOrgUserAccountRevisionDates(Cipher cipher, List users, List orgUsers, Collection collection, Organization org, List suts, List efUserRepos, List efOrgRepos, List efOrgUserRepos, List efCollectionRepos) { diff --git a/test/Infrastructure.EFIntegration.Test/Vault/Repositories/FolderRepositoryTests.cs b/test/Infrastructure.EFIntegration.Test/Vault/Repositories/FolderRepositoryTests.cs index 7cbae311a..b6ea98de9 100644 --- a/test/Infrastructure.EFIntegration.Test/Vault/Repositories/FolderRepositoryTests.cs +++ b/test/Infrastructure.EFIntegration.Test/Vault/Repositories/FolderRepositoryTests.cs @@ -14,7 +14,7 @@ namespace Bit.Infrastructure.EFIntegration.Test.Repositories; public class FolderRepositoryTests { [CiSkippedTheory, EfFolderAutoData] - public async void CreateAsync_Works_DataMatches( + public async Task CreateAsync_Works_DataMatches( Folder folder, User user, FolderCompare equalityComparer,