Ejemplo n.º 1
0
        public void Resume_Pipeline_Resumed()
        {
            var animation = Substitute.For <IAnimation <Transform> >();
            var pipeline  = AnimationPipeline <Transform> .Create(animation);

            var target = new AnimationPipelineController <Transform>(pipeline);

            target.Resume();

            animation.Received().Resume();
        }
Ejemplo n.º 2
0
        public void Destroy_Pipeline_Destroyed()
        {
            var ctx = Substitute.For <IWorldContext>();

            ctx.LogSystem.Returns(Substitute.For <ILogSystem>());
            var animation = new FloatAnimation <Transform>(new Transform(ctx), 0, 1, 1, v => { });

            var pipeline = AnimationPipeline <Transform> .Create(animation);

            var target = new AnimationPipelineController <Transform>(pipeline);

            target.Destroy();

            Assert.AreEqual(AnimationState.Stopped, pipeline.State);

            target.Pause();
            target.Resume();
        }