コード例 #1
0
        public void RemovePersistentDistortQueue(IDistortionStage stage, IPersistentDistortionQueue queue)
        {
            if (stage == null)
            {
                throw new Yak2DException("Unable to remove persistent distortion draw queue, null draw stage provided");
            }

            if (queue == null)
            {
                throw new Yak2DException("Unable to remove persistent distortion draw queue, null queue provided");
            }

            RemovePersistentDistortQueue(stage.Id, queue.Id);
        }
コード例 #2
0
        public void Drawing_RemovePersistentDistortQueue_CatchNullQueue()
        {
            var messenger          = Substitute.For <IFrameworkMessenger>();
            var renderStageManager = Substitute.For <IRenderStageManager>();
            var renderStageVisitor = Substitute.For <IRenderStageVisitor>();
            var fontManager        = Substitute.For <IFontManager>();
            var gpuSurfaceManager  = Substitute.For <IGpuSurfaceManager>();

            IDrawing drawing = new Drawing(messenger,
                                           renderStageManager,
                                           renderStageVisitor,
                                           fontManager,
                                           gpuSurfaceManager);

            var stage = Substitute.For <IDistortionStage>();
            IPersistentDistortionQueue queue = null;

            Assert.Throws <Yak2DException>(() => { drawing.RemovePersistentDistortQueue(stage, queue); });
        }