CreateSubscription calls CreateSubscriptionFunc.
(ctx context.Context, resourceURL string, eventTypes []string)
| 105 | |
| 106 | // CreateSubscription calls CreateSubscriptionFunc. |
| 107 | func (mock *EventClientMock) CreateSubscription(ctx context.Context, resourceURL string, eventTypes []string) (*Subscription, bool, error) { |
| 108 | if mock.CreateSubscriptionFunc == nil { |
| 109 | panic("EventClientMock.CreateSubscriptionFunc: method is nil but EventClient.CreateSubscription was just called") |
| 110 | } |
| 111 | callInfo := struct { |
| 112 | Ctx context.Context |
| 113 | ResourceURL string |
| 114 | EventTypes []string |
| 115 | }{ |
| 116 | Ctx: ctx, |
| 117 | ResourceURL: resourceURL, |
| 118 | EventTypes: eventTypes, |
| 119 | } |
| 120 | mock.lockCreateSubscription.Lock() |
| 121 | mock.calls.CreateSubscription = append(mock.calls.CreateSubscription, callInfo) |
| 122 | mock.lockCreateSubscription.Unlock() |
| 123 | return mock.CreateSubscriptionFunc(ctx, resourceURL, eventTypes) |
| 124 | } |
| 125 | |
| 126 | // CreateSubscriptionCalls gets all the calls that were made to CreateSubscription. |
| 127 | // Check the length with: |
nothing calls this directly
no outgoing calls
no test coverage detected