Exemple #1
0
        public void InvalidationOfInputsInvalidatesStage()
        {
            var a    = PipelineTestHelper.Assignable(1);
            var sut  = new CollectingPipelineStage <int>("", new[] { a });
            var test = sut.AttachTestStage();

            a.Invalidate();
            test.AssertInvalidations(1);
        }
Exemple #2
0
        public void AddingSameInputAgainDoesNotInvalidateStage()
        {
            var a    = 1.AsPipelineConstant();
            var sut  = new CollectingPipelineStage <int>("", new[] { a });
            var test = sut.AttachTestStage();

            sut.AddInputs(new[] { a });

            test.AssertInvalidations(0);
        }
Exemple #3
0
        public void RemovingNonInputDoesNotInvalidateStage()
        {
            var a    = 1.AsPipelineConstant();
            var sut  = new CollectingPipelineStage <int>("", new[] { a });
            var test = sut.AttachTestStage();

            sut.RemoveInputs(new[] { 2.AsPipelineConstant() });

            test.AssertInvalidations(0);
        }
Exemple #4
0
        public void AddingInputInvalidatesStage()
        {
            var a    = 1.AsPipelineConstant();
            var sut  = new CollectingPipelineStage <int>("", new[] { a });
            var test = sut.AttachTestStage();

            sut.AddInputs(new[] { 2.AsPipelineConstant() });

            test.AssertInvalidations(1);
        }
Exemple #5
0
        public void InvalidationOfRemovedInputDoesNotInvalidateTheStage()
        {
            var a   = PipelineTestHelper.Assignable(1);
            var sut = new CollectingPipelineStage <int>("", new[] { a });

            sut.RemoveDependencies(new[] { a });
            var test = sut.AttachTestStage();

            a.Invalidate();
            test.AssertInvalidations(0);
        }