public void TrainTimeClassCopyMethodReturnsObjectWithCorrectNumberOfFootnotes() { TrainTime testObject = TrainTimeHelpers.GetTrainTime(); TrainTime testOutput = testObject.Copy(); Assert.AreEqual(testOutput.Footnotes.Count, testObject.Footnotes.Count); }
public void TrainTimeClassCopyMethodReturnsObjectWithTimePropertyWithCorrectValueIfTimePropertyIsNotNull() { TrainTime testObject = TrainTimeHelpers.GetTrainTime(); TrainTime testOutput = testObject.Copy(); Assert.AreEqual(testObject.Time, testOutput.Time); }
public void TrainTimeClassCopyMethodReturnsObjectWithTimePropertyThatIsDifferentObjectIfTimePropertyIsNotNull() { TrainTime testObject = TrainTimeHelpers.GetTrainTime(); TrainTime testOutput = testObject.Copy(); Assert.AreNotSame(testObject.Time, testOutput.Time); }
public void TrainTimeClassCopyMethodReturnsDifferentObject() { TrainTime testObject = TrainTimeHelpers.GetTrainTime(); TrainTime testOutput = testObject.Copy(); Assert.AreNotSame(testObject, testOutput); }
public void TrainTimeClassCopyMethodReturnsObjectIfTimePropertyIsNull() { TrainTime testObject = TrainTimeHelpers.GetTrainTime(); testObject.Time = null; TrainTime testOutput = testObject.Copy(); Assert.IsNull(testOutput.Time); }
public void TrainTimeClassCopyMethodReturnsObjectWithFootnotesPropertyWithSameContents() { TrainTime testObject = TrainTimeHelpers.GetTrainTime(); TrainTime testOutput = testObject.Copy(); for (int i = 0; i < testOutput.Footnotes.Count; ++i) { Assert.AreSame(testObject.Footnotes[i], testOutput.Footnotes[i]); } }