Rework for LearnMove method on CreatePokemon.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -3,22 +3,34 @@
|
||||
#include "../../src/Battling/Pokemon/CreatePokemon.hpp"
|
||||
#include "../TestLibrary/TestLibrary.hpp"
|
||||
|
||||
TEST_CASE("Create and delete Pokemon"){
|
||||
TEST_CASE("Create and delete Pokemon") {
|
||||
auto lib = TestLibrary::GetLibrary();
|
||||
auto mon = PkmnLib::Battling::CreatePokemon(lib, "testSpecies"_cnc, 1).Build();
|
||||
delete mon;
|
||||
}
|
||||
|
||||
TEST_CASE("Get Nature from Pokemon"){
|
||||
TEST_CASE("Get Nature from Pokemon") {
|
||||
auto lib = TestLibrary::GetLibrary();
|
||||
auto mon = PkmnLib::Battling::CreatePokemon(lib, "testSpecies"_cnc, 1)
|
||||
.WithNature("neutralNature"_cnc)
|
||||
->Build();
|
||||
auto mon = PkmnLib::Battling::CreatePokemon(lib, "testSpecies"_cnc, 1).WithNature("neutralNature"_cnc)->Build();
|
||||
auto nature = mon->GetNature();
|
||||
REQUIRE(nature->GetDecreaseModifier() == 1);
|
||||
REQUIRE(nature->GetIncreaseModifier() == 1);
|
||||
delete mon;
|
||||
}
|
||||
|
||||
TEST_CASE("Get Attack name from Pokemon") {
|
||||
auto lib = TestLibrary::GetLibrary();
|
||||
auto mon = PkmnLib::Battling::CreatePokemon(lib, "testSpecies"_cnc, 1)
|
||||
.LearnMove(Arbutils::CaseInsensitiveConstString("testMove"),
|
||||
CreatureLib::Battling::AttackLearnMethod::Level)
|
||||
->LearnMove(Arbutils::CaseInsensitiveConstString("testMove2"),
|
||||
CreatureLib::Battling::AttackLearnMethod::Level)
|
||||
->Build();
|
||||
auto move = mon->GetMoves()[0];
|
||||
REQUIRE(move->GetMoveData()->GetName() == "testMove"_cnc);
|
||||
auto move2 = mon->GetMoves()[1];
|
||||
REQUIRE(move2->GetMoveData()->GetName() == "testMove2"_cnc);
|
||||
delete mon;
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user