github.com/lino-network/lino@v0.6.11/x/price/mocks/PriceKeeper.go (about)

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	linotypes "github.com/lino-network/lino/types"
     7  	mock "github.com/stretchr/testify/mock"
     8  
     9  	model "github.com/lino-network/lino/x/price/model"
    10  
    11  	types "github.com/cosmos/cosmos-sdk/types"
    12  )
    13  
    14  // PriceKeeper is an autogenerated mock type for the PriceKeeper type
    15  type PriceKeeper struct {
    16  	mock.Mock
    17  }
    18  
    19  // CoinToMiniDollar provides a mock function with given fields: ctx, coin
    20  func (_m *PriceKeeper) CoinToMiniDollar(ctx types.Context, coin linotypes.Coin) (linotypes.MiniDollar, types.Error) {
    21  	ret := _m.Called(ctx, coin)
    22  
    23  	var r0 linotypes.MiniDollar
    24  	if rf, ok := ret.Get(0).(func(types.Context, linotypes.Coin) linotypes.MiniDollar); ok {
    25  		r0 = rf(ctx, coin)
    26  	} else {
    27  		r0 = ret.Get(0).(linotypes.MiniDollar)
    28  	}
    29  
    30  	var r1 types.Error
    31  	if rf, ok := ret.Get(1).(func(types.Context, linotypes.Coin) types.Error); ok {
    32  		r1 = rf(ctx, coin)
    33  	} else {
    34  		if ret.Get(1) != nil {
    35  			r1 = ret.Get(1).(types.Error)
    36  		}
    37  	}
    38  
    39  	return r0, r1
    40  }
    41  
    42  // CurrPrice provides a mock function with given fields: ctx
    43  func (_m *PriceKeeper) CurrPrice(ctx types.Context) (linotypes.MiniDollar, types.Error) {
    44  	ret := _m.Called(ctx)
    45  
    46  	var r0 linotypes.MiniDollar
    47  	if rf, ok := ret.Get(0).(func(types.Context) linotypes.MiniDollar); ok {
    48  		r0 = rf(ctx)
    49  	} else {
    50  		r0 = ret.Get(0).(linotypes.MiniDollar)
    51  	}
    52  
    53  	var r1 types.Error
    54  	if rf, ok := ret.Get(1).(func(types.Context) types.Error); ok {
    55  		r1 = rf(ctx)
    56  	} else {
    57  		if ret.Get(1) != nil {
    58  			r1 = ret.Get(1).(types.Error)
    59  		}
    60  	}
    61  
    62  	return r0, r1
    63  }
    64  
    65  // FeedPrice provides a mock function with given fields: ctx, validator, _a2
    66  func (_m *PriceKeeper) FeedPrice(ctx types.Context, validator linotypes.AccountKey, _a2 linotypes.MiniDollar) types.Error {
    67  	ret := _m.Called(ctx, validator, _a2)
    68  
    69  	var r0 types.Error
    70  	if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey, linotypes.MiniDollar) types.Error); ok {
    71  		r0 = rf(ctx, validator, _a2)
    72  	} else {
    73  		if ret.Get(0) != nil {
    74  			r0 = ret.Get(0).(types.Error)
    75  		}
    76  	}
    77  
    78  	return r0
    79  }
    80  
    81  // HistoryPrice provides a mock function with given fields: ctx
    82  func (_m *PriceKeeper) HistoryPrice(ctx types.Context) []model.FeedHistory {
    83  	ret := _m.Called(ctx)
    84  
    85  	var r0 []model.FeedHistory
    86  	if rf, ok := ret.Get(0).(func(types.Context) []model.FeedHistory); ok {
    87  		r0 = rf(ctx)
    88  	} else {
    89  		if ret.Get(0) != nil {
    90  			r0 = ret.Get(0).([]model.FeedHistory)
    91  		}
    92  	}
    93  
    94  	return r0
    95  }
    96  
    97  // InitGenesis provides a mock function with given fields: ctx, initPrice
    98  func (_m *PriceKeeper) InitGenesis(ctx types.Context, initPrice linotypes.MiniDollar) types.Error {
    99  	ret := _m.Called(ctx, initPrice)
   100  
   101  	var r0 types.Error
   102  	if rf, ok := ret.Get(0).(func(types.Context, linotypes.MiniDollar) types.Error); ok {
   103  		r0 = rf(ctx, initPrice)
   104  	} else {
   105  		if ret.Get(0) != nil {
   106  			r0 = ret.Get(0).(types.Error)
   107  		}
   108  	}
   109  
   110  	return r0
   111  }
   112  
   113  // LastFeed provides a mock function with given fields: ctx, validator
   114  func (_m *PriceKeeper) LastFeed(ctx types.Context, validator linotypes.AccountKey) (*model.FedPrice, types.Error) {
   115  	ret := _m.Called(ctx, validator)
   116  
   117  	var r0 *model.FedPrice
   118  	if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey) *model.FedPrice); ok {
   119  		r0 = rf(ctx, validator)
   120  	} else {
   121  		if ret.Get(0) != nil {
   122  			r0 = ret.Get(0).(*model.FedPrice)
   123  		}
   124  	}
   125  
   126  	var r1 types.Error
   127  	if rf, ok := ret.Get(1).(func(types.Context, linotypes.AccountKey) types.Error); ok {
   128  		r1 = rf(ctx, validator)
   129  	} else {
   130  		if ret.Get(1) != nil {
   131  			r1 = ret.Get(1).(types.Error)
   132  		}
   133  	}
   134  
   135  	return r0, r1
   136  }
   137  
   138  // MiniDollarToCoin provides a mock function with given fields: ctx, dollar
   139  func (_m *PriceKeeper) MiniDollarToCoin(ctx types.Context, dollar linotypes.MiniDollar) (linotypes.Coin, linotypes.MiniDollar, types.Error) {
   140  	ret := _m.Called(ctx, dollar)
   141  
   142  	var r0 linotypes.Coin
   143  	if rf, ok := ret.Get(0).(func(types.Context, linotypes.MiniDollar) linotypes.Coin); ok {
   144  		r0 = rf(ctx, dollar)
   145  	} else {
   146  		r0 = ret.Get(0).(linotypes.Coin)
   147  	}
   148  
   149  	var r1 linotypes.MiniDollar
   150  	if rf, ok := ret.Get(1).(func(types.Context, linotypes.MiniDollar) linotypes.MiniDollar); ok {
   151  		r1 = rf(ctx, dollar)
   152  	} else {
   153  		r1 = ret.Get(1).(linotypes.MiniDollar)
   154  	}
   155  
   156  	var r2 types.Error
   157  	if rf, ok := ret.Get(2).(func(types.Context, linotypes.MiniDollar) types.Error); ok {
   158  		r2 = rf(ctx, dollar)
   159  	} else {
   160  		if ret.Get(2) != nil {
   161  			r2 = ret.Get(2).(types.Error)
   162  		}
   163  	}
   164  
   165  	return r0, r1, r2
   166  }
   167  
   168  // UpdatePrice provides a mock function with given fields: ctx
   169  func (_m *PriceKeeper) UpdatePrice(ctx types.Context) types.Error {
   170  	ret := _m.Called(ctx)
   171  
   172  	var r0 types.Error
   173  	if rf, ok := ret.Get(0).(func(types.Context) types.Error); ok {
   174  		r0 = rf(ctx)
   175  	} else {
   176  		if ret.Get(0) != nil {
   177  			r0 = ret.Get(0).(types.Error)
   178  		}
   179  	}
   180  
   181  	return r0
   182  }