Code/Tools/AssetProcessor/native/tests/platformconfiguration/platformconfigurationtests.cpp
TEST_F(PlatformConfigurationUnitTests_OnePCHostFixture, GetScanFolderForFile_RootFolderFile_IsFound)
{
    using namespace AzToolsFramework::AssetSystem;
    using namespace AssetProcessor;

    m_config->AddScanFolder(ScanFolderInfo(m_tempPath.filePath("scanfolder1"), "ScanFolder1", "sf1", true, false, m_platforms), true); // a root folder that has watched subfolders, not recursive
    m_config->AddScanFolder(ScanFolderInfo(m_tempPath.filePath("scanfolder1/Editor"), "Editor", "sf2", false, true, m_platforms), true); // a child folder that exists within that scan folder.

    const ScanFolderInfo* info = m_config->GetScanFolderForFile(m_tempPath.filePath("scanfolder1/something.txt"));

    ASSERT_TRUE(info);
    EXPECT_STREQ(info->ScanPath().toUtf8().constData(), m_tempPath.filePath("scanfolder1").toUtf8().constData());
    EXPECT_STREQ(info->GetDisplayName().toUtf8().constData(), "ScanFolder1");
}
// ensures that when a file in the root (non recursive) folder is searched for, the root is found.
ensures that when a file in the root (non recursive) folder is searched for, the root is found.
ensures that when a file in the root ( non recursive ) folder is searched for the root is found .
TEST_F(PlatformConfigurationUnitTests_OnePCHostFixture, GetScanFolderForFile_RootFolderFile_IsFound)
{
    using namespace AzToolsFramework::AssetSystem;
    using namespace AssetProcessor;
    m_config->AddScanFolder(ScanFolderInfo(m_tempPath.filePath("scanfolder1"), "ScanFolder1", "sf1", true, false, m_platforms), true); 
    m_config->AddScanFolder(ScanFolderInfo(m_tempPath.filePath("scanfolder1/Editor"), "Editor", "sf2", false, true, m_platforms), true); 
    const ScanFolderInfo* info = m_config->GetScanFolderForFile(m_tempPath.filePath("scanfolder1/something.txt"));
    ASSERT_TRUE(info);
    EXPECT_STREQ(info->ScanPath().toUtf8().constData(), m_tempPath.filePath("scanfolder1").toUtf8().constData());
    EXPECT_STREQ(info->GetDisplayName().toUtf8().constData(), "ScanFolder1");
}
TEST_F ( PlatformConfigurationUnitTests_OnePCHostFixture , GetScanFolderForFile_RootFolderFile_IsFound ) { using namespace AzToolsFramework :: AssetSystem ; using namespace AssetProcessor ; m_config -> AddScanFolder ( ScanFolderInfo ( m_tempPath . filePath ( " " ) , " " , " " , true , false , m_platforms ) , true ) ; m_config -> AddScanFolder ( ScanFolderInfo ( m_tempPath . filePath ( " " ) , " " , " " , false , true , m_platforms ) , true ) ; const ScanFolderInfo * info = m_config -> GetScanFolderForFile ( m_tempPath . filePath ( " " ) ) ; ASSERT_TRUE ( info ) ; EXPECT_STREQ ( info -> ScanPath ( ) . toUtf8 ( ) . constData ( ) , m_tempPath . filePath ( " " ) . toUtf8 ( ) . constData ( ) ) ; EXPECT_STREQ ( info -> GetDisplayName ( ) . toUtf8 ( ) . constData ( ) , " " ) ; }
ensures that when a file in the root (non recursive) folder is searched for, the root is found.
ensures that when a file in the root ( non recursive ) folder is searched for the root is found .
// a root folder that has watched subfolders, not recursive // a child folder that exists within that scan folder.