Files
NazaraEngine/tests/Engine/Graphics/SkyboxBackground.cpp
Jérôme Leclercq ed46c87781 Refactor the way resources are loaded (#191)
* WIP

* WIP

* Font works

* WIP: Only Music remains

* Looks like it's working

* Fix oopsie

* Core/ObjectRef: Add cast functions

* Update ChangeLog.md

* Audio/SoundStream: Make sound stream thread-safe
2018-10-28 01:53:11 +02:00

25 lines
801 B
C++

#include <Nazara/Graphics/SkyboxBackground.hpp>
#include <Catch/catch.hpp>
SCENARIO("SkyboxBackground", "[GRAPHICS][SKYBOXBACKGROUND]")
{
GIVEN("A skybox background with a loaded image")
{
Nz::TextureRef textureRef = Nz::Texture::LoadCubemapFromFile("resources/Engine/Graphics/skybox.png");
Nz::SkyboxBackgroundRef skyboxBackgroundRef = Nz::SkyboxBackground::New(textureRef);
WHEN("We assign it parameters")
{
skyboxBackgroundRef->SetMovementOffset(Nz::Vector3f::Unit());
skyboxBackgroundRef->SetMovementScale(1.f);
THEN("We can get it")
{
REQUIRE(skyboxBackgroundRef->GetMovementOffset() == Nz::Vector3f::Unit());
REQUIRE(skyboxBackgroundRef->GetMovementScale() == Approx(1.f));
REQUIRE(skyboxBackgroundRef->GetTexture().Get() == textureRef.Get());
}
}
}
}