FailingTestResourceTestCase.st
changeset 222 8e6f482297fa
child 611 1eecc860f4a5
child 664 e31b2e7b658d
equal deleted inserted replaced
221:914934672e32 222:8e6f482297fa
       
     1 "{ Package: 'stx:goodies/sunit' }"
       
     2 
       
     3 SimpleTestResourceTestCase subclass:#FailingTestResourceTestCase
       
     4 	instanceVariableNames:''
       
     5 	classVariableNames:''
       
     6 	poolDictionaries:''
       
     7 	category:'SUnit-Tests'
       
     8 !
       
     9 
       
    10 
       
    11 !FailingTestResourceTestCase methodsFor:'utility'!
       
    12 
       
    13 clearOuterResourceStateDuring: aBlock
       
    14 	"Make the resource impossible to make available, then ensure that every test raises a failure but not an error (which its setUp would do if it reached it and the resource were nil)."
       
    15 
       
    16 	^super clearOuterResourceStateDuring:
       
    17 		[SimpleTestResource preventAvailabilityDuring:
       
    18 			[self should: aBlock raise: TestResult failure]]
       
    19 ! !
       
    20 
       
    21 !FailingTestResourceTestCase class methodsFor:'documentation'!
       
    22 
       
    23 version_SVN
       
    24     ^ '§Id: FailingTestResourceTestCase.st 214 2011-03-14 12:22:21Z vranyj1 §'
       
    25 ! !