|
@@ -2,11 +2,27 @@ Class {
|
|
|
#name : #ZnockExpectation,
|
|
|
#superclass : #ZnClient,
|
|
|
#instVars : [
|
|
|
- 'delay'
|
|
|
+ 'delay',
|
|
|
+ 'customizeResponseBlock'
|
|
|
],
|
|
|
#category : #Znock
|
|
|
}
|
|
|
|
|
|
+{ #category : #accessing }
|
|
|
+ZnockExpectation >> customizeResponseBlock [
|
|
|
+ ^ customizeResponseBlock
|
|
|
+]
|
|
|
+
|
|
|
+{ #category : #accessing }
|
|
|
+ZnockExpectation >> customizeResponseBlock: anObject [
|
|
|
+ customizeResponseBlock := anObject
|
|
|
+]
|
|
|
+
|
|
|
+{ #category : #operations }
|
|
|
+ZnockExpectation >> customizeResponseFromRequest: aZnRequest [
|
|
|
+ customizeResponseBlock ifNotNil: [ customizeResponseBlock value: aZnRequest value: response ]
|
|
|
+]
|
|
|
+
|
|
|
{ #category : #accessing }
|
|
|
ZnockExpectation >> delay [
|
|
|
^ delay
|
|
@@ -27,6 +43,7 @@ ZnockExpectation >> initialize [
|
|
|
|
|
|
super initialize.
|
|
|
|
|
|
+ customizeResponseBlock := nil.
|
|
|
delay := nil.
|
|
|
]
|
|
|
|