AssetSystemMocks.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536
  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 <AzToolsFramework/API/EditorAssetSystemAPI.h>
  10. #include <gtest/gtest.h>
  11. #include <gmock/gmock.h>
  12. namespace UnitTests
  13. {
  14. class MockAssetSystemRequest : public AzToolsFramework::AssetSystemRequestBus::Handler
  15. {
  16. public:
  17. MOCK_METHOD1(GetAbsoluteAssetDatabaseLocation, bool(AZStd::string&));
  18. MOCK_METHOD2(GetRelativeProductPathFromFullSourceOrProductPath, bool(const AZStd::string& fullPath, AZStd::string& relativeProductPath));
  19. MOCK_METHOD3(GenerateRelativeSourcePath,
  20. bool(const AZStd::string& sourcePath, AZStd::string& relativePath, AZStd::string& watchFolder));
  21. MOCK_METHOD2(GetFullSourcePathFromRelativeProductPath, bool(const AZStd::string& relPath, AZStd::string& fullSourcePath));
  22. MOCK_METHOD5(GetAssetInfoById, bool(const AZ::Data::AssetId& assetId, const AZ::Data::AssetType& assetType, const AZStd::string& platformName, AZ::Data::AssetInfo& assetInfo, AZStd::string& rootFilePath));
  23. MOCK_METHOD3(GetSourceInfoBySourcePath, bool(const char* sourcePath, AZ::Data::AssetInfo& assetInfo, AZStd::string& watchFolder));
  24. MOCK_METHOD3(GetSourceInfoBySourceUUID, bool(const AZ::Uuid& sourceUuid, AZ::Data::AssetInfo& assetInfo, AZStd::string& watchFolder));
  25. MOCK_METHOD1(GetScanFolders, bool(AZStd::vector<AZStd::string>& scanFolders));
  26. MOCK_METHOD1(GetAssetSafeFolders, bool(AZStd::vector<AZStd::string>& assetSafeFolders));
  27. MOCK_METHOD1(IsAssetPlatformEnabled, bool(const char* platform));
  28. MOCK_METHOD1(GetPendingAssetsForPlatform, int(const char* platform));
  29. MOCK_METHOD2(GetAssetsProducedBySourceUUID, bool(const AZ::Uuid& sourceUuid, AZStd::vector<AZ::Data::AssetInfo>& productsAssetInfo));
  30. MOCK_METHOD1(ClearFingerprintForAsset, bool(const AZStd::string& sourcePath));
  31. };
  32. }