Ejemplo n.º 1
0
 protected override void RegisterTests()
 {
     base.RegisterTests();
     FrameGameSystem.DrawOrder = -1;
     FrameGameSystem.Draw(Draw0).TakeScreenshot();
     FrameGameSystem.Draw(Draw1).TakeScreenshot();
     FrameGameSystem.Draw(Draw2).TakeScreenshot();
     FrameGameSystem.Draw(Draw3).TakeScreenshot();
     FrameGameSystem.Draw(Draw4).TakeScreenshot();
     FrameGameSystem.Draw(Draw5).TakeScreenshot();
     FrameGameSystem.Draw(Draw6).TakeScreenshot();
     FrameGameSystem.Draw(Draw7).TakeScreenshot();
     FrameGameSystem.Draw(Draw8).TakeScreenshot();
     FrameGameSystem.Draw(Draw9).TakeScreenshot();
 }
Ejemplo n.º 2
0
 protected override void RegisterTests()
 {
     base.RegisterTests();
     FrameGameSystem.DrawOrder = -1;
     FrameGameSystem.TakeScreenshot(5); // skip some frames in order to be sure that the picking will work
     FrameGameSystem.Draw(Draw1).TakeScreenshot();
     FrameGameSystem.Draw(Draw2).TakeScreenshot();
     FrameGameSystem.Draw(Draw3).TakeScreenshot();
     FrameGameSystem.Draw(Draw4).TakeScreenshot();
     FrameGameSystem.Draw(Draw5).TakeScreenshot();
     FrameGameSystem.Draw(Draw6).TakeScreenshot();
     FrameGameSystem.Draw(Draw7).TakeScreenshot();
     FrameGameSystem.Draw(Draw8).TakeScreenshot();
     FrameGameSystem.Draw(Draw9).TakeScreenshot();
     FrameGameSystem.Draw(Draw10).TakeScreenshot();
     FrameGameSystem.Draw(Draw11).TakeScreenshot();
 }
Ejemplo n.º 3
0
        protected override void RegisterTests()
        {
            base.RegisterTests();

            FrameGameSystem.DrawOrder = -1;
            FrameGameSystem.Draw(DrawTest1).TakeScreenshot();
            FrameGameSystem.Draw(DrawTest2).TakeScreenshot();
            FrameGameSystem.Draw(DrawTest3).TakeScreenshot();
            FrameGameSystem.Draw(DrawTest4).TakeScreenshot();
            FrameGameSystem.Draw(DrawTest5).TakeScreenshot();
            FrameGameSystem.Draw(DrawTest6).TakeScreenshot();
            FrameGameSystem.Draw(DrawTest7).TakeScreenshot();
            FrameGameSystem.Draw(DrawTest8).TakeScreenshot();
            FrameGameSystem.Draw(DrawTest9).TakeScreenshot();
            FrameGameSystem.Draw(DrawTest10).TakeScreenshot();
            FrameGameSystem.Draw(DrawTest11).TakeScreenshot();
        }
Ejemplo n.º 4
0
        protected override void RegisterTests()
        {
            base.RegisterTests();

            FrameGameSystem.DrawOrder = -1;

            //FrameGameSystem.Update(() => SetCurrentContent(stackPanel1));
            //TakeSequenceOfScreenShots();

            //FrameGameSystem.Update(() => SetCurrentContent(stackPanel2));
            //TakeSequenceOfScreenShots();

            FrameGameSystem.Update(() => SetCurrentContent(stackPanel3));
            TakeSequenceOfScreenShots();

            //FrameGameSystem.Update(() => SetCurrentContent(stackPanel4));
            //FrameGameSystem.TakeScreenshot();
        }
Ejemplo n.º 5
0
        protected override void RegisterTests()
        {
            base.RegisterTests();

            FrameGameSystem.DrawOrder = -1;
            FrameGameSystem.TakeScreenshot();
            FrameGameSystem.Draw(1, Test1);
            FrameGameSystem.Draw(2, PrepareTest2);
            FrameGameSystem.Draw(3, Test2);
            FrameGameSystem.Draw(4, PrepareTest3);
            FrameGameSystem.Draw(5, Test3);
            FrameGameSystem.Draw(6, PrepareTest4);
            FrameGameSystem.Draw(7, Test4);
            FrameGameSystem.Draw(8, PrepareTest5);
            FrameGameSystem.Draw(9, Test5);
            FrameGameSystem.Draw(10, PrepareTest6);
            FrameGameSystem.Draw(11, Test6);
            FrameGameSystem.Draw(12, Draw1).TakeScreenshot(12);
            FrameGameSystem.Draw(13, Draw2).TakeScreenshot(13);
        }
