示例#1
0
        public void TrainTimeClassCopyAndReflectMethodReturnsObjectWithCorrectNumberOfFootnotes()
        {
            TrainTime testObject = TrainTimeHelpers.GetTrainTime();
            TimeOfDay testParam0 = _rnd.NextTimeOfDay();

            TrainTime testOutput = testObject.CopyAndReflect(testParam0);

            Assert.AreEqual(testOutput.Footnotes.Count, testObject.Footnotes.Count);
        }
示例#2
0
        public void TrainTimeClassCopyAndReflectMethodReturnsObjectWithTimePropertyWithExpectedValueIfTimePropertyIsNotNull()
        {
            TrainTime testObject = TrainTimeHelpers.GetTrainTime();
            TimeOfDay testParam0 = _rnd.NextTimeOfDay();

            TrainTime testOutput = testObject.CopyAndReflect(testParam0);

            Assert.AreEqual(testObject.Time.CopyAndReflect(testParam0), testOutput.Time);
        }
示例#3
0
        public void TrainTimeClassCopyAndReflectMethodReturnsObjectWithTimePropertyThatIsDifferentObjectIfTimePropertyIsNotNull()
        {
            TrainTime testObject = TrainTimeHelpers.GetTrainTime();
            TimeOfDay testParam0 = _rnd.NextTimeOfDay();

            TrainTime testOutput = testObject.CopyAndReflect(testParam0);

            Assert.AreNotSame(testObject.Time, testOutput.Time);
        }
示例#4
0
        public void TrainTimeClassCopyAndReflectMethodReturnsDifferentObject()
        {
            TrainTime testObject = TrainTimeHelpers.GetTrainTime();
            TimeOfDay testParam0 = _rnd.NextTimeOfDay();

            TrainTime testOutput = testObject.CopyAndReflect(testParam0);

            Assert.AreNotSame(testObject, testOutput);
        }
示例#5
0
        public void TrainTimeClassCopyAndReflectMethodReturnsObjectIfTimePropertyIsNull()
        {
            TrainTime testObject = TrainTimeHelpers.GetTrainTime();

            testObject.Time = null;
            TimeOfDay testParam0 = _rnd.NextTimeOfDay();

            TrainTime testOutput = testObject.CopyAndReflect(testParam0);

            Assert.IsNull(testOutput.Time);
        }
示例#6
0
        public void TrainTimeClassCopyAndReflectMethodReturnsObjectWithFootnotesPropertyWithSameContents()
        {
            TrainTime testObject = TrainTimeHelpers.GetTrainTime();
            TimeOfDay testParam0 = _rnd.NextTimeOfDay();

            TrainTime testOutput = testObject.CopyAndReflect(testParam0);

            for (int i = 0; i < testOutput.Footnotes.Count; ++i)
            {
                Assert.AreSame(testObject.Footnotes[i], testOutput.Footnotes[i]);
            }
        }