github.com/lirm/aeron-go@v0.0.0-20230415210743-920325491dc4/aeron/logbuffer/term/mock_fragmenthandler.go (about)

     1  // Copyright 2016 Stanislav Liberman
     2  // Copyright 2022 Steven Stern
     3  //
     4  // Licensed under the Apache License, Version 2.0 (the "License");
     5  // you may not use this file except in compliance with the License.
     6  // You may obtain a copy of the License at
     7  //
     8  // http://www.apache.org/licenses/LICENSE-2.0
     9  //
    10  // Unless required by applicable law or agreed to in writing, software
    11  // distributed under the License is distributed on an "AS IS" BASIS,
    12  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  // See the License for the specific language governing permissions and
    14  // limitations under the License.
    15  
    16  // If FragmentHandler changes, recreate the mock code with the below command.
    17  // mockery --name=FragmentHandler --inpackage --structname=MockFragmentHandler --print
    18  
    19  // Code generated by mockery v2.14.0. DO NOT EDIT.
    20  
    21  package term
    22  
    23  import (
    24  	atomic "github.com/lirm/aeron-go/aeron/atomic"
    25  	logbuffer "github.com/lirm/aeron-go/aeron/logbuffer"
    26  
    27  	mock "github.com/stretchr/testify/mock"
    28  )
    29  
    30  // MockFragmentHandler is an autogenerated mock type for the FragmentHandler type
    31  type MockFragmentHandler struct {
    32  	mock.Mock
    33  }
    34  
    35  // Execute provides a mock function with given fields: buffer, offset, length, header
    36  func (_m *MockFragmentHandler) Execute(buffer *atomic.Buffer, offset int32, length int32, header *logbuffer.Header) {
    37  	_m.Called(buffer, offset, length, header)
    38  }
    39  
    40  type mockConstructorTestingTNewMockFragmentHandler interface {
    41  	mock.TestingT
    42  	Cleanup(func())
    43  }
    44  
    45  // NewMockFragmentHandler creates a new instance of MockFragmentHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    46  func NewMockFragmentHandler(t mockConstructorTestingTNewMockFragmentHandler) *MockFragmentHandler {
    47  	mock := &MockFragmentHandler{}
    48  	mock.Mock.Test(t)
    49  
    50  	t.Cleanup(func() { mock.AssertExpectations(t) })
    51  
    52  	return mock
    53  }