MigrationMock is a mock implementation of gh.Migration. func TestSomethingThatUsesMigration(t *testing.T) { // make and configure a mocked gh.Migration mockedMigration := &MigrationMock{ DoFunc: func(config *ghConfig.Config) error { panic("mock out the Do method") }, PostVersionF
| 35 | // |
| 36 | // } |
| 37 | type MigrationMock struct { |
| 38 | // DoFunc mocks the Do method. |
| 39 | DoFunc func(config *ghConfig.Config) error |
| 40 | |
| 41 | // PostVersionFunc mocks the PostVersion method. |
| 42 | PostVersionFunc func() string |
| 43 | |
| 44 | // PreVersionFunc mocks the PreVersion method. |
| 45 | PreVersionFunc func() string |
| 46 | |
| 47 | // calls tracks calls to the methods. |
| 48 | calls struct { |
| 49 | // Do holds details about calls to the Do method. |
| 50 | Do []struct { |
| 51 | // Config is the config argument value. |
| 52 | Config *ghConfig.Config |
| 53 | } |
| 54 | // PostVersion holds details about calls to the PostVersion method. |
| 55 | PostVersion []struct { |
| 56 | } |
| 57 | // PreVersion holds details about calls to the PreVersion method. |
| 58 | PreVersion []struct { |
| 59 | } |
| 60 | } |
| 61 | lockDo sync.RWMutex |
| 62 | lockPostVersion sync.RWMutex |
| 63 | lockPreVersion sync.RWMutex |
| 64 | } |
| 65 | |
| 66 | // Do calls DoFunc. |
| 67 | func (mock *MigrationMock) Do(config *ghConfig.Config) error { |
nothing calls this directly
no outgoing calls
no test coverage detected