Пример #1
0
        public void AddRange_EmptyCollection_NothingAdded()
        {
            var list = new List <string>();

            IListTExtensions.AddRange(list, new List <string>());

            Assert.That(list, Is.Empty);
        }
Пример #2
0
        public void AddRange_CollectionPassed_AllValuesAdded()
        {
            var list = new List <int>();

            IListTExtensions.AddRange(list, new[] { 5, 2, 8 });

            Assert.That(list, Is.EquivalentTo(new[] { 5, 2, 8 }));
        }
Пример #3
0
 public void AddRange_RangeIsNull_Throws()
 {
     Assert.Throws <ArgumentNullException>(() => IListTExtensions.AddRange(new List <string>(), null));
 }