Exemplo n.º 1
0
        public void RespectISerializableObjects()
        {
            var loggerMock = new Mock<ILogger>();

            ISerializer serializer = new JsonNetSerializer(loggerMock.Object);

            var iSerializableObj = new TestObjectAsISerializable();

            var result = serializer.Serialize(iSerializableObj);

            Assert.Equal("{\"otherKey\":\"otherValue\"}", result);
        }
Exemplo n.º 2
0
        public void RespectISerializableObjects()
        {
            var loggerMock = new Mock <ILogger>();

            ISerializer serializer = new JsonNetSerializer(loggerMock.Object);

            var iSerializableObj = new TestObjectAsISerializable();

            var result = serializer.Serialize(iSerializableObj);

            Assert.Equal("{\"otherKey\":\"otherValue\"}", result);
        }