public void DontRequestChildrenWhenCreatingObjectAndVerifyThatReadWasNotCalled()
        {
            // Arrange
            const int RootId   = 0;
            var       children = Fixture.CreateMany <int>(4).ToList();
            var       mock     = this.GetMockRepository(children);

            // Act
            var sut = new NodeWithLazyChildren <int>(RootId, children, mock.Object);

            // Arrange
            mock.Verify(m => m.Read(It.IsAny <int>()), Times.Never);
        }
        public void RequestChildrenOneTimesAndVerifyThatReadWasCalled()
        {
            // Arrange
            const int RootId      = 1;
            var       childrenIds = Fixture.CreateMany <int>(4).ToList();
            var       mock        = this.GetMockRepository(childrenIds);

            var sut = new NodeWithLazyChildren <int>(RootId, childrenIds, mock.Object);

            // Act
            var children = sut.Children;

            // Assert
            mock.Verify(m => m.Read(It.IsAny <int>()), Times.Exactly(childrenIds.Count));
            CollectionAssert.AreEquivalent(childrenIds, children.Select(c => c.Id));
        }