github.com/lirm/aeron-go@v0.0.0-20230415210743-920325491dc4/aeron/testdata/mock_unavailable_counter_handler.go (about)

     1  // Copyright 2022 Steven Stern
     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  package testdata
    16  
    17  import (
    18  	"github.com/lirm/aeron-go/aeron/counters"
    19  	"github.com/stretchr/testify/mock"
    20  )
    21  
    22  // If UnavailableCounterHandler changes, recreate the mock code with the below command.
    23  // mockery --name=UnavailableCounterHandler --inpackage --structname=MockUnavailableCounterHandler --print
    24  
    25  // Code generated by mockery v2.14.0. DO NOT EDIT.
    26  
    27  // MockUnavailableCounterHandler is an autogenerated mock type for the UnavailableCounterHandler type
    28  type MockUnavailableCounterHandler struct {
    29  	mock.Mock
    30  }
    31  
    32  // Handle provides a mock function with given fields: countersReader, registrationId, counterId
    33  func (_m *MockUnavailableCounterHandler) Handle(countersReader *counters.Reader, registrationId int64, counterId int32) {
    34  	_m.Called(countersReader, registrationId, counterId)
    35  }
    36  
    37  type mockConstructorTestingTNewMockUnavailableCounterHandler interface {
    38  	mock.TestingT
    39  	Cleanup(func())
    40  }
    41  
    42  // NewMockUnavailableCounterHandler creates a new instance of MockUnavailableCounterHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    43  func NewMockUnavailableCounterHandler(t mockConstructorTestingTNewMockUnavailableCounterHandler) *MockUnavailableCounterHandler {
    44  	mock := &MockUnavailableCounterHandler{}
    45  	mock.Mock.Test(t)
    46  
    47  	t.Cleanup(func() { mock.AssertExpectations(t) })
    48  
    49  	return mock
    50  }