FailingTestResourceTestCase.st
author sr
Tue, 03 Dec 2019 11:46:05 +0100
changeset 765 25cfb3b6f834
parent 222 8e6f482297fa
child 611 1eecc860f4a5
child 664 e31b2e7b658d
permissions -rw-r--r--
#FEATURE by Stefan Reise class: TestCase class added: #isRunningUnderBorland32 #isRunningUnderGcc32 #isRunningUnderGcc64 #isRunningUnderMingw64

"{ Package: 'stx:goodies/sunit' }"

SimpleTestResourceTestCase subclass:#FailingTestResourceTestCase
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'SUnit-Tests'
!


!FailingTestResourceTestCase methodsFor:'utility'!

clearOuterResourceStateDuring: aBlock
	"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)."

	^super clearOuterResourceStateDuring:
		[SimpleTestResource preventAvailabilityDuring:
			[self should: aBlock raise: TestResult failure]]
! !

!FailingTestResourceTestCase class methodsFor:'documentation'!

version_SVN
    ^ '§Id: FailingTestResourceTestCase.st 214 2011-03-14 12:22:21Z vranyj1 §'
! !