public void CompareToOperatorWithEqualObjects() { var first = new ScheduleElementId(); object second = first.Clone(); Assert.AreEqual(0, first.CompareTo(second)); }
public void CompareToWithUnequalObjectTypes() { ScheduleElementId first = new ScheduleElementId(); object second = new object(); Assert.Throws <ArgumentException>(() => first.CompareTo(second)); }
public void Clone() { ScheduleElementId first = new ScheduleElementId(); ScheduleElementId second = first.Clone(); Assert.AreEqual(first, second); }
public void CompareToWithNullObject() { ScheduleElementId first = new ScheduleElementId(); object second = null; Assert.AreEqual(1, first.CompareTo(second)); }
public void SmallerThanOperatorWithEqualObjects() { var first = new ScheduleElementId(); var second = first.Clone(); Assert.IsFalse(first < second); }
public void SmallerThanOperatorWithBothObjectsNull() { ScheduleElementId first = null; ScheduleElementId second = null; Assert.IsFalse(first < second); }
public void SmallerThanOperatorWithSecondObjectNull() { ScheduleElementId first = new ScheduleElementId(); ScheduleElementId second = null; Assert.IsFalse(first < second); }
public void LargerThanOperatorWithSecondObjectNull() { ScheduleElementId first = new ScheduleElementId(); ScheduleElementId second = null; Assert.IsTrue(first > second); }
/// <summary> /// Initializes a new instance of the <see cref="ExecutingActionVertex"/> class. /// </summary> /// <param name="index">The index of the vertex in the graph.</param> /// <param name="actionToExecute">The ID of the action that should be executed.</param> public ExecutingActionVertex(int index, ScheduleElementId actionToExecute) { { Debug.Assert(actionToExecute != null, "The ID of the action should not be a null reference."); } Index = index; m_Action = actionToExecute; }
public void Create() { var index = 10; var actionId = new ScheduleElementId(); var vertex = new ExecutingActionVertex(index, actionId); Assert.AreEqual(index, vertex.Index); Assert.AreSame(actionId, vertex.ActionToExecute); }