msgraphmock

package
v0.0.43 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockApplicationsClient

func NewMockApplicationsClient(expectFn func(expect Expect)) *applicationsClientMock

Types

type AddPasswordRequest

type AddPasswordRequest interface {
	With(passwordCredential msgraph.PasswordCredential) AddPasswordRequest
	Returns(key *msgraph.PasswordCredential) AddPasswordRequest
	Request
}

type Expect

type Expect interface {
	AddPassword(ctx context.Context, applicationId string, passwordCredential msgraph.PasswordCredential) AddPasswordRequest
	Get(ctx context.Context, applicationId string, query odata.Query) GetApplicationRequest
	RemovePassword(ctx context.Context, applicationId, keyId string) RemovePasswordRequest
}

type GetApplicationRequest

type GetApplicationRequest interface {
	Returns(application *msgraph.Application) GetApplicationRequest
	Request
}

type Mock

type Mock interface {
	// Setup enables httpmock
	Setup()
	// AssertExpectations verifies that all expectations on the mock client were met
	AssertExpectations(t *testing.T) bool
	// Cleanup disables httpmock
	Cleanup()
}

type RemovePasswordRequest

type RemovePasswordRequest interface {
	With(keyId string) RemovePasswordRequest
	Returns() RemovePasswordRequest
	Request
}

type Request

type Request interface {
	RequestBody(requestBody interface{}) Request

	Status(status int)

	CallCount(callcount int)

	Error(error)

	ResponseBody(responseBody interface{}) Request

	Times(callCount int) Request
	// contains filtered or unexported methods
}

Request encapsulates a mocked MS Graph API request & response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL