|
@@ -14,16 +14,6 @@ ZnockClient class >> newWithInterceptor: aZnock [
|
|
|
yourself
|
|
|
]
|
|
|
|
|
|
-{ #category : #'private protocol' }
|
|
|
-ZnockClient >> executeRequestResponse [
|
|
|
- | expectation |
|
|
|
- expectation := interceptor consumeExpectationFor: self.
|
|
|
- expectation ifNil: [ ^ super executeRequestResponse ].
|
|
|
- expectation delay ifNotNil: [ :delay | self fakeDelay: delay ].
|
|
|
- self fakeResponse: expectation response.
|
|
|
- ^ response contents
|
|
|
-]
|
|
|
-
|
|
|
{ #category : #'private protocol' }
|
|
|
ZnockClient >> fakeDelay: aDuration [
|
|
|
| localTimeout |
|
|
@@ -39,6 +29,16 @@ ZnockClient >> fakeResponse: aZnResponse [
|
|
|
(response respondsTo: #signal) ifTrue: [ response signal ]
|
|
|
]
|
|
|
|
|
|
+{ #category : #'private protocol' }
|
|
|
+ZnockClient >> getConnectionAndExecute [
|
|
|
+ | expectation |
|
|
|
+ expectation := interceptor consumeExpectationFor: self.
|
|
|
+ expectation ifNil: [ ^ super executeRequestResponse ].
|
|
|
+ expectation delay ifNotNil: [ :delay | self fakeDelay: delay ].
|
|
|
+ self fakeResponse: expectation response.
|
|
|
+ ^ response contents
|
|
|
+]
|
|
|
+
|
|
|
{ #category : #accessing }
|
|
|
ZnockClient >> interceptor: anObject [
|
|
|
interceptor := anObject
|