Show More
Commit Description:
Hide budget for now....
Commit Description:
Hide budget for now.
(grafted from c874f4993fc1575dc21b6d1a41b46dc9b87f3337)
References:
File last commit:
Show/Diff file:
Action:
encompass-cs/test/EntityTest.cs
38 lines | 903 B | text/x-csharp | CSharpLexer
38 lines | 903 B | text/x-csharp | CSharpLexer
r169 | 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()); | ||||
} | ||||
} | ||||
} | ||||