Exemple #1
0
        public void CopyTo()
        {
            // Setup
            var sequence = InitializeSequence();
            var set      = new TestSet <SimpleType>(sequence);
            var array    = new SimpleType[4];

            // Execute
            set.CopyTo(array, 0);

            // Assert
            Assert.IsTrue(array.All(i => i != null));
            Assert.AreSame(sequence[0], array[0]);
            Assert.AreSame(sequence[1], array[1]);
            Assert.AreSame(sequence[2], array[2]);
            Assert.AreSame(sequence[3], array[3]);
        }
Exemple #2
0
        public void CopyTo()
        {
            // Setup
            var sequence = InitializeSequence();
            var set = new TestSet<SimpleType>(sequence);
            var array = new SimpleType[4];

            // Execute
            set.CopyTo(array, 0);

            // Assert
            Assert.IsTrue(array.All(i => i != null));
            Assert.AreSame(sequence[0], array[0]);
            Assert.AreSame(sequence[1], array[1]);
            Assert.AreSame(sequence[2], array[2]);
            Assert.AreSame(sequence[3], array[3]);
        }