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

Commit

Permalink
Format with clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
StrangeRanger committed Mar 27, 2024
1 parent eede5e2 commit 539cf0b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
7 changes: 2 additions & 5 deletions ActiveDirectoryQuerier.Tests/MainWindowViewModelTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ public void EditQueryFromQueryStackPanel_NullParameter_ShowsMessageBox()
{
// Arrange
var mockMessageBoxService = new Mock<IMessageBoxService>();
var viewModel = new MainWindowViewModel
{
MessageBoxService = mockMessageBoxService.Object
};
var viewModel = new MainWindowViewModel { MessageBoxService = mockMessageBoxService.Object };

// Act
viewModel.EditQueryFromQueryStackPanel(null);
Expand All @@ -24,4 +21,4 @@ public void EditQueryFromQueryStackPanel_NullParameter_ShowsMessageBox()
x => x.Show(It.IsAny<string>(), "Error", MessageBoxButton.OK, MessageBoxImage.Error),
Times.Once);
}
}
}
2 changes: 1 addition & 1 deletion ActiveDirectoryQuerier/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
// (used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
[assembly: InternalsVisibleTo("ActiveDirectoryQuerier.Tests")]
[assembly:InternalsVisibleTo("ActiveDirectoryQuerier.Tests")]
8 changes: 4 additions & 4 deletions ActiveDirectoryQuerier/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,12 @@ internal void EditQueryFromQueryStackPanel(object? queryButton)
{
Trace.WriteLine("No button selected.");
MessageBoxService.Show($"An internal error occurred while trying to edit the query: {queryButton}",
"Error",
MessageBoxButton.OK,
MessageBoxImage.Error);
"Error",
MessageBoxButton.OK,
MessageBoxImage.Error);
return;
}

var currentQuery = (Query)button.Tag;
Command chosenCommand = ADCommands.FirstOrDefault(item => item.CommandText == currentQuery.PSCommandName)!;
ADCommandParameters adCommandParameters = new();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ namespace ActiveDirectoryQuerier.MessageBoxService;
public interface IMessageBoxService
{
void Show(string message, string caption, MessageBoxButton button, MessageBoxImage icon);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ public void Show(string message, string caption, MessageBoxButton button, Messag
{
MessageBox.Show(message, caption, button, icon);
}
}
}

0 comments on commit 539cf0b

Please sign in to comment.