TestCommand.h (1487B)
1 // Copyright (c) Microsoft Corporation. 2 // Licensed under the MIT License. 3 #pragma once 4 #include "Command.h" 5 6 #ifndef AICLI_DISABLE_TEST_HOOKS 7 8 namespace AppInstaller::CLI 9 { 10 // Command: winget test 11 // Convenient command for debugging. Waits infinitely. 12 // Use this if you want to debug things that happen out side of workflows or modify locally to do whatever you need. 13 struct TestCommand final : public Command 14 { 15 TestCommand(std::string_view parent) : Command("test", {}, parent, Visibility::Hidden) {} 16 17 std::vector<std::unique_ptr<Command>> GetCommands() const override; 18 19 Resource::LocString ShortDescription() const override; 20 Resource::LocString LongDescription() const override; 21 22 protected: 23 void ExecuteInternal(Execution::Context& context) const override; 24 }; 25 26 // Command: winget test appshutdown 27 // Verifies the window was created and waits for the app shutdown event. 28 // Used in E2E. 29 struct TestAppShutdownCommand final : public Command 30 { 31 TestAppShutdownCommand(std::string_view parent) : Command("appshutdown", {}, parent, Visibility::Hidden) {} 32 33 std::vector<Argument> GetArguments() const override; 34 35 Resource::LocString ShortDescription() const override; 36 Resource::LocString LongDescription() const override; 37 38 protected: 39 void ExecuteInternal(Execution::Context& context) const override; 40 }; 41 } 42 43 #endif