TerrainWorldRendererComponentTests.cpp 844 B

123456789101112131415161718192021222324252627282930313233
  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. #include <Components/TerrainWorldComponent.h>
  9. #include <Components/TerrainWorldRendererComponent.h>
  10. #include <AzTest/AzTest.h>
  11. #include <TerrainTestFixtures.h>
  12. class TerrainWorldRendererComponentTest
  13. : public UnitTest::TerrainSystemTestFixture
  14. {
  15. };
  16. TEST_F(TerrainWorldRendererComponentTest, ComponentActivatesSuccessfully)
  17. {
  18. auto entity = CreateEntity();
  19. entity->CreateComponent<Terrain::TerrainWorldComponent>();
  20. entity->CreateComponent<Terrain::TerrainWorldRendererComponent>();
  21. ActivateEntity(entity.get());
  22. EXPECT_EQ(entity->GetState(), AZ::Entity::State::Active);
  23. entity.reset();
  24. }