Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

Commit

Permalink
Rename method to reflect the use of async
Browse files Browse the repository at this point in the history
  • Loading branch information
StrangeRanger committed Mar 27, 2024
1 parent a29c211 commit 784b2e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ActiveDirectoryQuerier.Tests/ADCommandsFetcherTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class ADCommandsFetcherTests
public async Task GetADCommands_ReturnsCommandList_IsNotEmpty()
{
// Act
ObservableCollection<Command> adCommands = await ADCommandsFetcher.GetADCommands();
ObservableCollection<Command> adCommands = await ADCommandsFetcher.GetADCommandsAsync();

// Assert
Assert.NotEmpty(adCommands);
Expand All @@ -24,7 +24,7 @@ public async Task GetADCommands_ReturnsCommandList_IsNotEmpty()
public async Task GetADCommands_ReturnsCommandList_ContainsCommand(string commandName)
{
// Act
ObservableCollection<Command> adCommands = await ADCommandsFetcher.GetADCommands();
ObservableCollection<Command> adCommands = await ADCommandsFetcher.GetADCommandsAsync();

// Assert
Assert.Contains(adCommands, command => command.CommandText == commandName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace ActiveDirectoryQuerier.ActiveDirectory;
public static class ADCommandsFetcher
{
// ReSharper disable once InconsistentNaming
public static async Task<ObservableCollection<Command>> GetADCommands()
public static async Task<ObservableCollection<Command>> GetADCommandsAsync()
{
Command psCommand = new("Get-Command");
psCommand.Parameters.Add("Module", "ActiveDirectory");
Expand Down
2 changes: 1 addition & 1 deletion ActiveDirectoryQuerier/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ private async Task InitializeActiveDirectoryCommandsAsync()
{
try
{
ObservableCollection<Command> list = await ADCommandsFetcher.GetADCommands();
ObservableCollection<Command> list = await ADCommandsFetcher.GetADCommandsAsync();
ADCommands = new ObservableCollection<Command>(list);
OnPropertyChanged(nameof(ADCommands));
}
Expand Down

0 comments on commit 784b2e1

Please sign in to comment.