Get implements the Get method of the RawBytesDataCacher interface.
(_ context.Context, key string)
| 105 | |
| 106 | // Get implements the Get method of the RawBytesDataCacher interface. |
| 107 | func (m *MockRawBytesDataCacher) Get(_ context.Context, key string) ([]byte, error) { |
| 108 | if m.currentGetCallIdx >= len(m.expectedGetCalls) { |
| 109 | m.t.Errorf("unexpected call to Get with key: %s", key) |
| 110 | |
| 111 | return nil, nil |
| 112 | } |
| 113 | |
| 114 | expectedCall := m.expectedGetCalls[m.currentGetCallIdx] |
| 115 | if expectedCall.Key != key { |
| 116 | m.t.Errorf("expected Get key: %s, got: %s", expectedCall.Key, key) |
| 117 | } |
| 118 | |
| 119 | m.actualGetCalls = append(m.actualGetCalls, &ActualGetCall{ |
| 120 | Key: key, |
| 121 | }) |
| 122 | |
| 123 | m.currentGetCallIdx++ |
| 124 | |
| 125 | return expectedCall.Value, expectedCall.Err |
| 126 | } |
| 127 | |
| 128 | // AssertExpectations asserts that all expected calls were made. |
| 129 | func (m *MockRawBytesDataCacher) AssertExpectations() { |
nothing calls this directly
no outgoing calls
no test coverage detected