piotrkowalczuk/charon

View on GitHub
internal/model/modelmock/permission_registry.go

Summary

Maintainability
B
5 hrs
Test Coverage
// Code generated by mockery v1.0.0. DO NOT EDIT.

package modelmock

import charon "github.com/piotrkowalczuk/charon"
import context "context"
import mock "github.com/stretchr/testify/mock"

// PermissionRegistry is an autogenerated mock type for the PermissionRegistry type
type PermissionRegistry struct {
    mock.Mock
}

// Exists provides a mock function with given fields: ctx, permission
func (_m *PermissionRegistry) Exists(ctx context.Context, permission charon.Permission) bool {
    ret := _m.Called(ctx, permission)

    var r0 bool
    if rf, ok := ret.Get(0).(func(context.Context, charon.Permission) bool); ok {
        r0 = rf(ctx, permission)
    } else {
        r0 = ret.Get(0).(bool)
    }

    return r0
}

// Register provides a mock function with given fields: ctx, permissions
func (_m *PermissionRegistry) Register(ctx context.Context, permissions charon.Permissions) (int64, int64, int64, error) {
    ret := _m.Called(ctx, permissions)

    var r0 int64
    if rf, ok := ret.Get(0).(func(context.Context, charon.Permissions) int64); ok {
        r0 = rf(ctx, permissions)
    } else {
        r0 = ret.Get(0).(int64)
    }

    var r1 int64
    if rf, ok := ret.Get(1).(func(context.Context, charon.Permissions) int64); ok {
        r1 = rf(ctx, permissions)
    } else {
        r1 = ret.Get(1).(int64)
    }

    var r2 int64
    if rf, ok := ret.Get(2).(func(context.Context, charon.Permissions) int64); ok {
        r2 = rf(ctx, permissions)
    } else {
        r2 = ret.Get(2).(int64)
    }

    var r3 error
    if rf, ok := ret.Get(3).(func(context.Context, charon.Permissions) error); ok {
        r3 = rf(ctx, permissions)
    } else {
        r3 = ret.Error(3)
    }

    return r0, r1, r2, r3
}