ScriptAutomationApplicationFixture.h 984 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <AzTest/AzTest.h>
  10. #include <AzCore/UnitTest/TestTypes.h>
  11. #include <AzCore/std/containers/fixed_vector.h>
  12. #include <AzFramework/Application/Application.h>
  13. namespace UnitTest
  14. {
  15. class ScriptAutomationApplicationFixture
  16. : public LeakDetectionFixture
  17. {
  18. public:
  19. void TearDown() override;
  20. protected:
  21. AzFramework::Application* CreateApplication(const char* scriptPath = nullptr, bool exitOnFinish = true);
  22. void DestroyApplication();
  23. private:
  24. using ArgumentContainer = AZStd::fixed_vector<const char*, 8>;
  25. ArgumentContainer m_args = { nullptr };
  26. AZStd::string m_enginePath;
  27. AzFramework::Application* m_application = nullptr;
  28. };
  29. } // namespace UnitTest