private void AssertSerialization(DestinationFileFormat input, string expectedOutput) { var converter = new DestinationFileFormatConverter(); using (var stringWriter = new StringWriter()) using (var jsonWriter = new JsonTextWriter(stringWriter)) { converter.WriteJson(jsonWriter, input, null); Assert.AreEqual(expectedOutput, stringWriter.ToString()); } }
/// <summary> /// Initializes a new instance of the <see cref="DestinationOptions"/> class. /// </summary> /// <param name="format">File format to convert to.</param> public DestinationOptions(DestinationFileFormat format) { this.Format = format; }