public void AddInsertPointWithCount()
        {
            var owner = new Mock <IOwnScheduleDefinitions>();

            var scheduleBuilder = new Mock <IBuildFixedSchedules>();
            {
                scheduleBuilder.Setup(s => s.AddInsertPoint(It.IsAny <int>()))
                .Returns <int>(i => new InsertVertex(0, i));
            }

            var builder = new ScheduleDefinitionBuilder(owner.Object, scheduleBuilder.Object);
            var vertex  = builder.AddInsertPoint(10);

            Assert.AreEqual(10, vertex.RemainingInserts);
        }
        public void AddInsertPoint()
        {
            var owner = new Mock <IOwnScheduleDefinitions>();

            var insertVertex    = new InsertVertex(0);
            var scheduleBuilder = new Mock <IBuildFixedSchedules>();
            {
                scheduleBuilder.Setup(s => s.AddInsertPoint())
                .Returns(insertVertex);
            }

            var builder = new ScheduleDefinitionBuilder(owner.Object, scheduleBuilder.Object);
            var vertex  = builder.AddInsertPoint();

            Assert.AreSame(insertVertex, vertex);
        }
        public void AddInsertPointWithCount()
        {
            var owner = new Mock<IOwnScheduleDefinitions>();

            var scheduleBuilder = new Mock<IBuildFixedSchedules>();
            {
                scheduleBuilder.Setup(s => s.AddInsertPoint(It.IsAny<int>()))
                    .Returns<int>(i => new InsertVertex(0, i));
            }

            var builder = new ScheduleDefinitionBuilder(owner.Object, scheduleBuilder.Object);
            var vertex = builder.AddInsertPoint(10);
            Assert.AreEqual(10, vertex.RemainingInserts);
        }
        public void AddInsertPoint()
        {
            var owner = new Mock<IOwnScheduleDefinitions>();

            var insertVertex = new InsertVertex(0);
            var scheduleBuilder = new Mock<IBuildFixedSchedules>();
            {
                scheduleBuilder.Setup(s => s.AddInsertPoint())
                    .Returns(insertVertex);
            }

            var builder = new ScheduleDefinitionBuilder(owner.Object, scheduleBuilder.Object);
            var vertex = builder.AddInsertPoint();

            Assert.AreSame(insertVertex, vertex);
        }