<commit_before><commit_msg>New tests for EntityManager<commit_after>#include "gtest/gtest.h"
#include "entity/EntityManager.h"
#include "entity/components/PositionManager.h"

TEST(EntityManagerTest, CreateMultipleEntities)
{
	EntityManager em;

	Entity e1 = em.createEntity();
	Entity e2 = em.createEntity();

	EXPECT_NE(e1, e2);
}

TEST(EntityManagerTest, NewEntitiesAreAlive)
{
	EntityManager em;

	Entity e = em.createEntity();

	EXPECT_TRUE(em.isEntityAlive(e));
}

TEST(EntityManagerTest, DestroyedEntitiesAreNotAlive)
{
	EntityManager em;

	Entity e = em.createEntity();
	em.destroyEntity(e);

	EXPECT_FALSE(em.isEntityAlive(e));
}

TEST(EntityManagerTest, RetrieveComponentManagerByType)
{
	EntityManager em;
	PositionManager cm;

	em.addComponentManager(&cm);

	EXPECT_EQ(&cm, em.getComponentManager(Position));
}

TEST(EntityManagerTest, NoMatchingComponentGetsNULL)
{
	EntityManager em;
	PositionManager cm;

	EXPECT_EQ(NULL, em.getComponentManager(Position));

	em.addComponentManager(&cm);

	EXPECT_EQ(NULL, em.getComponentManager(Sprite));
}

{'fraction_non_alphanumeric': 0.11943127962085308, 'fraction_numerical': 0.0037914691943127963, 'mean_word_length': 7.25, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1863435', 'n_tokens_mistral': 364, 'n_tokens_neox': 362, 'n_words': 58}