public void PropertyAttribute()
        {
            var rd    = new XmlAttributeReader(new MemoryStream(Encoding.UTF8.GetBytes(Data)));
            var attrs = rd.GetAttributes <ColumnAttribute>(typeof(XmlReaderTests), MemberHelper.MemberOf <XmlReaderTests>(a => a.Property1));

            Assert.NotNull(attrs);
            Assert.AreEqual(1, attrs.Length);
            Assert.AreEqual("TestName", attrs[0].Name);
        }
Ejemplo n.º 2
0
        public void PropertyAttribute()
        {
            var rd    = new XmlAttributeReader(new MemoryStream(Encoding.UTF8.GetBytes(Data)));
            var attrs = rd.GetAttributes<ColumnAttribute>(MemberHelper.MemberOf<XmlReaderTests>(a => a.Property1));

            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);
        }
Ejemplo n.º 4
0
		public void TypeAttribute()
		{
			var rd    = new XmlAttributeReader(new MemoryStream(Encoding.UTF8.GetBytes(Data)));
			var attrs = rd.GetAttributes<TableAttribute>(typeof(XmlReaderTest));

			Assert.NotNull (attrs);
			Assert.AreEqual(1, attrs.Length);
			Assert.AreEqual("TestName", attrs[0].Name);
		}