Skip to content

Instantly share code, notes, and snippets.

@MarcoDorantes
Last active November 1, 2021 13:19
Show Gist options
  • Save MarcoDorantes/9be661f3ced989c31970279c83f8b763 to your computer and use it in GitHub Desktop.
Save MarcoDorantes/9be661f3ced989c31970279c83f8b763 to your computer and use it in GitHub Desktop.
using System.Xml.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
public partial class ToXMLSpec
{
[TestMethod]
public void from_value1()
{
//Arrange
var yamltext = @"---
a
...";
var map = yaml.deserial(yamltext);
var expected_xmltext =
@"<yaml>
<value>a</value>
</yaml>";
//Act
var xml = XDocument.Parse(yaml.AsXml_1dot0(map));
//Assert
Assert.AreEqual("yaml", xml.Root.Name);
Assert.AreEqual(expected_xmltext, $"{xml}");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment