Class { #name : #Znock, #superclass : #Object, #instVars : [ 'expectations' ], #classInstVars : [ 'default' ], #category : #Znock } { #category : #accessing } Znock class >> default [ ^ default ifNil: [ default := self new ] ] { #category : #accessing } Znock >> addExpectation: aZnClient [ ^ self expectations add: aZnClient ] { #category : #public } Znock >> baseFor: descriptor [ ^ ZnockBase in: self url: descriptor asHostFirstUrl ] { #category : #operations } Znock >> consumeExpectationFor: aZnockClient [ ^ self expectations detect: [ :one | aZnockClient matches: one ] ifFound: [ :one | expectations remove: one. one ] ifNone: [ nil ] ] { #category : #accessing } Znock >> expectations [ ^ expectations ifNil: [ expectations := OrderedCollection new ] ] { #category : #public } Znock >> pendingExpectations [ ^ self expectations reject: #isOptional ] { #category : #public } Znock >> removeAll [ self expectations removeAll ]