public void TestSetInstancePropertyInvalidType()
 {
     var classUnderTest = new ConcreteClass("Private Field Test");
     ReflectionTestHelper.SetInstanceProperty(
          typeof(BaseClass),
         "ConcreteProtectedProperty",
         classUnderTest,
         "Setting Value Here",
         new object[0]);
 }
 public void TestSetInstancePropertyNullMethod()
 {
     var classUnderTest = new ConcreteClass("Private Field Test");
     ReflectionTestHelper.SetInstanceProperty(
          typeof(ConcreteClass),
         null,
         classUnderTest,
         "Setting Value Here",
         new object[0]);
 }
 public void TestSetInstanceFieldInvalidType()
 {
     var classUnderTest = new ConcreteClass("Private Field Test");
     ReflectionTestHelper.SetInstanceField(
          typeof(BaseClass),
         "_concreteParameter2",
         classUnderTest,
         "Setting Value Here");
 }
 public void TestSetInstanceProperty()
 {
     const string strExpected = "concrete protected property. Setting Value Here";
     var classUnderTest = new ConcreteClass("Private Field Test");
     var objectUnderTest = ReflectionTestHelper.SetInstanceProperty(
          typeof(ConcreteClass),
         "ConcreteProtectedProperty",
         classUnderTest,
         "Setting Value Here",
         new object[0]);
     var strActual = Convert.ToString(objectUnderTest);
     Assert.AreEqual(strExpected, strActual);
 }
 public void TestSetInstanceField()
 {
     const string strExpected = "Setting Value Here";
     var classUnderTest = new ConcreteClass("Private Field Test");
     var objectUnderTest = ReflectionTestHelper.SetInstanceField(
          typeof(ConcreteClass),
         "_concreteParameter2",
         classUnderTest,
         "Setting Value Here");
     var strActual = Convert.ToString(objectUnderTest);
     Assert.AreEqual(strExpected, strActual);
 }
 public void TestSetInstanceFieldInvalidMethod()
 {
     var classUnderTest = new ConcreteClass("Private Field Test");
     ReflectionTestHelper.SetInstanceField(
          typeof(ConcreteClass),
         "_errorName",
         classUnderTest,
         "Setting Value Here");
 }
 public void TestRunInstanceMethodNullMethod()
 {
     var classUnderTest = new ConcreteClass("Private Field Test");
     ReflectionTestHelper.RunInstanceMethod(
          typeof(ConcreteClass),
         null,
         classUnderTest,
         new object[0]);
 }
 public void TestRunInstanceMethodParamPresent()
 {
     var classUnderTest = new ConcreteClass("Protected Property Test");
     ReflectionTestHelper.RunInstanceMethod(
          typeof(ConcreteClass),
         "ConcreteProtectedMethod",
         classUnderTest,
         new object[] { "test", 2 });
 }
 public void TestRunInstanceMethodInvalidMethod()
 {
     var classUnderTest = new ConcreteClass("Private Field Test");
     ReflectionTestHelper.RunInstanceMethod(
          typeof(ConcreteClass),
         "ErrorName",
         classUnderTest,
         new object[0]);
 }
 public void TestRunInstanceMethodInvalidType()
 {
     var classUnderTest = new ConcreteClass("Private Field Test");
     ReflectionTestHelper.RunInstanceMethod(
          typeof(BaseClass),
         "ConcreteProtectedMethod",
         classUnderTest,
         new object[0]);
 }
 public void TestRunInstanceMethod()
 {
     const string strExpected = "concrete protected method.";
     var classUnderTest = new ConcreteClass("Protected Method Test");
     var objectUnderTest = ReflectionTestHelper.RunInstanceMethod(
          typeof(ConcreteClass),
         "ConcreteProtectedMethod",
         classUnderTest,
         new object[0]);
     var strActual = Convert.ToString(objectUnderTest);
     Assert.AreEqual(strExpected, strActual);
 }
 public void TestGetInstancePropertyParamPresent()
 {
     var classUnderTest = new ConcreteClass("Protected Property Test");
     ReflectionTestHelper.GetInstanceProperty(
          typeof(ConcreteClass),
         "ConcreteProtectedProperty",
         classUnderTest,
         new object[] {"test", 2});
 }
 public void TestGetInstanceProperty()
 {
     const string strExpected = "concrete protected property. default2";
     var classUnderTest = new ConcreteClass("Protected Property Test");
     var objectUnderTest = ReflectionTestHelper.GetInstanceProperty(
          typeof(ConcreteClass),
         "ConcreteProtectedProperty",
         classUnderTest,
         new object[0]);
     var strActual = Convert.ToString(objectUnderTest);
     Assert.AreEqual(strExpected, strActual);
 }
 public void TestGetInstanceFieldNullMethod()
 {
     var classUnderTest = new ConcreteClass("Private Field Test");
     ReflectionTestHelper.GetInstanceField(
          typeof(ConcreteClass),
         null,
         classUnderTest);
 }
 public void SetInstancePropertyInvalidSetValue()
 {
     var classUnderTest = new ConcreteClass("Private Field Test");
     ReflectionTestHelper.SetInstanceProperty(
          typeof(ConcreteClass),
         "ConcreteProtectedProperty",
         classUnderTest,
         1,
         new object[0]);
 }