diff --git a/src/IoTHub.Portal.Tests.Unit/Client/Dialogs/EdgeModels/AwsGreengrassComponentDialogTests.cs b/src/IoTHub.Portal.Tests.Unit/Client/Dialogs/EdgeModels/AwsGreengrassComponentDialogTests.cs index 3acf6dfc6..c82f21fcf 100644 --- a/src/IoTHub.Portal.Tests.Unit/Client/Dialogs/EdgeModels/AwsGreengrassComponentDialogTests.cs +++ b/src/IoTHub.Portal.Tests.Unit/Client/Dialogs/EdgeModels/AwsGreengrassComponentDialogTests.cs @@ -40,7 +40,7 @@ public async Task AwsGreengrassComponentDialog_ClickOnCancel_DialogCanceled() }; IDialogReference dialogReference = null; - await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); // Act cut.Find("#greengrass-component-cancel").Click(); @@ -76,7 +76,7 @@ public async Task AwsGreengrassComponentDialog_CreateAWSComponentAndSubmit_EdgeM }; IDialogReference dialogReference = null; - await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); // Act cut.WaitForElement("#greengrass-component-recipe-json").Change(inputJsonRecipe); @@ -128,7 +128,7 @@ public async Task AwsGreengrassComponentDialog_EditAWSComponentAndSubmit_EdgeMod }; IDialogReference dialogReference = null; - await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); // Act cut.WaitForElement("#greengrass-component-recipe-json").Change(newJsonRecipe); diff --git a/src/IoTHub.Portal.Tests.Unit/Client/Dialogs/EdgeModels/AwsGreengrassPublicComponentsDialogTests.cs b/src/IoTHub.Portal.Tests.Unit/Client/Dialogs/EdgeModels/AwsGreengrassPublicComponentsDialogTests.cs index a14ca7cf3..f385122ed 100644 --- a/src/IoTHub.Portal.Tests.Unit/Client/Dialogs/EdgeModels/AwsGreengrassPublicComponentsDialogTests.cs +++ b/src/IoTHub.Portal.Tests.Unit/Client/Dialogs/EdgeModels/AwsGreengrassPublicComponentsDialogTests.cs @@ -51,7 +51,7 @@ public async Task AwsGreengrassPublicComponentsDialog_AfterOnInitializedAsync_Pu }; // Act - await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); cut.WaitForAssertion(() => cut.FindAll("table tbody tr").Count.Should().Be(10)); // Assert @@ -77,7 +77,7 @@ public async Task AwsGreengrassPublicComponentsDialog_ClickOnCancel_DialogCancel }; IDialogReference dialogReference = null; - await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); cut.WaitForAssertion(() => cut.FindAll("table tbody tr").Count.Should().Be(10)); // Act @@ -110,7 +110,7 @@ public async Task AwsGreengrassPublicComponentsDialog_ClickOnSubmitWithoutSelect }; IDialogReference dialogReference = null; - await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); cut.WaitForAssertion(() => cut.FindAll("table tbody tr").Count.Should().Be(10)); // Act @@ -143,7 +143,7 @@ public async Task AwsGreengrassPublicComponentsDialog_ClickOnSubmitAfterSelectin }; IDialogReference dialogReference = null; - await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); cut.WaitForAssertion(() => cut.FindAll("table tbody tr").Count.Should().Be(10)); // Act diff --git a/src/IoTHub.Portal.Tests.Unit/Client/Pages/Configurations/EdgeModule/ModuleDialogTests.cs b/src/IoTHub.Portal.Tests.Unit/Client/Pages/Configurations/EdgeModule/ModuleDialogTests.cs index e311c9f39..f58df5195 100644 --- a/src/IoTHub.Portal.Tests.Unit/Client/Pages/Configurations/EdgeModule/ModuleDialogTests.cs +++ b/src/IoTHub.Portal.Tests.Unit/Client/Pages/Configurations/EdgeModule/ModuleDialogTests.cs @@ -50,7 +50,7 @@ public async Task ModuleDialogTestMustBeRenderedOnShow() }; // Act - await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); cut.WaitForAssertion(() => cut.Find("div.mud-dialog-container").Should().NotBeNull()); cut.WaitForAssertion(() => cut.Find($"#{nameof(IoTEdgeModule.ModuleName)}").OuterHtml.Should().Contain(moduleName)); @@ -94,7 +94,7 @@ public async Task ClickOnSubmitShouldUpdateModuleValues() }; // Act - await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); cut.WaitForAssertion(() => cut.Find("div.mud-dialog-container").Should().NotBeNull()); @@ -138,7 +138,7 @@ public async Task ForAWSModuleDialogTestMustBeRenderedOnShow() }; // Act - await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); cut.WaitForAssertion(() => cut.Find("div.mud-dialog-container").Should().NotBeNull()); cut.WaitForAssertion(() => cut.Find($"#{nameof(IoTEdgeModule.ModuleName)}").OuterHtml.Should().Contain(moduleName)); @@ -179,7 +179,7 @@ public async Task ForAWSClickOnSubmitShouldUpdateModuleValues() }; // Act - await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); cut.WaitForAssertion(() => cut.Find("div.mud-dialog-container").Should().NotBeNull()); diff --git a/src/IoTHub.Portal.Tests.Unit/Client/Pages/DeviceConfigurations/DeleteDeviceConfigurationTests.cs b/src/IoTHub.Portal.Tests.Unit/Client/Pages/DeviceConfigurations/DeleteDeviceConfigurationTests.cs index 887c080a7..63385d70c 100644 --- a/src/IoTHub.Portal.Tests.Unit/Client/Pages/DeviceConfigurations/DeleteDeviceConfigurationTests.cs +++ b/src/IoTHub.Portal.Tests.Unit/Client/Pages/DeviceConfigurations/DeleteDeviceConfigurationTests.cs @@ -66,7 +66,7 @@ public async Task DeleteDeviceConfigurationShouldDeleteConfiguration() IDialogReference dialogReference = null; - await cut.InvokeAsync(() => dialogReference = this.dialogService?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = this.dialogService?.Show(string.Empty, parameters)); cut.WaitForAssertion(() => cut.Find("#delete-device-configuration")); // Act @@ -101,7 +101,7 @@ public async Task DeleteConcentratorPageShouldProcessProblemDetailsExceptionWhen } }; - await cut.InvokeAsync(() => this.dialogService?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => this.dialogService?.Show(string.Empty, parameters)); cut.WaitForAssertion(() => cut.Find("#delete-device-configuration")); // Act diff --git a/src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/ConnectionStringDialogTests.cs b/src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/ConnectionStringDialogTests.cs index 89f0b38df..f7f8e4a97 100644 --- a/src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/ConnectionStringDialogTests.cs +++ b/src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/ConnectionStringDialogTests.cs @@ -53,7 +53,7 @@ public async Task ConnectionStringDialogMustBeRenderedOnShow() }; // Act - await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); // Assert cut.WaitForAssertion(() => cut.Find("div.mud-dialog-container").Should().NotBeNull()); @@ -82,7 +82,7 @@ public async Task OnInitializedAsyncShouldProcessProblemDetailsExceptionWhenIssu IDialogReference dialogReference = null; // Act - await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); var result = await dialogReference.Result; diff --git a/src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/DeleteDevicePageTests.cs b/src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/DeleteDevicePageTests.cs index ea3bd65e8..8252cb752 100644 --- a/src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/DeleteDevicePageTests.cs +++ b/src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/DeleteDevicePageTests.cs @@ -55,7 +55,7 @@ public async Task DeleteDevice_NonLoRaDevice_DeviceDeleted() }; // Act - await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); cut.WaitForElement("#delete-device").Click(); // Assert @@ -81,7 +81,7 @@ public async Task DeleteDevice_LoRaDevice_LoRaDeviceDeleted() }; // Act - await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); cut.WaitForElement("#delete-device").Click(); // Assert diff --git a/src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/ImportReportDialogTests.cs b/src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/ImportReportDialogTests.cs index 12cfbb7a6..2463ecc2f 100644 --- a/src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/ImportReportDialogTests.cs +++ b/src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/ImportReportDialogTests.cs @@ -61,7 +61,7 @@ public async Task ImportShouldDisplayLoadingDuringProcess() }; // Act - await cut.InvokeAsync(() => this.dialogService?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => this.dialogService?.Show(string.Empty, parameters)); // Assert cut.WaitForState(() => cut.HasComponent()); @@ -88,7 +88,7 @@ public async Task WhenNoErrorsDuringImportShouldDisplaySuccessMessage() }; // Act - await cut.InvokeAsync(() => this.dialogService?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => this.dialogService?.Show(string.Empty, parameters)); cut.WaitForState(() => !cut.HasComponent()); // Assert @@ -120,7 +120,7 @@ public async Task WhenExceptionOccuresShouldCloseThePopup() // Act IDialogReference dialogReference = null; - await cut.InvokeAsync(() => dialogReference = this.dialogService?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = this.dialogService?.Show(string.Empty, parameters)); // Assert _ = dialogReference.Should().NotBeNull(); @@ -166,7 +166,7 @@ public async Task WhenErrorsDuringImportShouldDisplayErrorMessages() }; // Act - await cut.InvokeAsync(() => this.dialogService?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => this.dialogService?.Show(string.Empty, parameters)); cut.WaitForState(() => !cut.HasComponent()); // Assert @@ -213,7 +213,7 @@ public async Task ClickOnCloseShouldCloseTheDialog() IDialogReference dialogReference = null; - await cut.InvokeAsync(() => dialogReference = this.dialogService?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = this.dialogService?.Show(string.Empty, parameters)); _ = dialogReference.Result.Should().NotBeNull() .And.BeOfType>() diff --git a/src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/LoRaDeviceTelemetryDialogTests.cs b/src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/LoRaDeviceTelemetryDialogTests.cs index 1171f5dc2..6b2298a3f 100644 --- a/src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/LoRaDeviceTelemetryDialogTests.cs +++ b/src/IoTHub.Portal.Tests.Unit/Client/Pages/Devices/LoRaDeviceTelemetryDialogTests.cs @@ -55,7 +55,7 @@ public async Task Show_TelemetryLoaded_CanvasIsRendered() }; // Act - await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); _ = cut.WaitForElement("canvas"); // Assert @@ -84,7 +84,7 @@ public async Task Show_CancelDialog_DialogIsCancelled() IDialogReference dialogReference = null; // Act - await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); _ = cut.WaitForElement("canvas"); var deleteBtn = cut.Find("#cancel-telemetry-dialog"); deleteBtn.Click(); diff --git a/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeDevices/ConnectionStringDialogTests.cs b/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeDevices/ConnectionStringDialogTests.cs index a152e66b5..4a092a19c 100644 --- a/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeDevices/ConnectionStringDialogTests.cs +++ b/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeDevices/ConnectionStringDialogTests.cs @@ -60,7 +60,7 @@ public async Task ConnectionStringDialogMustShowEnrollmentCredentials() }; // Act - await cut.InvokeAsync(() => this.dialogService?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => this.dialogService?.Show(string.Empty, parameters)); _ = cut.WaitForElement("div.mud-paper"); // Assert @@ -89,7 +89,7 @@ public async Task ConnectionStringDialogMustBeCancelledWhenProblemDetailsOccurs( IDialogReference dialogReference = null; // Act - await cut.InvokeAsync(() => dialogReference = this.dialogService?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = this.dialogService?.Show(string.Empty, parameters)); var result = await dialogReference.Result; // Assert @@ -118,7 +118,7 @@ public async Task ConnectionStringDialogMustBeClosedOnClickOnOk() IDialogReference dialogReference = null; // Act - await cut.InvokeAsync(() => dialogReference = this.dialogService?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = this.dialogService?.Show(string.Empty, parameters)); cut.WaitForElement("#ok").Click(); var result = await dialogReference.Result; diff --git a/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeDevices/EdgeDeviceDeleteConfirmationDialogTests.cs b/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeDevices/EdgeDeviceDeleteConfirmationDialogTests.cs index 73e82e592..443dda3bf 100644 --- a/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeDevices/EdgeDeviceDeleteConfirmationDialogTests.cs +++ b/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeDevices/EdgeDeviceDeleteConfirmationDialogTests.cs @@ -57,7 +57,7 @@ public async Task EdgeDeviceDeleteConfirmationDialogMustDeleteDevice() IDialogReference dialogReference = null; // Act - await cut.InvokeAsync(() => dialogReference = this.dialogService?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = this.dialogService?.Show(string.Empty, parameters)); cut.Find("#delete").Click(); var result = await dialogReference.GetReturnValueAsync(); @@ -85,7 +85,7 @@ public async Task EdgeDeviceDeleteConfirmationDialogShouldProcessProblemDetailsE }; // Act - await cut.InvokeAsync(() => this.dialogService?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => this.dialogService?.Show(string.Empty, parameters)); cut.Find("#delete").Click(); // Assert @@ -111,7 +111,7 @@ public async Task EdgeDeviceDeleteConfirmationDialogMustBeCanceledOnClickOnCance IDialogReference dialogReference = null; // Act - await cut.InvokeAsync(() => dialogReference = this.dialogService?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = this.dialogService?.Show(string.Empty, parameters)); cut.Find("#cancel").Click(); var result = await dialogReference.Result; diff --git a/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeDevices/ModuleLogsDialogTests.cs b/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeDevices/ModuleLogsDialogTests.cs index e7a1ad777..229918995 100644 --- a/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeDevices/ModuleLogsDialogTests.cs +++ b/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeDevices/ModuleLogsDialogTests.cs @@ -68,7 +68,7 @@ public async Task ModuleLogsDialogParametersMustBeCorrect() }; // Act - await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); // Assert _ = cut.FindAll("tr").Count.Should().Be(4); @@ -103,7 +103,7 @@ public async Task ModuleLogsShouldProcessProblemDetailsExceptionWhenIssueOccursO }; // Act - await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); // Assert _ = cut.FindAll("tr").Count.Should().Be(2); @@ -145,7 +145,7 @@ public async Task ModuleLogsMustCloseOnCLickOnCloseButton() IDialogReference dialogReference = null; // Act - await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); cut.Find("#close").Click(); var result = await dialogReference.Result; diff --git a/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeModels/DeleteEdgeModelDialogTest.cs b/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeModels/DeleteEdgeModelDialogTest.cs index a0826a51b..8ab75b779 100644 --- a/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeModels/DeleteEdgeModelDialogTest.cs +++ b/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeModels/DeleteEdgeModelDialogTest.cs @@ -64,7 +64,7 @@ public async Task ClickOnDeleteButtonShouldCloseDialog() IDialogReference dialogReference = null; // Act - await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); var deleteBtn = cut.Find("#deleteButton"); deleteBtn.Click(); @@ -103,7 +103,7 @@ public async Task ClickOnDeleteButtonShouldProssessProblemDetailsException() IDialogReference dialogReference = null; // Act - await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); var deleteBtn = cut.Find("#deleteButton"); deleteBtn.Click(); @@ -135,7 +135,7 @@ public async Task ClickOnCancelButtonShouldCloseDialog() IDialogReference dialogReference = null; // Act - await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); var deleteBtn = cut.Find("#cancelButton"); deleteBtn.Click(); diff --git a/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeModels/SystemModuleDialogTest.cs b/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeModels/SystemModuleDialogTest.cs index 3fbb73045..545e37450 100644 --- a/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeModels/SystemModuleDialogTest.cs +++ b/src/IoTHub.Portal.Tests.Unit/Client/Pages/EdgeModels/SystemModuleDialogTest.cs @@ -54,7 +54,7 @@ public async Task SystemModuleDialogMustCloseOnCLickOnCloseButton() IDialogReference dialogReference = null; // Act - await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = service?.Show(string.Empty, parameters)); cut.Find("#SubmitButton").Click(); var result = await dialogReference.Result; diff --git a/src/IoTHub.Portal.Tests.Unit/Client/Pages/Ideas/SubmitIdeaDialogTests.cs b/src/IoTHub.Portal.Tests.Unit/Client/Pages/Ideas/SubmitIdeaDialogTests.cs index 9110277b6..b9e7d6d57 100644 --- a/src/IoTHub.Portal.Tests.Unit/Client/Pages/Ideas/SubmitIdeaDialogTests.cs +++ b/src/IoTHub.Portal.Tests.Unit/Client/Pages/Ideas/SubmitIdeaDialogTests.cs @@ -42,7 +42,7 @@ public async Task SubmitIdeaDialogMustBeRenderedOnShow() var dialogService = Services.GetService() as DialogService; // Act - await cut.InvokeAsync(() => dialogService?.Show(string.Empty)); + _ = await cut.InvokeAsync(() => dialogService?.Show(string.Empty)); // Assert cut.WaitForAssertion(() => cut.Find("#idea-form").Should().NotBeNull()); @@ -63,7 +63,7 @@ public async Task SubmitIdeaDialogMustBeCancelledOnClickOnCancel() IDialogReference dialogReference = null; // Act - await cut.InvokeAsync(() => dialogReference = dialogService?.Show(string.Empty)); + _ = await cut.InvokeAsync(() => dialogReference = dialogService?.Show(string.Empty)); cut.Find("#idea-cancel").Click(); var result = await dialogReference.Result; @@ -80,7 +80,7 @@ public async Task SubmitButtonMustBeDisabledWhenFormIsNotValid() var dialogService = Services.GetService() as DialogService; // Act - await cut.InvokeAsync(() => dialogService?.Show(string.Empty)); + _ = await cut.InvokeAsync(() => dialogService?.Show(string.Empty)); var submitButton = cut.FindComponents().First(component => component.Instance.FieldId.Equals("idea-submit", StringComparison.Ordinal)); // Assert @@ -96,7 +96,7 @@ public async Task SubmitButtonMustNotBeDisabledWhenFormIsValid() var cut = RenderComponent(); var dialogService = Services.GetService() as DialogService; - await cut.InvokeAsync(() => dialogService?.Show(string.Empty)); + _ = await cut.InvokeAsync(() => dialogService?.Show(string.Empty)); var titleField = cut.FindComponents>() .First(component => component.Instance.FieldId.Equals("idea-title", StringComparison.Ordinal)); @@ -130,7 +130,7 @@ public async Task IdeaShouldBeSubmittedOnClickOnSubmit() var cut = RenderComponent(); var dialogService = Services.GetService() as DialogService; - await cut.InvokeAsync(() => dialogService?.Show(string.Empty)); + _ = await cut.InvokeAsync(() => dialogService?.Show(string.Empty)); var titleField = cut.FindComponents>() .First(component => component.Instance.FieldId.Equals("idea-title", StringComparison.Ordinal)); @@ -163,7 +163,7 @@ public async Task ClickOnSubmitShouldProcessProblemDetailsException() var cut = RenderComponent(); var dialogService = Services.GetService() as DialogService; - await cut.InvokeAsync(() => dialogService?.Show(string.Empty)); + _ = await cut.InvokeAsync(() => dialogService?.Show(string.Empty)); var titleField = cut.FindComponents>() .First(component => component.Instance.FieldId.Equals("idea-title", StringComparison.Ordinal)); @@ -197,7 +197,7 @@ public async Task SetConsentToCollectTechnicalDetailsByDefault() var cut = RenderComponent(); var dialogService = Services.GetService() as DialogService; - await cut.InvokeAsync(() => dialogService?.Show(string.Empty)); + _ = await cut.InvokeAsync(() => dialogService?.Show(string.Empty)); var titleField = cut.FindComponents>() .First(component => component.Instance.FieldId.Equals("idea-title", StringComparison.Ordinal)); diff --git a/src/IoTHub.Portal.Tests.Unit/Client/Pages/LoRaWan/Concentrator/DeleteConcentratorPageTests.cs b/src/IoTHub.Portal.Tests.Unit/Client/Pages/LoRaWan/Concentrator/DeleteConcentratorPageTests.cs index 514e84366..9efd4e431 100644 --- a/src/IoTHub.Portal.Tests.Unit/Client/Pages/LoRaWan/Concentrator/DeleteConcentratorPageTests.cs +++ b/src/IoTHub.Portal.Tests.Unit/Client/Pages/LoRaWan/Concentrator/DeleteConcentratorPageTests.cs @@ -62,7 +62,7 @@ public async Task DeleteConcentratorPageShouldDeleteConcentrator() IDialogReference dialogReference = null; - await cut.InvokeAsync(() => dialogReference = this.dialogService?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = this.dialogService?.Show(string.Empty, parameters)); cut.WaitForAssertion(() => cut.Find("#delete-concentrator")); // Act @@ -93,7 +93,7 @@ public async Task DeleteConcentratorPageShouldProcessProblemDetailsExceptionWhen } }; - await cut.InvokeAsync(() => this.dialogService?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => this.dialogService?.Show(string.Empty, parameters)); cut.WaitForAssertion(() => cut.Find("#delete-concentrator")); // Act @@ -120,7 +120,7 @@ public async Task OnClickOnCancelShouldCancelDialog() IDialogReference dialogReference = null; - await cut.InvokeAsync(() => dialogReference = this.dialogService?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => dialogReference = this.dialogService?.Show(string.Empty, parameters)); cut.WaitForAssertion(() => cut.Find("#cancel-delete-concentrator")); // Act diff --git a/src/IoTHub.Portal.Tests.Unit/Client/Pages/Shared/ProblemDetailsDialogTests.cs b/src/IoTHub.Portal.Tests.Unit/Client/Pages/Shared/ProblemDetailsDialogTests.cs index 7443ef2b7..b8c973169 100644 --- a/src/IoTHub.Portal.Tests.Unit/Client/Pages/Shared/ProblemDetailsDialogTests.cs +++ b/src/IoTHub.Portal.Tests.Unit/Client/Pages/Shared/ProblemDetailsDialogTests.cs @@ -60,7 +60,7 @@ public async Task ProblemDetailsDialogShouldBeRenderedWithProblemDetailsInfosAsy }; // Act - await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); + _ = await cut.InvokeAsync(() => service?.Show(string.Empty, parameters)); // Assert var mudListItems = cut.FindComponents();