SpawnableTestFixture.h 899 B

1234567891011121314151617181920212223242526272829303132
  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 <AzCore/Component/EntityId.h>
  10. #include <AzCore/std/smart_ptr/unique_ptr.h>
  11. #include <AzFramework/Spawnable/Spawnable.h>
  12. #include <AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h>
  13. namespace AZ
  14. {
  15. class Entity;
  16. }
  17. namespace UnitTest
  18. {
  19. class SpawnableTestFixture : public ToolsApplicationFixture<>
  20. {
  21. public:
  22. constexpr static const char* PathString = "path/to/template";
  23. protected:
  24. AZStd::unique_ptr<AZ::Entity> CreateEntity(const char* entityName, AZ::EntityId parentId = AZ::EntityId());
  25. AZ::Data::Asset<AzFramework::Spawnable> CreateSpawnableAsset(uint64_t entityCount);
  26. };
  27. } // namespace UnitTest