void LocalizationEntry_ParseNode_False(string xml) { var xmlDoc = new XmlDocument(); xmlDoc.LoadXml(xml); Assert.False(LocalizationEntry.ParseNode(xmlDoc.LastChild, out var localizationEntry)); Assert.True(localizationEntry == default); }
void LocalizationEntry_ParseNode_True() { var validXmls = GetValidXmls(); foreach (string xml in validXmls) { var xmlDoc = new XmlDocument(); xmlDoc.LoadXml(xml); Assert.True(LocalizationEntry.ParseNode(xmlDoc.LastChild, out var localizationEntry)); Assert.False(localizationEntry == default); } }
void LocalizationEntry_Compare_True() { var validXmls = GetValidXmls(); foreach (string xml in validXmls) { var xmlDoc1 = new XmlDocument(); xmlDoc1.LoadXml(xml); Assert.True(LocalizationEntry.ParseNode(xmlDoc1.LastChild, out var localizationEntry1)); Assert.False(localizationEntry1 == default); var xmlDoc2 = new XmlDocument(); xmlDoc2.LoadXml(xml); Assert.True(LocalizationEntry.ParseNode(xmlDoc2.LastChild, out var localizationEntry2)); Assert.False(localizationEntry2 == default); Assert.True(localizationEntry1 == localizationEntry2); } }