RuntimeRequestsMock.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 <ScriptCanvas/Execution/RuntimeBus.h>
  11. namespace ScriptCanvasUnitTest
  12. {
  13. using namespace ScriptCanvas;
  14. class RuntimeRequestsMock : public RuntimeRequests
  15. {
  16. public:
  17. MOCK_CONST_METHOD1(FindAssetVariableIdByRuntimeVariableId, VariableId(VariableId));
  18. MOCK_CONST_METHOD1(FindRuntimeVariableIdByAssetVariableId, VariableId(VariableId));
  19. MOCK_CONST_METHOD1(FindAssetNodeIdByRuntimeNodeId, AZ::EntityId(AZ::EntityId));
  20. MOCK_CONST_METHOD0(GetAssetId, AZ::Data::AssetId());
  21. MOCK_CONST_METHOD0(GetGraphIdentifier, GraphIdentifier());
  22. MOCK_CONST_METHOD0(GetAssetName, AZStd::string());
  23. MOCK_CONST_METHOD1(FindNode, Node*(AZ::EntityId));
  24. MOCK_CONST_METHOD1(FindRuntimeNodeIdByAssetNodeId, AZ::EntityId(AZ::EntityId));
  25. MOCK_CONST_METHOD0(GetRuntimeEntityId, AZ::EntityId());
  26. MOCK_CONST_METHOD0(GetNodes, AZStd::vector<AZ::EntityId>());
  27. MOCK_CONST_METHOD0(GetConnections, AZStd::vector<AZ::EntityId>());
  28. MOCK_CONST_METHOD1(GetConnectedEndpoints, AZStd::vector<Endpoint>(const Endpoint&));
  29. MOCK_CONST_METHOD1(GetConnectedEndpointIterators, AZStd::pair< EndpointMapConstIterator, EndpointMapConstIterator >(const Endpoint&));
  30. MOCK_CONST_METHOD1(IsEndpointConnected, bool(const Endpoint&));
  31. MOCK_METHOD0(GetGraphData, GraphData*());
  32. MOCK_CONST_METHOD0(GetGraphDataConst, const GraphData*());
  33. MOCK_METHOD0(GetVariableData, VariableData*());
  34. MOCK_CONST_METHOD0(GetVariableDataConst, const VariableData*());
  35. MOCK_CONST_METHOD0(GetVariables, const GraphVariableMapping*());
  36. MOCK_METHOD1(FindVariable, GraphVariable*(AZStd::string_view));
  37. MOCK_METHOD1(FindVariableById, GraphVariable*(const VariableId&));
  38. MOCK_CONST_METHOD1(GetVariableType, Data::Type(const VariableId&));
  39. MOCK_CONST_METHOD1(GetVariableName, AZStd::string_view(const VariableId&));
  40. MOCK_CONST_METHOD0(IsGraphObserved, bool());
  41. MOCK_METHOD1(SetIsGraphObserved, void(bool));
  42. MOCK_CONST_METHOD0(GetAssetType, AZ::Data::AssetType());
  43. };
  44. }