Esempio n. 1
0
    void assertContains(params TestEntity[] expectedEntities)
    {
        _groupA.count.should_be(expectedEntities.Length);

        var entities = _groupA.GetEntities();

        entities.Length.should_be(expectedEntities.Length);

        foreach (var e in expectedEntities)
        {
            entities.should_contain(e);
            _groupA.ContainsEntity(e).should_be_true();
        }
    }
Esempio n. 2
0
        public void Execute()
        {
            var temp = _buffer;

            _buffer            = _messagesCollector;
            _messagesCollector = temp;

            foreach (var pair in _buffer)
            {
                var entity = pair.Key;
                if (!_group.ContainsEntity(entity))
                {
                    continue;
                }

                foreach (var message in pair.Value)
                {
                    Execute(message, entity);
                }
            }

            _buffer.Clear();
        }
 public void InitialGroupDoesNotContainEntity()
 {
     Assert.IsFalse(_groupA.ContainsEntity(_entityWithAComponent1));
 }