Gems/Atom/RPI/Code/Tests/Model/ModelTests.cpp
TEST_F(ModelTests, SetMaterialSlotNoBeginNoBeginMesh)
    {
        using namespace AZ;

        RPI::ModelLodAssetCreator creator;

        {
            ErrorMessageFinder messageFinder("Begin() was not called");
            creator.SetMeshMaterialSlot(0);
        }

        creator.Begin(Data::AssetId(AZ::Uuid::CreateRandom()));

        //This should still fail even if we call Begin but not BeginMesh
        {
            ErrorMessageFinder messageFinder("BeginMesh() was not called");
            creator.SetMeshMaterialSlot(0);
        }
    }
// Tests that if we try to set the material slot on a mesh
// without calling Begin or BeginMesh that it fails
// as expected. Also tests the case that Begin *is*
// called but BeginMesh is not.
Tests that if we try to set the material slot on a mesh
without calling Begin or BeginMesh that it fails
as expected. Also tests the case that Begin *is
called but BeginMesh is not.
Tests that if we try to set the material slot on a mesh without calling Begin or BeginMesh that it fails as expected . Also tests the case that Begin * is called but BeginMesh is not .
TEST_F(ModelTests, SetMaterialSlotNoBeginNoBeginMesh)
    {
        using namespace AZ;
        RPI::ModelLodAssetCreator creator;
        {
            ErrorMessageFinder messageFinder("Begin() was not called");
            creator.SetMeshMaterialSlot(0);
        }
        creator.Begin(Data::AssetId(AZ::Uuid::CreateRandom()));
        {
            ErrorMessageFinder messageFinder("BeginMesh() was not called");
            creator.SetMeshMaterialSlot(0);
        }
    }
TEST_F ( ModelTests , SetMaterialSlotNoBeginNoBeginMesh ) { using namespace AZ ; RPI :: ModelLodAssetCreator creator ; { ErrorMessageFinder messageFinder ( " " ) ; creator . SetMeshMaterialSlot ( 0 ) ; } creator . Begin ( Data :: AssetId ( AZ :: Uuid :: CreateRandom ( ) ) ) ; { ErrorMessageFinder messageFinder ( " " ) ; creator . SetMeshMaterialSlot ( 0 ) ; } }
Tests that if we try to set the material slot on a mesh
without calling Begin or BeginMesh that it fails
as expected.
Tests that if we try to set the material slot on a mesh without calling Begin or BeginMesh that it fails as expected .
//This should still fail even if we call Begin but not BeginMesh