Esempio n. 1
0
        public void WriteJson_ICustomLogMessageType_WriteCustomLogMessage()
        {
            var converter = new CustomMessageConverter();

            var value = new SomeModel();

            var        stringBuilder = new StringBuilder();
            JsonWriter writer        = new JsonTextWriter(new StringWriter(stringBuilder));
            var        serializer    = new JsonSerializer();

            converter.WriteJson(writer, value, serializer);

            Assert.Equal("\"loggable string\"", stringBuilder.ToString());
        }
Esempio n. 2
0
        public void ReadJson_AnyParameters_NotImplemented()
        {
            var converter = new CustomMessageConverter();

            Assert.Throws <NotImplementedException>(() => converter.ReadJson(null, null, null, null));
        }
Esempio n. 3
0
        public void CanRead_Overrides_ReturnsFalse()
        {
            var converter = new CustomMessageConverter();

            Assert.False(converter.CanRead);
        }