示例#1
0
        public void RemoveTrainFromListTest_bad()
        {
            ITrain train    = new TrainStub();
            bool   expected = false;
            bool   actual;

            actual = m_ctcAccessor.RemoveTrainFromList(train);
            Assert.AreEqual(expected, actual);
        }
示例#2
0
        public void AddTrainToListTest()
        {
            ITrain train    = new TrainStub();
            bool   expected = true;
            bool   actual;

            actual = m_ctcAccessor.AddTrainToList(train);
            Assert.AreEqual(expected, actual);
        }
示例#3
0
        public void OnTrainClickedTest()
        {
            MainScreen_Accessor target = new MainScreen_Accessor();
            ITrain train = new TrainStub();

            target.OnTrainClicked(train);
            Assert.AreEqual(train, target.m_selectedTrain);
            Assert.IsNull(target.m_selectedTrackBlock);
            Assert.AreEqual(0, target.m_openPopups.Count);
        }
示例#4
0
        public void GetTrainListTest()
        {
            ITrain test = new TrainStub();

            m_ctcAccessor.AddTrainToList(test);
            List <ITrain> actual = m_ctcAccessor.GetTrainList();

            Assert.IsNotNull(actual);
            Assert.AreEqual(1, actual.Count);
        }
示例#5
0
        public void RemoveTrainFromListTest()
        {
            ITrain train = new TrainStub();

            m_ctcAccessor.AddTrainToList(train);
            bool expected = true;
            bool actual;

            actual = m_ctcAccessor.RemoveTrainFromList(train);
            Assert.AreEqual(expected, actual);
            Assert.IsFalse(m_ctcAccessor.m_trainList.Contains(train));
        }