category rename
authorClaus Gittinger <cg@exept.de>
Tue, 26 Feb 2002 11:13:18 +0100
changeset 66 31ae5b8fc382
parent 65 019891d527b7
child 67 7861684195ec
category rename
TestCase.st
--- a/TestCase.st	Mon Feb 25 21:01:09 2002 +0100
+++ b/TestCase.st	Tue Feb 26 11:13:18 2002 +0100
@@ -25,20 +25,6 @@
     "
 ! !
 
-!TestCase class methodsFor:'Accessing'!
-
-allTestSelectors
-        ^self sunitAllSelectors select: [:each | 'test*' match: each]
-!
-
-resources
-	^#()
-!
-
-testSelectors
-        ^self sunitSelectors select: [:each | 'test*' match: each]
-! !
-
 !TestCase class methodsFor:'Building Suites'!
 
 buildSuite
@@ -106,7 +92,21 @@
     "Modified: / 21.6.2000 / 10:05:24 / Sames"
 ! !
 
-!TestCase class methodsFor:'Testing'!
+!TestCase class methodsFor:'accessing'!
+
+allTestSelectors
+        ^self sunitAllSelectors select: [:each | 'test*' match: each]
+!
+
+resources
+	^#()
+!
+
+testSelectors
+        ^self sunitSelectors select: [:each | 'test*' match: each]
+! !
+
+!TestCase class methodsFor:'testing'!
 
 isAbstract
 	"Override to true if a TestCase subclass is Abstract and should not have
@@ -120,83 +120,6 @@
 	^true
 ! !
 
-!TestCase methodsFor:'Accessing'!
-
-assert: aBoolean
-    "fail, if the argument is not true"
-
-    "check the testCase itself"
-    (aBoolean isBoolean) ifFalse:[ self error:'non boolean assertion' ].
-    aBoolean ifFalse: [self signalFailure: 'Assertion failed']
-
-    "Modified: / 21.6.2000 / 10:00:05 / Sames"
-!
-
-assertFalse:aBoolean
-    ^ self assert:aBoolean not
-!
-
-assertFalse:aBoolean named:testName
-    ^ self assert:aBoolean not
-!
-
-assertTrue:aBoolean 
-    ^ self assert:aBoolean
-!
-
-assertTrue:aBoolean named:testName
-    ^ self assert:aBoolean
-!
-
-deny: aBoolean
-    "fail, if the argument is not false"
-
-    self assert: aBoolean not
-!
-
-resources
-	^self class resources
-!
-
-selector
-	^testSelector
-!
-
-should: aBlock
-    "fail, if the block does not evaluate to true"
-
-    self assert: aBlock value
-!
-
-should: aBlock raise: anExceptionalEvent 
-    "fail, if the block does not raise the given event"
-
-    ^self assert: (self executeShould: aBlock inScopeOf: anExceptionalEvent)
-
-    "Modified: / 21.6.2000 / 10:01:08 / Sames"
-!
-
-shouldnt: aBlock
-    "fail, if the block does evaluate to true"
-
-    self deny: aBlock value
-!
-
-shouldnt: aBlock raise: anExceptionalEvent 
-    "fail, if the block does raise the given event"
-
-    ^self assert: (self executeShould: aBlock inScopeOf: anExceptionalEvent) not
-
-    "Modified: / 21.6.2000 / 10:01:16 / Sames"
-!
-
-signalFailure: aString
-    "/ TestResult failure sunitSignalWith: aString
-    TestResult failure raiseErrorString:aString in:thisContext sender sender .
-
-    "Modified: / 21.6.2000 / 10:01:34 / Sames"
-! !
-
 !TestCase methodsFor:'Dependencies'!
 
 addDependentToHierachy: anObject 
@@ -312,7 +235,84 @@
 tearDown
 ! !
 
-!TestCase methodsFor:'Testing'!
+!TestCase methodsFor:'accessing'!
+
+assert: aBoolean
+    "fail, if the argument is not true"
+
+    "check the testCase itself"
+    (aBoolean isBoolean) ifFalse:[ self error:'non boolean assertion' ].
+    aBoolean ifFalse: [self signalFailure: 'Assertion failed']
+
+    "Modified: / 21.6.2000 / 10:00:05 / Sames"
+!
+
+assertFalse:aBoolean
+    ^ self assert:aBoolean not
+!
+
+assertFalse:aBoolean named:testName
+    ^ self assert:aBoolean not
+!
+
+assertTrue:aBoolean 
+    ^ self assert:aBoolean
+!
+
+assertTrue:aBoolean named:testName
+    ^ self assert:aBoolean
+!
+
+deny: aBoolean
+    "fail, if the argument is not false"
+
+    self assert: aBoolean not
+!
+
+resources
+	^self class resources
+!
+
+selector
+	^testSelector
+!
+
+should: aBlock
+    "fail, if the block does not evaluate to true"
+
+    self assert: aBlock value
+!
+
+should: aBlock raise: anExceptionalEvent 
+    "fail, if the block does not raise the given event"
+
+    ^self assert: (self executeShould: aBlock inScopeOf: anExceptionalEvent)
+
+    "Modified: / 21.6.2000 / 10:01:08 / Sames"
+!
+
+shouldnt: aBlock
+    "fail, if the block does evaluate to true"
+
+    self deny: aBlock value
+!
+
+shouldnt: aBlock raise: anExceptionalEvent 
+    "fail, if the block does raise the given event"
+
+    ^self assert: (self executeShould: aBlock inScopeOf: anExceptionalEvent) not
+
+    "Modified: / 21.6.2000 / 10:01:16 / Sames"
+!
+
+signalFailure: aString
+    "/ TestResult failure sunitSignalWith: aString
+    TestResult failure raiseErrorString:aString in:thisContext sender sender .
+
+    "Modified: / 21.6.2000 / 10:01:34 / Sames"
+! !
+
+!TestCase methodsFor:'testing'!
 
 areAllResourcesAvailable
 	^self resources 
@@ -323,6 +323,6 @@
 !TestCase class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/goodies/sunit/TestCase.st,v 1.19 2002-02-25 20:00:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/goodies/sunit/TestCase.st,v 1.20 2002-02-26 10:13:18 cg Exp $'
 ! !
 TestCase initialize!