public void StageIsNotInvalidatedWhenAtLeastOneMutuallyExclusiveStageIsInvalidated(int totalExclusiveStages, int invalidations)
        {
            var previous  = 10.AsPipelineConstant();
            var exclusive = Enumerable.Range(0, totalExclusiveStages).Select(i => i.AsPipelineConstant()).ToArray();
            var sut       = new MutuallyExclusivePipelineStage <int>(previous, exclusive);
            var test      = sut.AttachTestStage();

            PipelineCore.Invalidate(new[] { previous }.Concat(exclusive.Take(invalidations)));
            test.AssertInvalidations(0);

            PipelineCore.Invalidate(new[] { sut }.Concat(exclusive.Take(invalidations)));
            test.AssertInvalidations(0);
        }
        public void StageIsInvalidatedWhenNoMutuallyExclusiveStagesAre()
        {
            var previous  = 10.AsPipelineConstant();
            var exclusive = 100.AsPipelineConstant();
            var sut       = new MutuallyExclusivePipelineStage <int>(previous, exclusive);
            var test      = sut.AttachTestStage();

            previous.Invalidate();
            test.AssertInvalidations(1);

            sut.Invalidate();
            test.AssertInvalidations(2);
        }