public void AddExecutingAction() { var actionId = new ScheduleElementId(); var builder = new FixedScheduleBuilder(); var actionVertex = builder.AddExecutingAction(actionId); builder.LinkFromStart(actionVertex); builder.LinkToEnd(actionVertex); Assert.AreEqual(actionId, actionVertex.ActionToExecute); Assert.AreEqual(2, actionVertex.Index); var schedule = builder.Build(); Assert.AreEqual(3, schedule.Vertices.Count()); Assert.IsTrue(AreVerticesEqual(schedule.Start, schedule.Vertices.ElementAt(0))); Assert.IsTrue(AreVerticesEqual(actionVertex, schedule.Vertices.ElementAt(1))); Assert.IsTrue(AreVerticesEqual(schedule.End, schedule.Vertices.ElementAt(2))); }
public void AddExecutingAction() { var actionId = new ScheduleElementId(); var builder = new FixedScheduleBuilder(); var actionVertex = builder.AddExecutingAction(actionId); builder.LinkFromStart(actionVertex); builder.LinkToEnd(actionVertex); Assert.AreEqual(actionId, actionVertex.ActionToExecute); Assert.AreEqual(2, actionVertex.Index); var schedule = builder.Build(); Assert.AreEqual(3, schedule.Vertices.Count()); Assert.IsTrue(AreVerticesEqual(schedule.Start, schedule.Vertices.ElementAt(0))); Assert.IsTrue(AreVerticesEqual(actionVertex, schedule.Vertices.ElementAt(1))); Assert.IsTrue(AreVerticesEqual(schedule.End, schedule.Vertices.ElementAt(2))); }