コード例 #1
0
        public void Pause_Pipeline_Paused()
        {
            var animation = Substitute.For <IAnimation <Transform> >();
            var pipeline  = AnimationPipeline <Transform> .Create(animation);

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

            target.Pause();

            animation.Received().Pause();
        }
コード例 #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();
        }