message: Fix FilteredCommand tests to run on UI thread
  Fixes exception in FilteredCommandTests, caused due to
  an attempt to instantiate PropertyChangedEventArgs on non-UI thread.
  Though the diff might look scary it is just wrapping with `RunOnUIThread`
diff: #include "pch.h"
  #include "../TerminalApp/CommandLinePaletteItem.h"
  #include "../TerminalApp/CommandPalette.h"
  +#include "../CppWinrtTailored.h"
  using namespace Microsoft::Console;
  using namespace WEX::Logging;
  @@ -29,6 +30,7 @@ namespace TerminalAppLocalTests
  void FilteredCommandTests::VerifyHighlighting()
  {
  + auto result = RunOnUIThread([]() {
  const auto paletteItem{ winrt::make<winrt::TerminalApp::implementation::CommandLinePaletteItem>(L"AAAAAABBBBBBCCC") };
  {
  Log::Comment(L"Testing command name segmentation with no filter");
  @@ -102,10 +104,14 @@ namespace TerminalAppLocalTests
  VERIFY_ARE_EQUAL(segments.GetAt(0).TextSegment(), L"AAAAAABBBBBBCCC");
  VERIFY_IS_FALSE(segments.GetAt(0).IsHighlighted());
  }
  + });
  +
  + VERIFY_SUCCEEDED(result);
  }
  void FilteredCommandTests::VerifyWeight()
  {
  + auto result = RunOnUIThread([]() {
  const auto paletteItem{ winrt::make<winrt::TerminalApp::implementation::CommandLinePaletteItem>(L"AAAAAABBBBBBCCC") };
  {
  Log::Comment(L"Testing weight of command with no filter");
  @@ -154,10 +160,14 @@ namespace TerminalAppLocalTests
  auto weight = filteredCommand->_computeWeight();
  VERIFY_ARE_EQUAL(weight, 3); // 1 point for the first char match + 1 point for the beginning of the word + 1 point for the match of "b"
  }
  + });
  +
  + VERIFY_SUCCEEDED(result);
  }
  void FilteredCommandTests::VerifyCompare()
  {
  + auto result = RunOnUIThread([]() {
  const auto paletteItem{ winrt::make<winrt::TerminalApp::implementation::CommandLinePaletteItem>(L"AAAAAABBBBBBCCC") };
  const auto paletteItem2{ winrt::make<winrt::TerminalApp::implementation::CommandLinePaletteItem>(L"BBBBBCCC") };
  {
  @@ -198,10 +208,14 @@ namespace TerminalAppLocalTests
  VERIFY_IS_TRUE(filteredCommand->Weight() < filteredCommand2->Weight()); // Second command gets more points due to the beginning of the word
  VERIFY_IS_FALSE(winrt::TerminalApp::implementation::FilteredCommand::Compare(*filteredCommand, *filteredCommand2));
  }
  + });
  +
  + VERIFY_SUCCEEDED(result);
  }
  void FilteredCommandTests::VerifyCompareIgnoreCase()
  {
  + auto result = RunOnUIThread([]() {
  const auto paletteItem{ winrt::make<winrt::TerminalApp::implementation::CommandLinePaletteItem>(L"a") };
  const auto paletteItem2{ winrt::make<winrt::TerminalApp::implementation::CommandLinePaletteItem>(L"B") };
  {
  @@ -211,5 +225,8 @@ namespace TerminalAppLocalTests
  VERIFY_ARE_EQUAL(filteredCommand->Weight(), filteredCommand2->Weight());
  VERIFY_IS_TRUE(winrt::TerminalApp::implementation::FilteredCommand::Compare(*filteredCommand, *filteredCommand2));
  }
  + });
  +
  + VERIFY_SUCCEEDED(result);
  }
  }
  