public void TestIEnumerable() { var service = new GameObjectService(); Assert.IsNotNull(service.GetEntities()); Assert.AreEqual(0, service.GetEntities().Count()); }
public void TestEntities() { var service = new GameObjectService(); IEntity entity1 = new TestEntity(service, false); Assert.AreEqual(0, service.GetEntities().Count()); IEntity entity2 = new TestEntity(service, true); Assert.AreEqual(1, service.GetEntities().Count()); var enumerator = service.GetEntities().GetEnumerator(); enumerator.MoveNext(); Assert.AreNotSame(entity1, enumerator.Current); Assert.AreSame(entity2, enumerator.Current); IEntity entity3 = new TestEntity(service, true); Assert.AreEqual(2, service.GetEntities().Count()); }