diff --git a/cr.sh b/run_tests.sh similarity index 100% rename from cr.sh rename to run_tests.sh diff --git a/src/tests.cpp b/src/tests.cpp index 573c707..2572044 100644 --- a/src/tests.cpp +++ b/src/tests.cpp @@ -132,6 +132,18 @@ void testPlacingMultipleEntities() { std::cout << "Success" << std::endl; } +void testResettingEntityLocationId() { + std::cout << "---" << std::endl; + std::cout << "Test 11 - Resetting entity location id" << std::endl; + EntityFactory entityFactory; + Human human = entityFactory.createHuman(); + human.setLocationId("0-0-0"); + assert(human.getLocationId() == "0-0-0"); + human.resetLocationId(); + assert(human.getLocationId() == "N/S"); + std::cout << "Success" << std::endl; +} + void seedRandomNumberGenerator() { srand (time (NULL)); } @@ -151,5 +163,6 @@ int main() { testPlacingEntityInEnvironment(); testRemovingEntityFromEnvironment(); testPlacingMultipleEntities(); + testResettingEntityLocationId(); return 0; } \ No newline at end of file diff --git a/tests b/tests deleted file mode 100644 index 4084c01..0000000 Binary files a/tests and /dev/null differ