test

package
v0.0.0-...-310d36a Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupHAPI

func SetupHAPI(t *testing.T) *url.URL

Types

type BaseResource

type BaseResource struct {
	Id         string            `json:"id"`
	Identifier []fhir.Identifier `json:"identifier"`
	Type       string            `json:"resourceType"`
	Data       []byte            `json:"-"`
	URL        string            `json:"url"`
}

type StubFHIRClient

type StubFHIRClient struct {
	Resources []any
	Metadata  fhir.CapabilityStatement
	// CreatedResources is a list of resources that have been created using this client.
	// It's not used by the client itself, but can be used by tests to verify that the client has been used correctly.
	CreatedResources map[string][]any
}

func (StubFHIRClient) Create

func (s StubFHIRClient) Create(resource any, result any, opts ...fhirclient.Option) error

func (*StubFHIRClient) CreateWithContext

func (s *StubFHIRClient) CreateWithContext(_ context.Context, resource any, result any, opts ...fhirclient.Option) error

func (StubFHIRClient) Delete

func (s StubFHIRClient) Delete(path string, opts ...fhirclient.Option) error

func (StubFHIRClient) DeleteWithContext

func (s StubFHIRClient) DeleteWithContext(ctx context.Context, path string, opts ...fhirclient.Option) error

func (StubFHIRClient) Path

func (s StubFHIRClient) Path(path ...string) *url.URL

func (StubFHIRClient) Read

func (s StubFHIRClient) Read(path string, target any, opts ...fhirclient.Option) error

func (StubFHIRClient) ReadWithContext

func (s StubFHIRClient) ReadWithContext(ctx context.Context, path string, target any, opts ...fhirclient.Option) error

func (StubFHIRClient) Search

func (s StubFHIRClient) Search(resourceType string, query url.Values, target any, opts ...fhirclient.Option) error

func (StubFHIRClient) SearchWithContext

func (s StubFHIRClient) SearchWithContext(ctx context.Context, resourceType string, query url.Values, target any, opts ...fhirclient.Option) error

func (StubFHIRClient) Update

func (s StubFHIRClient) Update(path string, resource any, result any, opts ...fhirclient.Option) error

func (StubFHIRClient) UpdateWithContext

func (s StubFHIRClient) UpdateWithContext(ctx context.Context, path string, resource any, result any, opts ...fhirclient.Option) error

Directories

Path Synopsis
Package vcrclient_mock is a generated GoMock package.
Package vcrclient_mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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