Ejemplo n.º 1
0
            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));
            }
Ejemplo n.º 2
0
            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));
            }
Ejemplo n.º 3
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));
            }
Ejemplo n.º 4
0
            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));
            }
Ejemplo n.º 5
0
            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"));
            }
Ejemplo n.º 6
0
 public void CopyTo(IWuEndpoint[] array, int arrayIndex) => _endpoints.CopyTo(array, arrayIndex);
Ejemplo n.º 7
0
 public void CopyTo(WuRemoteCallContext[] array, int arrayIndex) => _callHistory.CopyTo(array, arrayIndex);