public void FieldAttribute() { var rd = new XmlAttributeReader(new MemoryStream(Encoding.UTF8.GetBytes(Data))); var attrs = rd.GetAttributes <ColumnAttribute>(InfoOf.Member <XmlReaderTests>(a => a.Field1)); Assert.NotNull(attrs); Assert.AreEqual(1, attrs.Length); Assert.AreEqual("TestName", attrs[0].Name); }
public void TypeAttribute() { var rd = new XmlAttributeReader(new MemoryStream(Encoding.UTF8.GetBytes(Data))); var attrs = rd.GetAttributes <TableAttribute>(typeof(XmlReaderTests)); Assert.NotNull(attrs); Assert.AreEqual(1, attrs.Length); Assert.AreEqual("TestName", attrs[0].Name); }