Ejemplo n.º 6
0
        protected override void RegisterTests()
        {
            base.RegisterTests();

            // Initial frame (no anim
            FrameGameSystem.Draw(() => { }).TakeScreenshot();

            FrameGameSystem.Draw(() =>
            {
                // T = 0
                var playingAnimation     = knight.Get <AnimationComponent>().Play("Run");
                playingAnimation.Enabled = false;
            }).TakeScreenshot();

            FrameGameSystem.Draw(() =>
            {
                // T = 0.5sec
                var playingAnimation         = knight.Get <AnimationComponent>().PlayingAnimations.First();
                playingAnimation.CurrentTime = TimeSpan.FromSeconds(0.5f);
            }).TakeScreenshot();

            FrameGameSystem.Draw(() =>
            {
                // Blend with Idle (both weighted 1.0f)
                var playingAnimation     = knight.Get <AnimationComponent>().Blend("Idle", 1.0f, TimeSpan.Zero);
                playingAnimation.Enabled = false;
            }).TakeScreenshot();

            FrameGameSystem.Draw(() =>
            {
                // Update the model itself
                knight.Get <AnimationComponent>().Play("ChangeModel1");
            }).TakeScreenshot();

            FrameGameSystem.Draw(() =>
            {
                // Update the model itself (blend it at 2 vs 1 to force it to be active directly)
                var playingAnimation     = knight.Get <AnimationComponent>().Blend("ChangeModel2", 2.0f, TimeSpan.Zero);
                playingAnimation.Enabled = false;
            }).TakeScreenshot();
        }
Ejemplo n.º 7
0
 protected override void RegisterTests()
 {
     base.RegisterTests();
     FrameGameSystem.TakeScreenshot(2);
 }
Ejemplo n.º 8
0
        protected override void RegisterTests()
        {
            base.RegisterTests();

            FrameGameSystem.Draw(RenderToTexture).TakeScreenshot();
        }
Ejemplo n.º 9
0
        protected override void RegisterTests()
        {
            base.RegisterTests();

            FrameGameSystem.Draw(DrawSpriteFont).TakeScreenshot();
        }
Ejemplo n.º 10
0
        protected override void RegisterTests()
        {
            base.RegisterTests();

            FrameGameSystem.Draw(DrawTextureSampling).TakeScreenshot();
        }
Ejemplo n.º 11
0
        protected override void RegisterTests()
        {
            base.RegisterTests();

            FrameGameSystem.Draw(DrawCustomEffect).TakeScreenshot();
        }
Ejemplo n.º 12
0
        private void TakeSubSequenceOfScreenShots(bool invalidateStackPanel)
        {
            // test scrolling functions with no arrangement invalidation
            if (invalidateStackPanel)
            {
                FrameGameSystem.Update(InvalidateStackPanel);
            }
            FrameGameSystem.Update(ScrollToFixedElementMiddle).TakeScreenshot();

            if (invalidateStackPanel)
            {
                FrameGameSystem.Update(InvalidateStackPanel);
            }
            FrameGameSystem.Update(() => currentStackPanel.ScrollToNextLine()).TakeScreenshot();
            if (invalidateStackPanel)
            {
                FrameGameSystem.Update(InvalidateStackPanel);
            }
            FrameGameSystem.Update(() => currentStackPanel.ScrollToPreviousLine()).TakeScreenshot();

            FrameGameSystem.Update(ScrollToFixedElementMiddle);
            if (invalidateStackPanel)
            {
                FrameGameSystem.Update(InvalidateStackPanel);
            }
            FrameGameSystem.Update(() => currentStackPanel.ScrollToPreviousLine()).TakeScreenshot();
            if (invalidateStackPanel)
            {
                FrameGameSystem.Update(InvalidateStackPanel);
            }
            FrameGameSystem.Update(() => currentStackPanel.ScrollToNextLine()).TakeScreenshot();

            FrameGameSystem.Update(ScrollToFixedElementMiddle);
            if (invalidateStackPanel)
            {
                FrameGameSystem.Update(InvalidateStackPanel);
            }
            FrameGameSystem.Update(() => currentStackPanel.ScrollToNextPage()).TakeScreenshot();
            if (invalidateStackPanel)
            {
                FrameGameSystem.Update(InvalidateStackPanel);
            }
            FrameGameSystem.Update(() => currentStackPanel.ScrollToPreviousPage()).TakeScreenshot();

            FrameGameSystem.Update(ScrollToFixedElementMiddle);
            if (invalidateStackPanel)
            {
                FrameGameSystem.Update(InvalidateStackPanel);
            }
            FrameGameSystem.Update(() => currentStackPanel.ScrollToPreviousPage()).TakeScreenshot();
            if (invalidateStackPanel)
            {
                FrameGameSystem.Update(InvalidateStackPanel);
            }
            FrameGameSystem.Update(() => currentStackPanel.ScrollToNextPage()).TakeScreenshot();

            FrameGameSystem.Update(ScrollToFixedElementMiddle);
            if (invalidateStackPanel)
            {
                FrameGameSystem.Update(InvalidateStackPanel);
            }
            FrameGameSystem.Update(() => currentStackPanel.ScrollToBeginning()).TakeScreenshot();
            if (invalidateStackPanel)
            {
                FrameGameSystem.Update(InvalidateStackPanel);
            }
            FrameGameSystem.Update(() => currentStackPanel.ScrollToEnd()).TakeScreenshot();
        }