8d67f184c8
* Refactor existing tests and fixtures, split them up in more granular tests, and add more comments. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Refactor test fixture for FocusMode to make it more reusable Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Fixture rename, draft of selection test Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Split SetFocus and ClearFocus tests for Editor Focus Mode Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Move BoundsTestComponent to its own file so that it can be reused in Focus Mode Selection tests Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Making progress on selection test. Test compiles now, but selection doesn't seem to be working. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Removed commented out code from previous iteration. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Move BoundsTestComponent under the UnitTest namespace Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Viewport selection tests + minor fixes. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Minor fixes Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
49 lines
1.6 KiB
C++
49 lines
1.6 KiB
C++
/*
|
|
* Copyright (c) Contributors to the Open 3D Engine Project.
|
|
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AzCore/Component/TransformBus.h>
|
|
#include <AzCore/UnitTest/TestTypes.h>
|
|
#include <AzCore/UserSettings/UserSettingsComponent.h>
|
|
|
|
#include <AzTest/AzTest.h>
|
|
|
|
#include <AzToolsFramework/FocusMode/FocusModeInterface.h>
|
|
#include <AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h>
|
|
|
|
namespace AzToolsFramework
|
|
{
|
|
class EditorFocusModeFixture
|
|
: public UnitTest::ToolsApplicationFixture
|
|
{
|
|
protected:
|
|
void SetUpEditorFixtureImpl() override;
|
|
|
|
void GenerateTestHierarchy();
|
|
AZ::EntityId CreateEditorEntity(const char* name, AZ::EntityId parentId);
|
|
|
|
AZStd::unordered_map<AZStd::string, AZ::EntityId> m_entityMap;
|
|
FocusModeInterface* m_focusModeInterface = nullptr;
|
|
|
|
public:
|
|
AzFramework::CameraState m_cameraState;
|
|
|
|
inline static const AZ::Vector3 CameraPosition = AZ::Vector3(10.0f, 15.0f, 10.0f);
|
|
|
|
inline static const char* CityEntityName = "City";
|
|
inline static const char* StreetEntityName = "Street";
|
|
inline static const char* CarEntityName = "Car";
|
|
inline static const char* SportsCarEntityName = "SportsCar";
|
|
inline static const char* Passenger1EntityName = "Passenger1";
|
|
inline static const char* Passenger2EntityName = "Passenger2";
|
|
|
|
inline static AZ::Vector3 CarEntityPosition = AZ::Vector3(5.0f, 15.0f, 0.0f);
|
|
};
|
|
}
|