public void ArrivalAfterDepartureThrows()
        {
            var track  = TestDataFactory.CreateStationTrack();
            var target = new StationCall(track, new Time(12, 00), new Time(11, 59));

            Train.Add(target);
            var validationErrors = target.GetValidationErrors();

            Assert.AreEqual(1, validationErrors.Count());
            Assert.IsFalse(validationErrors.Any(ve => string.IsNullOrWhiteSpace(ve.Text)));
        }
示例#2
0
 public void TestInitialize()
 {
     Target = TestDataFactory.CreateStationTrack();
     Train1 = new Train("1234")
     {
         Category = "Godståg"
     };
     Train2 = new Train("22")
     {
         Category = "Persontåg"
     };
 }
        public void DepartureIsNullThrows()
        {
            var track = TestDataFactory.CreateStationTrack();

            Assert.ThrowsException <ArgumentNullException>(() => new StationCall(track, new Time(12, 00), null));
        }