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

            SynchronizationStartVertex startVertex = null;
            var scheduleBuilder = new Mock <IBuildFixedSchedules>();
            {
                scheduleBuilder.Setup(s => s.AddSynchronizationEnd(It.IsAny <SynchronizationStartVertex>()))
                .Callback <SynchronizationStartVertex>(s => startVertex = s)
                .Returns <SynchronizationStartVertex>(s => new SynchronizationEndVertex(0));
            }

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

            var inputVertex = new SynchronizationStartVertex(
                0,
                new List <IScheduleVariable> {
                new Mock <IScheduleVariable>().Object
            });
            var vertex = builder.AddSynchronizationEnd(inputVertex);

            Assert.IsNotNull(vertex);
            Assert.AreSame(inputVertex, startVertex);
        }
        public void AddSynchronizationEndPoint()
        {
            var owner = new Mock<IOwnScheduleDefinitions>();

            SynchronizationStartVertex startVertex = null;
            var scheduleBuilder = new Mock<IBuildFixedSchedules>();
            {
                scheduleBuilder.Setup(s => s.AddSynchronizationEnd(It.IsAny<SynchronizationStartVertex>()))
                    .Callback<SynchronizationStartVertex>(s => startVertex = s)
                    .Returns<SynchronizationStartVertex>(s => new SynchronizationEndVertex(0));
            }

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

            var inputVertex = new SynchronizationStartVertex(
                0,
                new List<IScheduleVariable> { new Mock<IScheduleVariable>().Object });
            var vertex = builder.AddSynchronizationEnd(inputVertex);

            Assert.IsNotNull(vertex);
            Assert.AreSame(inputVertex, startVertex);
        }