Beispiel #1
0
 /// <summary>
 /// Tests that <see cref="IListExtensions.AddRange"/> returns the expected results.
 /// </summary>
 /// <param name="testListA">The primary list.</param>
 /// <param name="testListB">The secondary list.</param>
 /// <param name="expectedResult">The expected result.</param>
 private void TestAddRangeReturnsExpectedResults <T>(IList <T> testListA, IEnumerable <T> testListB, IEnumerable expectedResult)
 {
     IListExtensions.AddRange(testListA, testListB);
     Assert.Equal(expectedResult, testListA);
 }
Beispiel #2
0
 public void AddRangeThrowsExpectedException()
 {
     Assert.Throws <ArgumentNullException>(() => IListExtensions.AddRange(null !, new int[] { }));
     Assert.Throws <ArgumentNullException>(() => IListExtensions.AddRange(new int[] { }, null !));
     Assert.Throws <ArgumentNullException>(() => IListExtensions.AddRange <int>(null !, null !));
 }