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()); }
public void ReadJson_AnyParameters_NotImplemented() { var converter = new CustomMessageConverter(); Assert.Throws <NotImplementedException>(() => converter.ReadJson(null, null, null, null)); }
public void CanRead_Overrides_ReturnsFalse() { var converter = new CustomMessageConverter(); Assert.False(converter.CanRead); }