public void Test_Get_Property_By_Name() { var properties = TypeGetProperties.GetProperties(typeof(TestClass), "TestInt1"); Assert.AreEqual(1, properties.Count); Assert.AreEqual(typeof(int), properties.ElementAt(0).PropertyType); }
public void Test_Get_Property_By_Type() { var properties = TypeGetProperties.GetProperties(typeof(TestClass), typeof(DateTime)); Assert.AreEqual(2, properties.Count); Assert.AreEqual(typeof(DateTime), properties.ElementAt(0).PropertyType); Assert.AreEqual(typeof(DateTime), properties.ElementAt(1).PropertyType); }