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); }
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 PropertyAttribute() { var rd = new XmlAttributeReader(new MemoryStream(Encoding.UTF8.GetBytes(Data))); MappingSchema.Default.AddMetadataReader(rd); var attrs = MappingSchema.Default.GetAttributes <MapValueAttribute>(InfoOf.Member <XmlReaderTests>(a => a.Property1)); Assert.NotNull(attrs); Assert.AreEqual(1, attrs.Length); Assert.AreEqual("TestName", attrs[0].Value); }
public void Parse() { _ = new XmlAttributeReader(new MemoryStream(Encoding.UTF8.GetBytes(_data))); }