Commit Description:
Initial version of encompass addition (not fully working)....
Commit Description:
Initial version of encompass addition (not fully working). (grafted from 22b0a67e9ee54a2f6d58f957f394be390407a2c7)
Show/Diff file:
Action:
encompass-cs/test/EntityTest.cs
38 lines | 903 B | text/x-csharp | CSharpLexer
using NUnit.Framework;
using FluentAssertions;
using Encompass;
using Encompass.Exceptions;
namespace Tests
{
public class EntityTests
{
[Test]
public void Equals()
{
var worldBuilder = new WorldBuilder();
var entity = worldBuilder.CreateEntity();
var entityTwo = worldBuilder.CreateEntity();
var copyEntity = entity;
Assert.AreNotEqual(entity, entityTwo);
Assert.AreEqual(entity, entity);
Assert.IsTrue(entity == copyEntity);
}
[Test]
public void EntityOverflowException()
{
var worldBuilder = new WorldBuilder(16);
for (var i = 0; i < 16; i++)
{
worldBuilder.CreateEntity();
}
Assert.Throws<EntityOverflowException>(() => worldBuilder.CreateEntity());
}
}
}