SystemOrganization addCategory: #'OB-SUnitIntegration'! !OBCodeBrowser methodsFor: '*ob-sunitIntegration' stamp: 'lr 10/14/2008 10:36'! cmdSUnitIntegration ^ OBCmdRunTests! ! !OBClassAwareNode methodsFor: '*ob-sunitintegration' stamp: 'lr 10/14/2008 10:39'! testSuite ^ (self theClass includesBehavior: TestCase) ifTrue: [ self theClass suite ] ifFalse: [ super testSuite ]! ! !OBCodeNode methodsFor: '*ob-sunitintegration' stamp: 'lr 10/14/2008 10:35'! testSuite ^ nil! ! !OBClassCategoryNode methodsFor: '*ob-sunitintegration' stamp: 'lr 10/14/2008 10:43'! testSuite ^ self classes inject: TestSuite new into: [ :suite :class | class testSuite isNil ifFalse: [ suite addTest: class testSuite ]. suite ]! ! OBCommand subclass: #OBCmdRunTests instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'OB-SUnitIntegration'! !OBCmdRunTests methodsFor: 'execution' stamp: 'lr 10/14/2008 10:53'! execute | result message | result := target testSuite run. message := result runCount printString , ' run, ' , result passedCount printString , ' passed, ' , result failureCount printString , ' failures, ' , result errorCount printString , ' errors'. result hasPassed ifTrue: [ self inform: message ] ifFalse: [ message := result defects inject: message into: [ :sum :each | sum , String cr , each class name , '>>#' , each selector asString ]. (self confirm: message , String cr , 'Debug?') ifTrue: [ result defects anyOne debug ] ]! ! !OBCmdRunTests methodsFor: 'testing' stamp: 'lr 10/14/2008 10:39'! isActive ^ target testSuite notNil and: [ requestor isSelected: target ]! ! !OBCmdRunTests methodsFor: 'accessing' stamp: 'dc 7/22/2007 20:45'! keystroke ^ $t! ! !OBCmdRunTests methodsFor: 'accessing' stamp: 'lr 10/14/2008 10:32'! label ^ 'run tests'! !