public void WhenPassingANullArgumentToAPrivateMethod()
 {
     var fodyTests = new FodyTests("dummy");
     var method = typeof (FodyTests).GetMethod("DoBar", BindingFlags.Instance | BindingFlags.NonPublic);
     try
     {
         method.Invoke(fodyTests, new object[] { null });
     }
     catch (TargetInvocationException exc)
     {
         ExceptionDispatchInfo.Capture(exc.InnerException).Throw();
     }
 }
Пример #2
0
        public void WhenPassingANullArgumentToAPrivateMethod()
        {
            var fodyTests = new FodyTests("dummy");
            var method    = typeof(FodyTests).GetMethod("DoBar", BindingFlags.Instance | BindingFlags.NonPublic);

            try
            {
                method.Invoke(fodyTests, new object[] { null });
            }
            catch (TargetInvocationException exc)
            {
                ExceptionDispatchInfo.Capture(exc.InnerException).Throw();
            }
        }
 public void WhenPassingANullArgumentToAPublicMethod()
 {
     var fodyTests = new FodyTests("dummy");
     fodyTests.DoFoo(null);
 }
Пример #4
0
        public void WhenPassingANullArgumentToAPublicMethod()
        {
            var fodyTests = new FodyTests("dummy");

            fodyTests.DoFoo(null);
        }