public void CannotRetainEntityMoreThanOnceByASingleOwner() { var owner = new object(); _entity.Retain(owner); Assert.Throws <EntityIsAlreadyRetainedByOwnerException>(() => _entity.Retain(owner)); }
public void ValidateToStringA() { _defaultEntity.AddComponentA(); _defaultEntity.AddComponentB(); _defaultEntity.AddComponent(0, new StandardComponent()); _defaultEntity.Retain(this); Assert.AreEqual( "Entity_0(EntitasRedux.Tests.StandardComponent, EntitasRedux.Tests.ComponentA, EntitasRedux.Tests.ComponentB)", _defaultEntity.ToString()); }