private (Maybe <Timetable> item, IEnumerable <Message> messages) GetTestTimetable(string name)
        {
            var(item, messages) = GetLayout(name);
            if (item.IsNone)
            {
                return(Maybe <Timetable> .None("Layout does not exist."), messages);
            }
            var result = new Timetable(name, item.Value);

            result.AddTrain(TestDataFactory.CreateTrain1());
            result.AddTrain(TestDataFactory.CreateTrain2());
            return(Maybe <Timetable> .Item(result), messages);
        }
        public void EqualsWorks()
        {
            TestDataFactory.Init();
            var station = TestDataFactory.CreateStation1();
            var train   = TestDataFactory.CreateTrain1();
            var one     = new StationCall(station.Tracks.First(), new Time(12, 00), new Time(12, 00))
            {
                Train = train
            };
            var another = new StationCall(station.Tracks.First(), new Time(12, 00), new Time(12, 00))
            {
                Train = train
            };

            Assert.AreEqual(one, another);
        }
 public void TestInitialize()
 {
     TestDataFactory.Init();
     Train = TestDataFactory.CreateTrain1();
 }