github.com/lino-network/lino@v0.6.11/x/post/mocks/PostKeeper.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  	amino "github.com/tendermint/go-amino"
     8  
     9  	mock "github.com/stretchr/testify/mock"
    10  
    11  	model "github.com/lino-network/lino/x/post/model"
    12  
    13  	posttypes "github.com/lino-network/lino/x/post/types"
    14  
    15  	types "github.com/cosmos/cosmos-sdk/types"
    16  )
    17  
    18  // PostKeeper is an autogenerated mock type for the PostKeeper type
    19  type PostKeeper struct {
    20  	mock.Mock
    21  }
    22  
    23  // CreatePost provides a mock function with given fields: ctx, author, postID, createdBy, content, title
    24  func (_m *PostKeeper) CreatePost(ctx types.Context, author linotypes.AccountKey, postID string, createdBy linotypes.AccountKey, content string, title string) types.Error {
    25  	ret := _m.Called(ctx, author, postID, createdBy, content, title)
    26  
    27  	var r0 types.Error
    28  	if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey, string, linotypes.AccountKey, string, string) types.Error); ok {
    29  		r0 = rf(ctx, author, postID, createdBy, content, title)
    30  	} else {
    31  		if ret.Get(0) != nil {
    32  			r0 = ret.Get(0).(types.Error)
    33  		}
    34  	}
    35  
    36  	return r0
    37  }
    38  
    39  // DeletePost provides a mock function with given fields: ctx, permlink
    40  func (_m *PostKeeper) DeletePost(ctx types.Context, permlink linotypes.Permlink) types.Error {
    41  	ret := _m.Called(ctx, permlink)
    42  
    43  	var r0 types.Error
    44  	if rf, ok := ret.Get(0).(func(types.Context, linotypes.Permlink) types.Error); ok {
    45  		r0 = rf(ctx, permlink)
    46  	} else {
    47  		if ret.Get(0) != nil {
    48  			r0 = ret.Get(0).(types.Error)
    49  		}
    50  	}
    51  
    52  	return r0
    53  }
    54  
    55  // DoesPostExist provides a mock function with given fields: ctx, permlink
    56  func (_m *PostKeeper) DoesPostExist(ctx types.Context, permlink linotypes.Permlink) bool {
    57  	ret := _m.Called(ctx, permlink)
    58  
    59  	var r0 bool
    60  	if rf, ok := ret.Get(0).(func(types.Context, linotypes.Permlink) bool); ok {
    61  		r0 = rf(ctx, permlink)
    62  	} else {
    63  		r0 = ret.Get(0).(bool)
    64  	}
    65  
    66  	return r0
    67  }
    68  
    69  // ExecRewardEvent provides a mock function with given fields: ctx, reward
    70  func (_m *PostKeeper) ExecRewardEvent(ctx types.Context, reward posttypes.RewardEvent) types.Error {
    71  	ret := _m.Called(ctx, reward)
    72  
    73  	var r0 types.Error
    74  	if rf, ok := ret.Get(0).(func(types.Context, posttypes.RewardEvent) types.Error); ok {
    75  		r0 = rf(ctx, reward)
    76  	} else {
    77  		if ret.Get(0) != nil {
    78  			r0 = ret.Get(0).(types.Error)
    79  		}
    80  	}
    81  
    82  	return r0
    83  }
    84  
    85  // ExportToFile provides a mock function with given fields: ctx, cdc, filepath
    86  func (_m *PostKeeper) ExportToFile(ctx types.Context, cdc *amino.Codec, filepath string) error {
    87  	ret := _m.Called(ctx, cdc, filepath)
    88  
    89  	var r0 error
    90  	if rf, ok := ret.Get(0).(func(types.Context, *amino.Codec, string) error); ok {
    91  		r0 = rf(ctx, cdc, filepath)
    92  	} else {
    93  		r0 = ret.Error(0)
    94  	}
    95  
    96  	return r0
    97  }
    98  
    99  // GetComsumptionWindow provides a mock function with given fields: ctx
   100  func (_m *PostKeeper) GetComsumptionWindow(ctx types.Context) linotypes.MiniDollar {
   101  	ret := _m.Called(ctx)
   102  
   103  	var r0 linotypes.MiniDollar
   104  	if rf, ok := ret.Get(0).(func(types.Context) linotypes.MiniDollar); ok {
   105  		r0 = rf(ctx)
   106  	} else {
   107  		r0 = ret.Get(0).(linotypes.MiniDollar)
   108  	}
   109  
   110  	return r0
   111  }
   112  
   113  // GetPost provides a mock function with given fields: ctx, permlink
   114  func (_m *PostKeeper) GetPost(ctx types.Context, permlink linotypes.Permlink) (model.Post, types.Error) {
   115  	ret := _m.Called(ctx, permlink)
   116  
   117  	var r0 model.Post
   118  	if rf, ok := ret.Get(0).(func(types.Context, linotypes.Permlink) model.Post); ok {
   119  		r0 = rf(ctx, permlink)
   120  	} else {
   121  		r0 = ret.Get(0).(model.Post)
   122  	}
   123  
   124  	var r1 types.Error
   125  	if rf, ok := ret.Get(1).(func(types.Context, linotypes.Permlink) types.Error); ok {
   126  		r1 = rf(ctx, permlink)
   127  	} else {
   128  		if ret.Get(1) != nil {
   129  			r1 = ret.Get(1).(types.Error)
   130  		}
   131  	}
   132  
   133  	return r0, r1
   134  }
   135  
   136  // IDADonate provides a mock function with given fields: ctx, from, n, author, postID, app, signer
   137  func (_m *PostKeeper) IDADonate(ctx types.Context, from linotypes.AccountKey, n types.Int, author linotypes.AccountKey, postID string, app linotypes.AccountKey, signer linotypes.AccountKey) types.Error {
   138  	ret := _m.Called(ctx, from, n, author, postID, app, signer)
   139  
   140  	var r0 types.Error
   141  	if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey, types.Int, linotypes.AccountKey, string, linotypes.AccountKey, linotypes.AccountKey) types.Error); ok {
   142  		r0 = rf(ctx, from, n, author, postID, app, signer)
   143  	} else {
   144  		if ret.Get(0) != nil {
   145  			r0 = ret.Get(0).(types.Error)
   146  		}
   147  	}
   148  
   149  	return r0
   150  }
   151  
   152  // ImportFromFile provides a mock function with given fields: ctx, cdc, filepath
   153  func (_m *PostKeeper) ImportFromFile(ctx types.Context, cdc *amino.Codec, filepath string) error {
   154  	ret := _m.Called(ctx, cdc, filepath)
   155  
   156  	var r0 error
   157  	if rf, ok := ret.Get(0).(func(types.Context, *amino.Codec, string) error); ok {
   158  		r0 = rf(ctx, cdc, filepath)
   159  	} else {
   160  		r0 = ret.Error(0)
   161  	}
   162  
   163  	return r0
   164  }
   165  
   166  // LinoDonate provides a mock function with given fields: ctx, from, amount, author, postID, app
   167  func (_m *PostKeeper) LinoDonate(ctx types.Context, from linotypes.AccountKey, amount linotypes.Coin, author linotypes.AccountKey, postID string, app linotypes.AccountKey) types.Error {
   168  	ret := _m.Called(ctx, from, amount, author, postID, app)
   169  
   170  	var r0 types.Error
   171  	if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey, linotypes.Coin, linotypes.AccountKey, string, linotypes.AccountKey) types.Error); ok {
   172  		r0 = rf(ctx, from, amount, author, postID, app)
   173  	} else {
   174  		if ret.Get(0) != nil {
   175  			r0 = ret.Get(0).(types.Error)
   176  		}
   177  	}
   178  
   179  	return r0
   180  }
   181  
   182  // UpdatePost provides a mock function with given fields: ctx, author, postID, title, content
   183  func (_m *PostKeeper) UpdatePost(ctx types.Context, author linotypes.AccountKey, postID string, title string, content string) types.Error {
   184  	ret := _m.Called(ctx, author, postID, title, content)
   185  
   186  	var r0 types.Error
   187  	if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey, string, string, string) types.Error); ok {
   188  		r0 = rf(ctx, author, postID, title, content)
   189  	} else {
   190  		if ret.Get(0) != nil {
   191  			r0 = ret.Get(0).(types.Error)
   192  		}
   193  	}
   194  
   195  	return r0
   196  }