github.com/rohankumardubey/aresdb@v0.0.2-0.20190517170215-e54e3ca06b9c/utils/mocks/WriteCloser.go (about)

     1  //  Copyright (c) 2017-2018 Uber Technologies, Inc.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // Code generated by mockery v1.0.0
    16  package mocks
    17  
    18  import mock "github.com/stretchr/testify/mock"
    19  
    20  // WriteCloser is an autogenerated mock type for the WriteCloser type
    21  type WriteCloser struct {
    22  	mock.Mock
    23  }
    24  
    25  // Close provides a mock function with given fields:
    26  func (_m *WriteCloser) Close() error {
    27  	ret := _m.Called()
    28  
    29  	var r0 error
    30  	if rf, ok := ret.Get(0).(func() error); ok {
    31  		r0 = rf()
    32  	} else {
    33  		r0 = ret.Error(0)
    34  	}
    35  
    36  	return r0
    37  }
    38  
    39  // Write provides a mock function with given fields: p
    40  func (_m *WriteCloser) Write(p []byte) (int, error) {
    41  	ret := _m.Called(p)
    42  
    43  	var r0 int
    44  	if rf, ok := ret.Get(0).(func([]byte) int); ok {
    45  		r0 = rf(p)
    46  	} else {
    47  		r0 = ret.Get(0).(int)
    48  	}
    49  
    50  	var r1 error
    51  	if rf, ok := ret.Get(1).(func([]byte) error); ok {
    52  		r1 = rf(p)
    53  	} else {
    54  		r1 = ret.Error(1)
    55  	}
    56  
    57  	return r0, r1
    58  }