protected internal virtual string testName(FrameworkMethod method)
 {
   return method.getName();
 }
 protected internal virtual Statement methodInvoker(FrameworkMethod method, object test)
 {
   return (Statement) new InvokeMethod(method, test);
 }
示例#3
0
 public virtual void finished(FrameworkMethod method)
 {
 }
    protected internal virtual Statement methodBlock(FrameworkMethod method)
    {
      object obj;
      Exception e;
      try
      {
        obj = new BlockJUnit4ClassRunner\u00241(this).run();
        goto label_3;
      }
      catch (Exception ex)
      {
        int num = 0;
        e = (Exception) ByteCodeHelper.MapException<Exception>(ex, (ByteCodeHelper.MapFlags) num);
      }
      return (Statement) new Fail(e);
label_3:
      Statement next1 = this.methodInvoker(method, obj);
      Statement next2 = this.possiblyExpectingExceptions(method, obj, next1);
      Statement statement1 = this.withPotentialTimeout(method, obj, next2);
      Statement statement2 = this.withBefores(method, obj, statement1);
      Statement statement3 = this.withAfters(method, obj, statement2);
      return this.withRules(method, obj, statement3);
    }
 protected internal virtual void runChild(FrameworkMethod method, RunNotifier notifier)
 {
   EachTestNotifier eachTestNotifier = this.makeNotifier(method, notifier);
   if (method.getAnnotation((Class) ClassLiteral<Ignore>.Value) != null)
     this.runIgnored(eachTestNotifier);
   else
     this.runNotIgnored(method, eachTestNotifier);
 }
示例#6
0
 public InvokeMethod(FrameworkMethod testMethod, object target)
 {
   InvokeMethod invokeMethod = this;
   this.fTestMethod = testMethod;
   this.fTarget = target;
 }
示例#7
0
 public virtual Statement apply(Statement @base, FrameworkMethod method, object target)
 {
   return (Statement) new TestWatchman\u00241(this, method, @base);
 }
 protected internal virtual Statement withAfters(FrameworkMethod method, object target, Statement statement)
 {
   List annotatedMethods = this.getTestClass().getAnnotatedMethods((Class) ClassLiteral<After>.Value);
   return !annotatedMethods.isEmpty() ? (Statement) new RunAfters(statement, annotatedMethods, target) : statement;
 }
示例#9
0
 public TheoryAnchor(FrameworkMethod method, TestClass testClass)
 {
   Theories.TheoryAnchor theoryAnchor = this;
   this.successes = 0;
   this.fInvalidParameters = (List) new ArrayList();
   this.fTestMethod = method;
   this.fTestClass = testClass;
 }
示例#10
0
 public override Statement methodBlock(FrameworkMethod method)
 {
   return (Statement) new Theories.TheoryAnchor(method, this.getTestClass());
 }
示例#11
0
 public virtual Statement apply(Statement @base, FrameworkMethod method, object target)
 {
   return (Statement) new Verifier\u00241(this, @base);
 }
 public Statement apply(Statement @base, FrameworkMethod method, object target)
 {
   return (Statement) new ExternalResource\u00241(this, @base);
 }
示例#13
0
 public virtual bool isShadowedBy(FrameworkMethod other)
 {
   if (!String.instancehelper_equals(other.getName(), (object) this.getName()) || other.getParameterTypes().Length != this.getParameterTypes().Length)
     return false;
   for (int index = 0; index < other.getParameterTypes().Length; ++index)
   {
     if (!Object.instancehelper_equals((object) other.getParameterTypes()[index], (object) this.getParameterTypes()[index]))
       return false;
   }
   return true;
 }
 protected internal virtual Statement possiblyExpectingExceptions(FrameworkMethod method, object test, Statement next)
 {
   Test test1 = (Test) method.getAnnotation((Class) ClassLiteral<Test>.Value);
   if (this.expectsException(test1))
     return (Statement) new ExpectException(next, this.getExpectedException(test1));
   else
     return next;
 }
示例#15
0
 public virtual void succeeded(FrameworkMethod method)
 {
 }
 protected internal virtual Statement withPotentialTimeout(FrameworkMethod method, object test, Statement next)
 {
   long timeout = this.getTimeout((Test) method.getAnnotation((Class) ClassLiteral<Test>.Value));
   if (timeout > 0L)
     return (Statement) new FailOnTimeout(next, timeout);
   else
     return next;
 }
示例#17
0
 public virtual void failed(Exception e, FrameworkMethod method)
 {
 }
 protected internal virtual Description describeChild(FrameworkMethod method)
 {
   return Description.createTestDescription(this.getTestClass().getJavaClass(), this.testName(method), method.getAnnotations());
 }
示例#19
0
 public virtual void starting(FrameworkMethod method)
 {
 }
示例#20
0
 public virtual Statement apply(Statement @base, FrameworkMethod method, object target)
 {
   return (Statement) new FailOnTimeout(@base, (long) this.fMillis);
 }
示例#21
0
 public override void starting(FrameworkMethod method)
 {
   this.fName = method.getName();
 }