Example #1
0
        public void InputIsAddedAsDependency()
        {
            var input = 10.AsPipelineConstant();
            var sut   = new EagerPipelineStage <int>(input);

            PipelineAssert.DependentOn(sut, input);
        }
Example #2
0
        public void EagerStageCausesRetrievalOnInvalidate()
        {
            var input = 1.AsPipelineConstant();
            var test  = input.AttachTestStage();
            var sut   = new EagerPipelineStage <int>(test);

            input.Invalidate();
            test.AssertInvalidationsAndRetrievals(1, 1);

            input.Invalidate();
            input.Invalidate();
            input.Invalidate();
            test.AssertInvalidationsAndRetrievals(4, 4);

            GC.KeepAlive(sut); // To keep the GC from collecting the eager stage, as it is not used.
        }
Example #3
0
        public void EagerStagePassesThroughValue(int i)
        {
            var sut = new EagerPipelineStage <int>(i.AsPipelineConstant());

            PipelineAssert.Value(sut, i);
        }