1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- Class {
- #name : #ZnockExpectation,
- #superclass : #ZnClient,
- #instVars : [
- 'delay',
- 'customizeResponseBlock',
- 'isOptional'
- ],
- #category : #Znock
- }
- { #category : #operations }
- ZnockExpectation >> beOptional [
- isOptional := true
- ]
- { #category : #accessing }
- ZnockExpectation >> customizeResponseBlock [
- ^ customizeResponseBlock
- ]
- { #category : #accessing }
- ZnockExpectation >> customizeResponseBlock: anObject [
- customizeResponseBlock := anObject
- ]
- { #category : #operations }
- ZnockExpectation >> customizeResponseFromRequest: aZnRequest [
- customizeResponseBlock ifNotNil: [ customizeResponseBlock cull: aZnRequest cull: response ]
- ]
- { #category : #accessing }
- ZnockExpectation >> delay [
- ^ delay
- ]
- { #category : #accessing }
- ZnockExpectation >> delay: anObject [
- delay := anObject
- ]
- { #category : #operations }
- ZnockExpectation >> execute [
- "Do nothing"
- ]
- { #category : #initialization }
- ZnockExpectation >> initialize [
- super initialize.
- customizeResponseBlock := nil.
- delay := nil.
- isOptional := false.
- ]
- { #category : #accessing }
- ZnockExpectation >> isOptional [
- ^ isOptional
- ]
- { #category : #accessing }
- ZnockExpectation >> response: aZnResponse [
- response := aZnResponse
- ]
|