func (this *DocumentReaderFixture) Setup() {
	this.path = "/document/path"
	this.client = &FakeHTTPGetClient{}
	this.reader = NewDocumentReader(this.client)
	this.reader.logger = logging.Capture()
	this.document = &Document{}
}
func (this *JSONDeserializerFixture) Setup() {
	log.SetOutput(ioutil.Discard)

	this.deserializer = NewJSONDeserializer(map[string]reflect.Type{
		"ApplicationEvent":  reflect.TypeOf(ApplicationEvent{}),
		"*ApplicationEvent": reflect.TypeOf(&ApplicationEvent{}),
	})
	this.deserializer.logger = logging.Capture()
}
func (this *PutRetryClientFixture) Setup() {
	this.fakeClient = newFakeHTTPClientForPutRetry()
	this.retryClient = NewPutRetryClient(this.fakeClient, retries)
	this.retryClient.sleeper = clock.StayAwake()
	this.retryClient.logger = logging.Capture()
}
func (this *DocumentWriterFixture) Setup() {
	this.client = NewFakeHTTPClientForWriting()
	this.writer = NewDocumentWriter(this.client)
	this.writer.logger = logging.Capture()
}
Beispiel #5
0
func (this *ClonerFixture) initializeDocumentCloner() {
	this.cloner = NewDocumentCloner(this.buffer)
	this.cloner.logger = logging.Capture()
}
func (this *JSONSerializerFixture) Setup() {
	log.SetOutput(ioutil.Discard)
	this.serializer = NewJSONSerializer()
	this.serializer.logger = logging.Capture()
}
func (this *GetRetryClientFixture) Setup() {
	this.fakeClient = &FakeHTTPClientForGetRetry{}
	this.retryClient = NewGetRetryClient(this.fakeClient, retries)
	this.retryClient.sleeper = clock.StayAwake()
	this.retryClient.logger = logging.Capture()
}
func (this *ShutdownListenerFixture) Setup() {
	this.listener = NewShutdownListener(func() { this.calls++ })
	this.listener.logger = logging.Capture()
}
func (this *TransactionWriterFixture) Setup() {
	this.controller = newFakeWriterController()
	this.writer = transactionWriter(this.controller)
	this.writer.logger = logging.Capture()
}
func (this *SubscriptionFixture) createSubscription() {
	this.subscription = newSubscription(
		this.channel, this.queue, this.bindings,
		this.control, this.output)
	this.subscription.logger = logging.Capture()
}