github.com/xmidt-org/webpa-common@v1.11.9/convey/mocks_test.go (about)

     1  package convey
     2  
     3  import (
     4  	"io"
     5  
     6  	"github.com/stretchr/testify/mock"
     7  )
     8  
     9  type mockTranslator struct {
    10  	mock.Mock
    11  }
    12  
    13  func (m *mockTranslator) ReadFrom(source io.Reader) (C, error) {
    14  	arguments := m.Called(source)
    15  	return arguments.Get(0).(C), arguments.Error(1)
    16  }
    17  
    18  func (m *mockTranslator) WriteTo(destination io.Writer, source C) error {
    19  	return m.Called(destination, source).Error(0)
    20  }