private static void SwitchToXmlAndBack(string filePath) { if (!File.Exists(filePath)) { return; } var configNode = File.ReadAllText(filePath).ToUnixString(); var xml = XmlConverter.ConvertToXml(configNode); var backToConfigNode = XmlConverter.ConvertToConfigNode(xml).ToUnixString(); Assert.IsTrue(configNode.Equals(backToConfigNode), $"Error serializing config node. File: {Path.GetFileName(filePath)}"); }