public void CacheNotUpdatedWhenAttemptingToRemoveEntityThatWasNotPresentInGroup()
        {
            SetupCachedEntities();

            _entityWithAComponent2.RemoveComponentA();
            HandleSilently(_entityWithAComponent2);

            Assert.AreEqual(_entitiesCache, _groupA.GetEntities());
        }
Example #2
0
        public void ValidateThatCachedGroupDoesNotContainNonMatchingEntity()
        {
            SetupGroupEntities();

            var g = _defaultContext.GetGroup(matcherAB);

            eAB1.RemoveComponentA();

            Assert.False(g.GetEntities().Contains(eAB1));
        }
Example #3
0
 public void CannotRemoveNonExistentComponentFromEntity()
 {
     Assert.Throws <EntityDoesNotHaveComponentException>(() => _defaultEntity.RemoveComponentA());
 }
        public void GroupRemovesEntityIfNoLongerMatching()
        {
            _entityWithAComponent1.RemoveComponentA();

            HandleSilently(_entityWithAComponent1);

            AssertContainsNot(_entityWithAComponent1);
        }