Ejemplo n.º 1
0
        public void SignalboxCollectionClassCopyMethodReturnsDifferentObject()
        {
            List <Signalbox>    testData         = SignalboxHelpers.GetSignalboxList(0, 64);
            SignalboxCollection sourceCollection = new SignalboxCollection(testData);

            SignalboxCollection testCollection = sourceCollection.Copy();

            Assert.AreNotSame(testCollection, sourceCollection);
        }
Ejemplo n.º 2
0
        public void SignalboxCollectionClassCopyMethodReturnsCollectionOfCorrectSize()
        {
            List <Signalbox>    testData         = SignalboxHelpers.GetSignalboxList(0, 64);
            SignalboxCollection sourceCollection = new SignalboxCollection(testData);

            SignalboxCollection testCollection = sourceCollection.Copy();

            Assert.AreEqual(sourceCollection.Count, testCollection.Count);
        }
Ejemplo n.º 3
0
        public void SignalboxCollectionClassCopyMethodReturnsCollectionWhoseContentsHaveCorrectCodeProperties()
        {
            List <Signalbox>    testData         = SignalboxHelpers.GetSignalboxList(0, 64);
            SignalboxCollection sourceCollection = new SignalboxCollection(testData);

            SignalboxCollection testCollection = sourceCollection.Copy();

            for (int i = 0; i < sourceCollection.Count; ++i)
            {
                Assert.AreEqual(sourceCollection[i].Code, testCollection[i].Code);
            }
        }
Ejemplo n.º 4
0
        public void SignalboxCollectionClassCopyMethodReturnsCollectionWhoseContentsAreDifferentObjects()
        {
            List <Signalbox>    testData         = SignalboxHelpers.GetSignalboxList(0, 64);
            SignalboxCollection sourceCollection = new SignalboxCollection(testData);

            SignalboxCollection testCollection = sourceCollection.Copy();

            for (int i = 0; i < sourceCollection.Count; ++i)
            {
                Assert.AreNotSame(sourceCollection[i], testCollection[i]);
            }
        }