+
+ for before_module in before_all do
+ before_module.run
+ toolcontext.clear_progress_bar
+ toolcontext.show_unit(before_module)
+ if before_module.error != null then
+ for test_class in test_classes do
+ for case in test_class.before_all do
+ case.fail "Nitunit Error: before module test failed"
+ toolcontext.clear_progress_bar
+ toolcontext.show_unit(case)
+ end
+ for case in test_class.test_cases do
+ case.fail "Nitunit Error: before module test failed"
+ toolcontext.clear_progress_bar
+ toolcontext.show_unit(case)
+ end
+ for case in test_class.after_all do
+ case.fail "Nitunit Error: before module test failed"
+ toolcontext.clear_progress_bar
+ toolcontext.show_unit(case)
+ end
+ end
+ for after_module in after_all do
+ after_module.fail "Nitunit Error: before module test failed"
+ toolcontext.clear_progress_bar
+ toolcontext.show_unit(after_module)
+ end
+ show_status
+ print ""
+ return
+ end
+ end
+
+ for test_class in test_classes do
+ for case in test_class.before_all do
+ case.run
+ toolcontext.clear_progress_bar
+ toolcontext.show_unit(case)
+ if case.error != null then
+ for scase in test_class.test_cases do
+ scase.fail "Nitunit Error: before class test failed"
+ toolcontext.clear_progress_bar
+ toolcontext.show_unit(scase)
+ end
+ for scase in test_class.after_all do
+ scase.fail "Nitunit Error: before class test failed"
+ toolcontext.clear_progress_bar
+ toolcontext.show_unit(scase)
+ end
+ show_status
+ print ""
+ return
+ end
+ end
+ for case in test_class.test_cases do
+ case.run
+ toolcontext.clear_progress_bar
+ toolcontext.show_unit(case)
+ show_status
+ end
+ for after_class in test_class.after_all do
+ after_class.run
+ toolcontext.clear_progress_bar
+ toolcontext.show_unit(after_class)
+ show_status
+ end
+ end
+
+ for after_module in after_all do
+ after_module.run
+ toolcontext.clear_progress_bar
+ toolcontext.show_unit(after_module)
+ show_status
+ end
+
+ show_status
+ print ""