예제 #1
0
        public void When_node_added_is_processed_on_next_tick()
        {
            AddEntitiesToListEntityList(9);
            processor = new TickableProcessorSpy(repository, deltaSecondsProvider);
            processor.Tick();
            Assert.That(processor.ProcessedNodes.Count, Is.EqualTo(9));

            processor.ClearTest();
            AddEntitiesToListEntityList(2);
            processor.Tick();
            Assert.That(processor.ProcessedNodes.Count, Is.EqualTo(11));
        }
예제 #2
0
        public void When_node_removed_is_not_processed_on_next_tick()
        {
            AddEntitiesToListEntityList(9);
            processor = new TickableProcessorSpy(repository, deltaSecondsProvider);
            processor.Tick();
            Assert.That(processor.ProcessedNodes.Count, Is.EqualTo(9));

            processor.ClearTest();
            entityList.RemoveEntity(entityList[0].entity);
            entityList.RemoveEntity(entityList[0].entity);
            processor.Tick();

            Assert.That(processor.ProcessedNodes.Count, Is.EqualTo(7));
        }