Example #1
0
        public void ProcessAnimations_ShouldNotAdvancePositionOfSpriteAnimationComponent_WhenThereIsNoCurrentAnimation()
        {
            // Arrange
            var builder = new AnimationSceneBuilder();
            var spriteAnimationComponent = builder.AddSpriteAnimationComponent();

            spriteAnimationComponent.AddAnimation("anim", CreateAnimation(TimeSpan.FromMilliseconds(20)));

            var scene = builder.Build();

            // Assume
            Assume.That(spriteAnimationComponent.Position, Is.Zero);

            // Act
            _animationSystem.ProcessAnimations(scene, new GameTime(TimeSpan.FromMilliseconds(10)));

            // Assert
            Assert.That(spriteAnimationComponent.Position, Is.Zero);
        }