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);
 }
Esempio n. 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);
 }
Esempio n. 6
0
 public InvokeMethod(FrameworkMethod testMethod, object target)
 {
   InvokeMethod invokeMethod = this;
   this.fTestMethod = testMethod;
   this.fTarget = target;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 10
0
 public override Statement methodBlock(FrameworkMethod method)
 {
   return (Statement) new Theories.TheoryAnchor(method, this.getTestClass());
 }
Esempio n. 11
0
 public virtual Statement apply(Statement @base, FrameworkMethod method, object target)
 {
   return (Statement) new Verifier\u00241(this, @base);
 }
Esempio n. 12
0
 public Statement apply(Statement @base, FrameworkMethod method, object target)
 {
   return (Statement) new ExternalResource\u00241(this, @base);
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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());
 }
Esempio n. 19
0
 public virtual void starting(FrameworkMethod method)
 {
 }
Esempio n. 20
0
 public virtual Statement apply(Statement @base, FrameworkMethod method, object target)
 {
   return (Statement) new FailOnTimeout(@base, (long) this.fMillis);
 }
Esempio n. 21
0
 public override void starting(FrameworkMethod method)
 {
   this.fName = method.getName();
 }