ZnockExpectation.class.st 1016 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. Class {
  2. #name : #ZnockExpectation,
  3. #superclass : #ZnClient,
  4. #instVars : [
  5. 'delay',
  6. 'customizeResponseBlock'
  7. ],
  8. #category : #Znock
  9. }
  10. { #category : #accessing }
  11. ZnockExpectation >> customizeResponseBlock [
  12. ^ customizeResponseBlock
  13. ]
  14. { #category : #accessing }
  15. ZnockExpectation >> customizeResponseBlock: anObject [
  16. customizeResponseBlock := anObject
  17. ]
  18. { #category : #operations }
  19. ZnockExpectation >> customizeResponseFromRequest: aZnRequest [
  20. customizeResponseBlock ifNotNil: [ customizeResponseBlock value: aZnRequest value: response ]
  21. ]
  22. { #category : #accessing }
  23. ZnockExpectation >> delay [
  24. ^ delay
  25. ]
  26. { #category : #accessing }
  27. ZnockExpectation >> delay: anObject [
  28. delay := anObject
  29. ]
  30. { #category : #operations }
  31. ZnockExpectation >> execute [
  32. "Do nothing"
  33. ]
  34. { #category : #initialization }
  35. ZnockExpectation >> initialize [
  36. super initialize.
  37. customizeResponseBlock := nil.
  38. delay := nil.
  39. ]
  40. { #category : #accessing }
  41. ZnockExpectation >> response: aZnResponse [
  42. response := aZnResponse
  43. ]