public void CacheNotUpdatedWhenAttemptingToRemoveEntityThatWasNotPresentInGroup() { SetupCachedEntities(); _entityWithAComponent2.RemoveComponentA(); HandleSilently(_entityWithAComponent2); Assert.AreEqual(_entitiesCache, _groupA.GetEntities()); }
public void ValidateThatCachedGroupDoesNotContainNonMatchingEntity() { SetupGroupEntities(); var g = _defaultContext.GetGroup(matcherAB); eAB1.RemoveComponentA(); Assert.False(g.GetEntities().Contains(eAB1)); }
public void CannotRemoveNonExistentComponentFromEntity() { Assert.Throws <EntityDoesNotHaveComponentException>(() => _defaultEntity.RemoveComponentA()); }
public void GroupRemovesEntityIfNoLongerMatching() { _entityWithAComponent1.RemoveComponentA(); HandleSilently(_entityWithAComponent1); AssertContainsNot(_entityWithAComponent1); }