public void NamedValueExtractorWithInvalidField()
 {
     NamedValueExtractor nve;
     nve = new NamedValueExtractor("xxx");
     var test = new ClassTest1();
     test.field = 30;
     Assert.Throws(typeof (ArgumentException), () => nve.ExtractValue(test));
 }
 public void ExtractFieldByName()
 {
     NamedValueExtractor nve;
     nve = new NamedValueExtractor("field");
     var test = new ClassTest1();
     test.field = 30;
     Assert.AreEqual(test.field, nve.ExtractValue(test), "NamedValueExtractor does not dynamically get field");
 }
 public void ExtractFieldByProperty()
 {
     NamedValueExtractor nve;
     nve = new NamedValueExtractor("Property");
     var test = new ClassTest1();
     test.Property = "StringTest";
     Assert.AreEqual(test.Property, nve.ExtractValue(test), "NamedValueExtractor does not dynamically get Property");
 }