Exemplo n.º 1
0
        public void InstanceField()
        {
            FinalFielder expected = new FinalFielder();

            expected.Age = 56;
            FieldRetrievingFactoryObject fac = new FieldRetrievingFactoryObject();

            fac.TargetObject = expected;
            fac.TargetField  = "Age";
            fac.ObjectName   = "foo";
            fac.AfterPropertiesSet();
            object actual = fac.GetObject();

            Assert.AreEqual(expected.Age, actual);
        }
 public void InstanceField()
 {
     FinalFielder expected = new FinalFielder();
     expected.Age = 56;
     FieldRetrievingFactoryObject fac = new FieldRetrievingFactoryObject();
     fac.TargetObject = expected;
     fac.TargetField = "Age";
     fac.ObjectName = "foo";
     fac.AfterPropertiesSet();
     object actual = fac.GetObject();
     Assert.AreEqual(expected.Age, actual);
 }