public void WhenRemovingEntityFromCell_ThenThatCellNoLongerContainsTheEntity() { var entity = new Entity(); var map = new TestMap(1, 1); map.Add(0, 0, entity); var preCount = map.GetCell(0, 0).Content.Entities.Count; map.Remove(0, 0, entity); var postCount = map.GetCell(0, 0).Content.Entities.Count; Assert.AreEqual(1, preCount); Assert.AreEqual(0, postCount); }
public void WhenAddingEntityToCell_ThenEntityIsContainedWhenGettingCell() { var entity = new Entity(); var map = new TestMap(1, 1); map.Add(0, 0, entity); var cellEntity = map.GetCell(0, 0).Content.Entities.Find(i => i.Equals(entity)); Assert.AreSame(entity, cellEntity); }