public void Process_WithNewBaseLayoutItemNull_DoesNotCallValidator()
        {
            // Arrange
            var item = MasterFakesFactory.CreateFakeItem();
            var args = new SaveBaseLayoutArgs(item);
            var validator = Substitute.For<IBaseLayoutValidator>();
            var processor = new CheckForCircularReference(validator);

            // Act
            processor.Process(args);

            // Assert
            validator.DidNotReceive().CreatesCircularBaseLayoutReference(Arg.Any<Item>(), Arg.Any<Item>());
        }
        public void Process_WhenValidatorReturnsFalse_DoesNotAbortPipeline()
        {
            // Arrange
            var item = MasterFakesFactory.CreateFakeItem();
            var item2 = MasterFakesFactory.CreateFakeItem();
            var args = new SaveBaseLayoutArgs(item) {NewBaseLayoutItem = item2};
            var validator = Substitute.For<IBaseLayoutValidator>();
            validator.CreatesCircularBaseLayoutReference(Arg.Any<Item>(), Arg.Any<Item>()).Returns(false);
            var processor = new CheckForCircularReference(validator);

            // Act
            processor.Process(args);

            // Assert
            Assert.False(args.Aborted);
        }