public void InsertInWithUnknownInsertVertex() { var builder = new FixedScheduleBuilder(); var markHistoryVertex = builder.AddHistoryMarkingPoint(); Assert.Throws <UnknownScheduleVertexException>( () => builder.InsertIn(new InsertVertex(10), markHistoryVertex)); }
public void InsertInWithKnownVertexToInsert() { var builder = new FixedScheduleBuilder(); var insertVertex = builder.AddInsertPoint(); var markHistoryVertex = builder.AddHistoryMarkingPoint(); Assert.Throws <CannotInsertExistingVertexException>( () => builder.InsertIn(insertVertex, markHistoryVertex)); }
public void AddHistoryMarkingPoint() { var builder = new FixedScheduleBuilder(); var historyMarkingVertex = builder.AddHistoryMarkingPoint(); builder.LinkFromStart(historyMarkingVertex); builder.LinkToEnd(historyMarkingVertex); Assert.AreEqual(2, historyMarkingVertex.Index); var schedule = builder.Build(); Assert.AreEqual(3, schedule.Vertices.Count()); Assert.IsTrue(AreVerticesEqual(schedule.Start, schedule.Vertices.ElementAt(0))); Assert.IsTrue(AreVerticesEqual(historyMarkingVertex, schedule.Vertices.ElementAt(1))); Assert.IsTrue(AreVerticesEqual(schedule.End, schedule.Vertices.ElementAt(2))); }
public void AddHistoryMarkingPoint() { var builder = new FixedScheduleBuilder(); var historyMarkingVertex = builder.AddHistoryMarkingPoint(); builder.LinkFromStart(historyMarkingVertex); builder.LinkToEnd(historyMarkingVertex); Assert.AreEqual(2, historyMarkingVertex.Index); var schedule = builder.Build(); Assert.AreEqual(3, schedule.Vertices.Count()); Assert.IsTrue(AreVerticesEqual(schedule.Start, schedule.Vertices.ElementAt(0))); Assert.IsTrue(AreVerticesEqual(historyMarkingVertex, schedule.Vertices.ElementAt(1))); Assert.IsTrue(AreVerticesEqual(schedule.End, schedule.Vertices.ElementAt(2))); }
public void InsertInWithUnknownInsertVertex() { var builder = new FixedScheduleBuilder(); var markHistoryVertex = builder.AddHistoryMarkingPoint(); Assert.Throws<UnknownScheduleVertexException>( () => builder.InsertIn(new InsertVertex(10), markHistoryVertex)); }
public void InsertInWithKnownVertexToInsert() { var builder = new FixedScheduleBuilder(); var insertVertex = builder.AddInsertPoint(); var markHistoryVertex = builder.AddHistoryMarkingPoint(); Assert.Throws<CannotInsertExistingVertexException>( () => builder.InsertIn(insertVertex, markHistoryVertex)); }