github.com/goravel/framework@v1.13.9/contracts/database/orm/mocks/Factory.go (about)

     1  // Code generated by mockery v2.14.0. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	orm "github.com/goravel/framework/contracts/database/orm"
     7  	mock "github.com/stretchr/testify/mock"
     8  )
     9  
    10  // Factory is an autogenerated mock type for the Factory type
    11  type Factory struct {
    12  	mock.Mock
    13  }
    14  
    15  // Count provides a mock function with given fields: count
    16  func (_m *Factory) Count(count int) orm.Factory {
    17  	ret := _m.Called(count)
    18  
    19  	var r0 orm.Factory
    20  	if rf, ok := ret.Get(0).(func(int) orm.Factory); ok {
    21  		r0 = rf(count)
    22  	} else {
    23  		if ret.Get(0) != nil {
    24  			r0 = ret.Get(0).(orm.Factory)
    25  		}
    26  	}
    27  
    28  	return r0
    29  }
    30  
    31  // Create provides a mock function with given fields: value, attributes
    32  func (_m *Factory) Create(value interface{}, attributes ...map[string]interface{}) error {
    33  	_va := make([]interface{}, len(attributes))
    34  	for _i := range attributes {
    35  		_va[_i] = attributes[_i]
    36  	}
    37  	var _ca []interface{}
    38  	_ca = append(_ca, value)
    39  	_ca = append(_ca, _va...)
    40  	ret := _m.Called(_ca...)
    41  
    42  	var r0 error
    43  	if rf, ok := ret.Get(0).(func(interface{}, ...map[string]interface{}) error); ok {
    44  		r0 = rf(value, attributes...)
    45  	} else {
    46  		r0 = ret.Error(0)
    47  	}
    48  
    49  	return r0
    50  }
    51  
    52  // CreateQuietly provides a mock function with given fields: value, attributes
    53  func (_m *Factory) CreateQuietly(value interface{}, attributes ...map[string]interface{}) error {
    54  	_va := make([]interface{}, len(attributes))
    55  	for _i := range attributes {
    56  		_va[_i] = attributes[_i]
    57  	}
    58  	var _ca []interface{}
    59  	_ca = append(_ca, value)
    60  	_ca = append(_ca, _va...)
    61  	ret := _m.Called(_ca...)
    62  
    63  	var r0 error
    64  	if rf, ok := ret.Get(0).(func(interface{}, ...map[string]interface{}) error); ok {
    65  		r0 = rf(value, attributes...)
    66  	} else {
    67  		r0 = ret.Error(0)
    68  	}
    69  
    70  	return r0
    71  }
    72  
    73  // Make provides a mock function with given fields: value, attributes
    74  func (_m *Factory) Make(value interface{}, attributes ...map[string]interface{}) error {
    75  	_va := make([]interface{}, len(attributes))
    76  	for _i := range attributes {
    77  		_va[_i] = attributes[_i]
    78  	}
    79  	var _ca []interface{}
    80  	_ca = append(_ca, value)
    81  	_ca = append(_ca, _va...)
    82  	ret := _m.Called(_ca...)
    83  
    84  	var r0 error
    85  	if rf, ok := ret.Get(0).(func(interface{}, ...map[string]interface{}) error); ok {
    86  		r0 = rf(value, attributes...)
    87  	} else {
    88  		r0 = ret.Error(0)
    89  	}
    90  
    91  	return r0
    92  }
    93  
    94  type mockConstructorTestingTNewFactory interface {
    95  	mock.TestingT
    96  	Cleanup(func())
    97  }
    98  
    99  // NewFactory creates a new instance of Factory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   100  func NewFactory(t mockConstructorTestingTNewFactory) *Factory {
   101  	mock := &Factory{}
   102  	mock.Mock.Test(t)
   103  
   104  	t.Cleanup(func() { mock.AssertExpectations(t) })
   105  
   106  	return mock
   107  }