public void It_throws_exception_when_offset_is_less_than_count() { var collection = new SynchronizedObservableCollection <string>(new List <string> { "1", "2", "3" }); Assert.Throws <ArgumentException>(() => collection.CopyTo(new string[3], 1)); }
public void It_throws_exception_when_array_is_null() { var collection = new SynchronizedObservableCollection <string>(new List <string> { "1", "2", "3" }); Assert.Throws <ArgumentNullException>(() => collection.CopyTo(null, 0)); }
public void It_throws_exception_when_arrayIndex_is_greater_than_or_equal_to_array_length() { var collection = new SynchronizedObservableCollection <string>(new List <string> { "1", "2", "3" }); Assert.Throws <ArgumentException>(() => collection.CopyTo(new string[1], 1)); }
public void It_throws_exception_when_arrayIndex_is_less_than_zero() { var collection = new SynchronizedObservableCollection <string>(new List <string> { "1", "2", "3" }); Assert.Throws <ArgumentException>(() => collection.CopyTo(new string[1], -1)); }
public void It_copies_items_to_array() { var array = new string[3]; var collection = new SynchronizedObservableCollection <string>(new List <string> { "1", "2", "3" }); Assert.DoesNotThrow(() => collection.CopyTo(array, 0)); Assert.That(array.Length, Is.EqualTo(3)); Assert.That(array[0], Is.EqualTo("1")); Assert.That(array[1], Is.EqualTo("2")); Assert.That(array[2], Is.EqualTo("3")); }
public void CopyTo(IWuEndpoint[] array, int arrayIndex) => _endpoints.CopyTo(array, arrayIndex);
public void CopyTo(WuRemoteCallContext[] array, int arrayIndex) => _callHistory.CopyTo(array, arrayIndex);