Example #1
0
        public void UpdateBreaksBiggerUpdatesIntoMultiplePieces()
        {
            var system = new IntegerSystem();
            var state  = new CobaltState(new ISystem[] { system });

            state.Update(CobaltState.MaxUpdatePerTickSeconds * 3);
            Assert.That(system.NumUpdates, Is.EqualTo(3));
        }
Example #2
0
        public void UpdateCallsUpdateOnAllSystems()
        {
            var system = new IntegerSystem();
            var state  = new CobaltState(new ISystem[] { system });

            state.Update(CobaltState.MaxUpdatePerTickSeconds / 2);
            Assert.That(system.NumUpdates, Is.EqualTo(1));
        }