From 784b2e1717a608222e9bc65370b2bc8ea7c8066a Mon Sep 17 00:00:00 2001 From: Hunter T Date: Wed, 27 Mar 2024 16:04:54 -0700 Subject: [PATCH] Rename method to reflect the use of async --- ActiveDirectoryQuerier.Tests/ADCommandsFetcherTests.cs | 4 ++-- ActiveDirectoryQuerier/ActiveDirectory/ADCommandsFetcher.cs | 2 +- ActiveDirectoryQuerier/MainWindowViewModel.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ActiveDirectoryQuerier.Tests/ADCommandsFetcherTests.cs b/ActiveDirectoryQuerier.Tests/ADCommandsFetcherTests.cs index 309c4de..f7c04e5 100644 --- a/ActiveDirectoryQuerier.Tests/ADCommandsFetcherTests.cs +++ b/ActiveDirectoryQuerier.Tests/ADCommandsFetcherTests.cs @@ -11,7 +11,7 @@ public class ADCommandsFetcherTests public async Task GetADCommands_ReturnsCommandList_IsNotEmpty() { // Act - ObservableCollection adCommands = await ADCommandsFetcher.GetADCommands(); + ObservableCollection adCommands = await ADCommandsFetcher.GetADCommandsAsync(); // Assert Assert.NotEmpty(adCommands); @@ -24,7 +24,7 @@ public async Task GetADCommands_ReturnsCommandList_IsNotEmpty() public async Task GetADCommands_ReturnsCommandList_ContainsCommand(string commandName) { // Act - ObservableCollection adCommands = await ADCommandsFetcher.GetADCommands(); + ObservableCollection adCommands = await ADCommandsFetcher.GetADCommandsAsync(); // Assert Assert.Contains(adCommands, command => command.CommandText == commandName); diff --git a/ActiveDirectoryQuerier/ActiveDirectory/ADCommandsFetcher.cs b/ActiveDirectoryQuerier/ActiveDirectory/ADCommandsFetcher.cs index edd8a0c..ca942d9 100644 --- a/ActiveDirectoryQuerier/ActiveDirectory/ADCommandsFetcher.cs +++ b/ActiveDirectoryQuerier/ActiveDirectory/ADCommandsFetcher.cs @@ -10,7 +10,7 @@ namespace ActiveDirectoryQuerier.ActiveDirectory; public static class ADCommandsFetcher { // ReSharper disable once InconsistentNaming - public static async Task> GetADCommands() + public static async Task> GetADCommandsAsync() { Command psCommand = new("Get-Command"); psCommand.Parameters.Add("Module", "ActiveDirectory"); diff --git a/ActiveDirectoryQuerier/MainWindowViewModel.cs b/ActiveDirectoryQuerier/MainWindowViewModel.cs index 0075379..99d85ca 100644 --- a/ActiveDirectoryQuerier/MainWindowViewModel.cs +++ b/ActiveDirectoryQuerier/MainWindowViewModel.cs @@ -428,7 +428,7 @@ private async Task InitializeActiveDirectoryCommandsAsync() { try { - ObservableCollection list = await ADCommandsFetcher.GetADCommands(); + ObservableCollection list = await ADCommandsFetcher.GetADCommandsAsync(); ADCommands = new ObservableCollection(list); OnPropertyChanged(nameof(ADCommands)); }