File tree 2 files changed +48
-11
lines changed
Kepler-Notifications-Tests
2 files changed +48
-11
lines changed Original file line number Diff line number Diff line change @@ -3,26 +3,26 @@ An EventNotificationModuleTest is a test class for testing the behavior of Event
3
3
"
4
4
Class {
5
5
#name : #EventNotificationModuleTest ,
6
- #superclass : #SystemBasedUserStoryTest ,
6
+ #superclass : #TestCase ,
7
+ #instVars : [
8
+ ' userStory'
9
+ ],
7
10
#category : #' Kepler-Notifications-Tests'
8
11
}
9
12
10
13
{ #category : #' private - accessing' }
11
14
EventNotificationModuleTest >> installedModuleRegistrationSystem [
12
15
13
- ^ rootSystem >> #InstalledModuleRegistrationSystem
16
+ ^ userStory rootSystem >> #InstalledModuleRegistrationSystem
14
17
]
15
18
16
- { #category : #' private - configuring ' }
17
- EventNotificationModuleTest >> requireEventNotificationModule [
19
+ { #category : #running }
20
+ EventNotificationModuleTest >> setUp [
18
21
19
- self requireInstallationOf: EventNotificationModule
20
- ]
21
-
22
- { #category : #' private - running' }
23
- EventNotificationModuleTest >> setUpRequirements [
24
-
25
- self requireEventNotificationModule
22
+ super setUp.
23
+ userStory := PluggableUserStoryTest
24
+ requiring: [ :test | test requireInstallationOf: EventNotificationModule ].
25
+ userStory setUp
26
26
]
27
27
28
28
{ #category : #tests }
Original file line number Diff line number Diff line change
1
+ "
2
+ I'm a kind of configurable user story test.
3
+ My intention is to be used in composition relations with other tests that cannot subclass directly SystemBasedUserStoryTest.
4
+ The users just need to provide a block configuring the requirements.
5
+ "
6
+ Class {
7
+ #name : #PluggableUserStoryTest ,
8
+ #superclass : #SystemBasedUserStoryTest ,
9
+ #instVars : [
10
+ ' requirementSetUp'
11
+ ],
12
+ #category : #' Kepler-SUnit-Model'
13
+ }
14
+
15
+ { #category : #' instance creation' }
16
+ PluggableUserStoryTest class >> requiring: aRequirementSetUpBlock [
17
+
18
+ ^ self new initializeRequiring: aRequirementSetUpBlock
19
+ ]
20
+
21
+ { #category : #initialization }
22
+ PluggableUserStoryTest >> initializeRequiring: aRequirementSetUpBlock [
23
+
24
+ requirementSetUp := aRequirementSetUpBlock
25
+ ]
26
+
27
+ { #category : #accessing }
28
+ PluggableUserStoryTest >> rootSystem [
29
+
30
+ ^ rootSystem
31
+ ]
32
+
33
+ { #category : #' private - running' }
34
+ PluggableUserStoryTest >> setUpRequirements [
35
+
36
+ requirementSetUp value: self
37
+ ]
You can’t perform that action at this time.
0 commit comments