Beispiel #1
0
        public void GivenLazyListWhenCopyToShouldLoad()
        {
            _lazyLoadResolverMock.Setup(x => x.Resolve(It.IsAny <LazyLoadParameter>()))
            .Returns(new[] { new Stub(), new Stub() })
            .Verifiable();

            var lazyList = new LazyList <Stub>(_lazyLoadResolverMock.Object);
            var list     = new Stub[2];

            lazyList.CopyTo(list, 0);

            list.Should().HaveCount(2);
            _lazyLoadResolverMock.VerifyAll();
        }
Beispiel #2
0
        public void CopyToShouldCopyAllElements()
        {
            MockEnumerable source = new MockEnumerable(3);
            var            list   = new LazyList <int>(source);

            var copy = new int[4];

            list.CopyTo(copy, 1);

            Assert.AreEqual(0, copy[1]);
            Assert.AreEqual(1, copy[2]);
            Assert.AreEqual(2, copy[3]);
            Assert.AreEqual(3, source.TotalElementsReturned, "Should have read exactly the necessary number of elements.");
        }
Beispiel #3
0
 /// <inheritdoc/>
 public void CopyTo(Local[] array, int arrayIndex)
 {
     locals.CopyTo(array, arrayIndex);
 }
Beispiel #4
0
 public void CopyTo(CodedValue[] array, int arrayIndex)
 {
     m_items.CopyTo(array, arrayIndex);
 }
Beispiel #5
0
 public void CopyTo(ExerciseSegment[] array, int arrayIndex)
 {
     m_items.CopyTo(array, arrayIndex);
 }
 public void CopyTo(VersionInformation[] array, int arrayIndex)
 {
     m_items.CopyTo(array, arrayIndex);
 }
 public void CopyTo(string[] array, int arrayIndex)
 {
     m_items.CopyTo(array, arrayIndex);
 }
Beispiel #8
0
 public void CopyTo(Blob[] array, int arrayIndex)
 {
     m_items.CopyTo(array, arrayIndex);
 }
 public void CopyTo(ItemFilter[] array, int arrayIndex)
 {
     m_items.CopyTo(array, arrayIndex);
 }
Beispiel #10
0
 public void CopyTo(StructuredNameValue[] array, int arrayIndex)
 {
     m_items.CopyTo(array, arrayIndex);
 }
Beispiel #11
0
 public void CopyTo(object[] array, int arrayIndex)
 {
     m_items.CopyTo(array, arrayIndex);
 }