Gems/Atom/RPI/Code/Tests/Buffer/BufferTests.cpp
TEST_F(BufferTests, SetViewDescriptorNoBegin)
    {
        using namespace AZ;

        ExpectedBuffer validBuffer = CreateValidBuffer();

        RPI::BufferAssetCreator creator;

        ErrorMessageFinder messageFinder("Begin() was not called", 2);
        
        creator.SetBufferViewDescriptor(validBuffer.m_viewDescriptor);

        //Ending the buffer here should also result in failure
        Data::Asset<RPI::BufferAsset> asset;
        ASSERT_FALSE(creator.End(asset));
        ASSERT_FALSE(asset.IsReady());
        ASSERT_EQ(asset.Get(), nullptr);
    }
// Tests that if we try to set the view descriptor on the 
// BufferAssetCreator before Begin has been called that it fails
Tests that if we try to set the view descriptor on the
BufferAssetCreator before Begin has been called that it fails
Tests that if we try to set the view descriptor on the BufferAssetCreator before Begin has been called that it fails
TEST_F(BufferTests, SetViewDescriptorNoBegin)
    {
        using namespace AZ;
        ExpectedBuffer validBuffer = CreateValidBuffer();
        RPI::BufferAssetCreator creator;
        ErrorMessageFinder messageFinder("Begin() was not called", 2);
        creator.SetBufferViewDescriptor(validBuffer.m_viewDescriptor);
        Data::Asset<RPI::BufferAsset> asset;
        ASSERT_FALSE(creator.End(asset));
        ASSERT_FALSE(asset.IsReady());
        ASSERT_EQ(asset.Get(), nullptr);
    }
TEST_F ( BufferTests , SetViewDescriptorNoBegin ) { using namespace AZ ; ExpectedBuffer validBuffer = CreateValidBuffer ( ) ; RPI :: BufferAssetCreator creator ; ErrorMessageFinder messageFinder ( " " , 2 ) ; creator . SetBufferViewDescriptor ( validBuffer . m_viewDescriptor ) ; Data :: Asset < RPI :: BufferAsset > asset ; ASSERT_FALSE ( creator . End ( asset ) ) ; ASSERT_FALSE ( asset . IsReady ( ) ) ; ASSERT_EQ ( asset . Get ( ) , nullptr ) ; }
Tests that if we try to set the view descriptor on the
BufferAssetCreator before Begin has been called that it fails
Tests that if we try to set the view descriptor on the BufferAssetCreator before Begin has been called that it fails
//Ending the buffer here should also result in failure