// Code generated by mockery v2.53.3. DO NOT EDIT.

package mock

import (
	context "context"

	bizerr "github.com/tidbcloud/pkgv2/bizerr"

	entity "github.com/tidbcloud/dataflow-service/app/repo/entity"

	mock "github.com/stretchr/testify/mock"
)

// TiCDCCustomStorageRepo is an autogenerated mock type for the TiCDCCustomStorageRepo type
type TiCDCCustomStorageRepo struct {
	mock.Mock
}

// LoadByTiCDCClusterID provides a mock function with given fields: ctx, id
func (_m *TiCDCCustomStorageRepo) LoadByTiCDCClusterID(ctx context.Context, id uint64) (*entity.TiCDCCustomStorage, bizerr.BizError) {
	ret := _m.Called(ctx, id)

	if len(ret) == 0 {
		panic("no return value specified for LoadByTiCDCClusterID")
	}

	var r0 *entity.TiCDCCustomStorage
	var r1 bizerr.BizError
	if rf, ok := ret.Get(0).(func(context.Context, uint64) (*entity.TiCDCCustomStorage, bizerr.BizError)); ok {
		return rf(ctx, id)
	}
	if rf, ok := ret.Get(0).(func(context.Context, uint64) *entity.TiCDCCustomStorage); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*entity.TiCDCCustomStorage)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, uint64) bizerr.BizError); ok {
		r1 = rf(ctx, id)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(bizerr.BizError)
		}
	}

	return r0, r1
}

// Save provides a mock function with given fields: ctx, record
func (_m *TiCDCCustomStorageRepo) Save(ctx context.Context, record *entity.TiCDCCustomStorage) bizerr.BizError {
	ret := _m.Called(ctx, record)

	if len(ret) == 0 {
		panic("no return value specified for Save")
	}

	var r0 bizerr.BizError
	if rf, ok := ret.Get(0).(func(context.Context, *entity.TiCDCCustomStorage) bizerr.BizError); ok {
		r0 = rf(ctx, record)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(bizerr.BizError)
		}
	}

	return r0
}

// NewTiCDCCustomStorageRepo creates a new instance of TiCDCCustomStorageRepo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewTiCDCCustomStorageRepo(t interface {
	mock.TestingT
	Cleanup(func())
}) *TiCDCCustomStorageRepo {
	mock := &TiCDCCustomStorageRepo{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
