<commit_before>﻿// Copyright (C) 2017 <NAME>, All Rights Reserved.

using ECSLight;
using NUnit.Framework;
using Tests.Stubs;

namespace Tests
{
	[TestFixture]
	public class ComponentManagerTests
	{
		readonly IEntityManager _stubEntityManager = new StubEntityManager();

		[Test]
		public void CoverEntityComponentsUnInitialized()
		{
			var componentManager = new ComponentManager(new StubSetManager());
			var entity = new Entity(_stubEntityManager, componentManager) {
				new AComponent("a")
			};
			Assert.IsNotNull(componentManager.ComponentFrom<AComponent>(entity));
		}
<commit_msg>Cover previous fail bug.<commit_after>﻿// Copyright (C) 2017 <NAME>, All Rights Reserved.

using ECSLight;
using NUnit.Framework;
using Tests.Stubs;

namespace Tests
{
	[TestFixture]
	public class ComponentManagerTests
	{
		readonly IEntityManager _stubEntityManager = new StubEntityManager();

		[Test]
		public void CoverEntityComponentsUnInitialized()
		{
			var componentManager = new ComponentManager(new StubSetManager());
			var entity = new Entity(_stubEntityManager, componentManager) {
				new AComponent("a")
			};
			Assert.IsNotNull(componentManager.ComponentFrom<AComponent>(entity));

			// removing component that doesn't exist, doesn't crash
			entity.Remove<BComponent>();
		}

{'fraction_non_alphanumeric': 0.0979020979020979, 'fraction_numerical': 0.006216006216006216, 'mean_word_length': 5.313725490196078, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '4414886', 'n_tokens_mistral': 410, 'n_tokens_neox': 365, 'n_words': 95}