public void AreNamesEqual(string otherName, Options options, bool expected) { var attribute = new NodeAttribute(123, "planet", "Saturn", 456); bool actual = attribute.AreNamesEqual(otherName, options); Assert.AreEqual(expected, actual); }
private int Find(NodeAttributeCollection source, NodeAttribute attribute, IList <int> mask) { int index = source.FindIndex(i => !mask.Contains(i) && attribute.Diff(source[i], XmlPathStrictElement.Root.Element(0), XmlPathStrictElement.Root.Element(0), options).IsEmpty); if (index < 0) { index = source.FindIndex(i => !mask.Contains(i) && attribute.AreNamesEqual(source[i].Name, options)); } return(index); }