Ejemplo n.º 1
0
        public void ListOfInts()
        {
            List <int> source = RandGen.GenerateIntList(1000);

            var dest = GetClone(source, 1);

            Assert.NotNull(dest);
            Assert.Equal(dest.Count, source.Count);

            for (int i = 0; i < dest.Count; i++)
            {
                Assert.Equal(dest[i], source[i]);
            }

            source.Clear();

            Assert.NotEqual(source.Count, dest.Count);
        }
Ejemplo n.º 2
0
        public void Setup()
        {
            _int = RandGen.GenerateInt();

            _string = RandGen.GenerateString(100);

            _listOfStrings = RandGen.GenerateStringList(1000, 5);

            _listOfBytes = RandGen
                           .GenerateByteArray(100000000)
                           .ToList();

            _listOfInts = RandGen.GenerateIntList(1000);

            _listOfTimeSpans = new List <TimeSpan>()
            {
                new TimeSpan(0),
                new TimeSpan(1),
                new TimeSpan(2),
                new TimeSpan(3),
                new TimeSpan(4),
                new TimeSpan(5),
                new TimeSpan(6),
                new TimeSpan(7),
                new TimeSpan(8),
                new TimeSpan(9),
            };

            _listOfDateTimes = new List <DateTime>()
            {
                DateTime.Now,
                DateTime.Now,
                DateTime.Now,
                DateTime.Now,
                DateTime.Now,
                DateTime.Now,
                DateTime.Now,
                DateTime.Now,
                DateTime.Now,
                DateTime.Now,
            };

            Func <string> func = () =>
            {
                return(string.Empty);
            };

            _listOfDelegates = new List <Func <string> >()
            {
                func,
                func,
                func,
                func,
                func,
                func,
                func,
                func,
                func,
                func,
            };
        }