public void IgnoreEnumerableReferenceLoop()
        {
            var loggerMock = new Mock <ILogger>();

            ISerializer serializer = new JsonNetSerializer(loggerMock.Object);

            var loop = new TestObjectWithEnumerableReferenceLoop();

            string result = serializer.Serialize(loop);

            Assert.Equal("[]", result);
            loggerMock.Verify(l => l.Error(It.IsAny <string>(), It.IsAny <Exception>()), Times.Never());
        }
        public void IgnoreEnumerableReferenceLoop()
        {
            var loggerMock = new Mock<ILogger>();

            ISerializer serializer = new JsonNetSerializer(loggerMock.Object);

            var loop = new TestObjectWithEnumerableReferenceLoop();

            string result = serializer.Serialize(loop);

            Assert.Equal("[]", result);
            loggerMock.Verify(l => l.Error(It.IsAny<string>(), It.IsAny<Exception>()), Times.Never());
        }