EditorFocusModeFixture.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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/UnitTest/TestTypes.h>
  10. #include <AzCore/UserSettings/UserSettingsComponent.h>
  11. #include <AzTest/AzTest.h>
  12. #include <AzToolsFramework/ContainerEntity/ContainerEntityInterface.h>
  13. #include <AzToolsFramework/FocusMode/FocusModeInterface.h>
  14. #include <AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h>
  15. namespace UnitTest
  16. {
  17. class EditorFocusModeFixture : public ToolsApplicationFixture<>
  18. {
  19. protected:
  20. void SetUpEditorFixtureImpl() override;
  21. void TearDownEditorFixtureImpl() override;
  22. void GenerateTestHierarchy();
  23. AZ::EntityId CreateEditorEntity(const char* name, AZ::EntityId parentId);
  24. AZStd::unordered_map<AZStd::string, AZ::EntityId> m_entityMap;
  25. AzToolsFramework::ContainerEntityInterface* m_containerEntityInterface = nullptr;
  26. AzToolsFramework::FocusModeInterface* m_focusModeInterface = nullptr;
  27. bool m_ed_enableOutlinerOverrideManagement = false;
  28. public:
  29. AzToolsFramework::EntityIdList GetSelectedEntities();
  30. AzFramework::EntityContextId m_editorEntityContextId = AzFramework::EntityContextId::CreateNull();
  31. inline static const char* CityEntityName = "City";
  32. inline static const char* StreetEntityName = "Street";
  33. inline static const char* CarEntityName = "Car";
  34. inline static const char* SportsCarEntityName = "SportsCar";
  35. inline static const char* Passenger1EntityName = "Passenger1";
  36. inline static const char* Passenger2EntityName = "Passenger2";
  37. AzFramework::CameraState m_cameraState;
  38. inline static const AZ::Vector3 CameraPosition = AZ::Vector3(10.0f, 15.0f, 10.0f);
  39. inline static AZ::Vector3 s_worldCityEntityPosition = AZ::Vector3(5.0f, 10.0f, 0.0f);
  40. inline static AZ::Vector3 s_worldCarEntityPosition = AZ::Vector3(5.0f, 15.0f, 0.0f);
  41. };
  42. } // namespace UnitTest