Junit
2021-07-02 17:27:00 1 举报
Junit
作者其他创作
大纲/内容
base.evaluate()
Statement statement = methodBlock(method);
statement= withAfterClasses
withInterruptIsolation(statement)
super.methodBlock(method) 这个才是真正原汁原味的BlockJUnit4ClassRunner的methodBlock方法
new ReflectiveCallable().run()
Statement
createTest
回调TestWatcher.apply里面的evaluate方法
runWithAssignment
Theories的static成员类TheoryAnchor
statement = withClassRules
run(Runner runner)
ParentRunner
被覆写的在TheoryAnchor里面的new BlockJUnit4ClassRunner()的methodBlock(testMethod)方法
传递(TestWatcher)statement进去
statement.evaluate()
statement = childrenInvoker(notifier)
JUnitCore
runChildren(final RunNotifier notifier)
statement =withBeforeClasses
Theories
run(final RunNotifier notifier)
TestWatcher
classBlock(notifier)
runChild里面定义了evaluate()匿名内部类_,在runLeaf里面回调
BlockJUnit4ClassRunner
new BlockJUnit4ClassRunner()
0 条评论
下一页