2020-01-02 17:02:40 +00:00
|
|
|
#ifdef TESTS_BUILD
|
|
|
|
#include "../../extern/catch.hpp"
|
|
|
|
#include "../../src/Battling/Pokemon/CreatePokemon.hpp"
|
|
|
|
#include "../TestLibrary/TestLibrary.hpp"
|
|
|
|
|
|
|
|
TEST_CASE("Create and delete Pokemon"){
|
|
|
|
auto lib = TestLibrary::GetLibrary();
|
2020-02-27 17:59:15 +00:00
|
|
|
auto mon = PkmnLib::Battling::CreatePokemon(lib, "testSpecies"_cnc, 1).Build();
|
2020-01-02 17:02:40 +00:00
|
|
|
delete mon;
|
|
|
|
}
|
|
|
|
|
2020-01-02 19:26:01 +00:00
|
|
|
TEST_CASE("Get Nature from Pokemon"){
|
|
|
|
auto lib = TestLibrary::GetLibrary();
|
2020-02-27 17:59:15 +00:00
|
|
|
auto mon = PkmnLib::Battling::CreatePokemon(lib, "testSpecies"_cnc, 1)
|
2020-01-02 19:26:01 +00:00
|
|
|
.WithNature("neutralNature")
|
|
|
|
->Build();
|
|
|
|
auto nature = mon->GetNature();
|
|
|
|
REQUIRE(nature.GetDecreaseModifier() == 1);
|
|
|
|
REQUIRE(nature.GetIncreaseModifier() == 1);
|
|
|
|
delete mon;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-01-02 17:02:40 +00:00
|
|
|
#endif
|