private void VerifyItem(XElement textElt, string xpath, string expectedLang, string expectedValue) { var item = textElt.XPathSelectElements(xpath).FirstOrDefault(); Assert.That(item, Is.Not.Null); Assert.That(item.Attribute("lang").Value, Is.EqualTo(expectedLang)); Assert.That(item.Value, Is.EqualTo(expectedValue)); } }