github.com/saucelabs/saucectl@v0.175.1/internal/mocks/emulators.go (about)

     1  package mocks
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/saucelabs/saucectl/internal/vmd"
     7  )
     8  
     9  // FakeEmulatorsReader is a mock for the vmd.Reader interface.
    10  type FakeEmulatorsReader struct {
    11  	GetVirtualDevicesFn func(context.Context, string) ([]vmd.VirtualDevice, error)
    12  }
    13  
    14  // GetVirtualDevices is a wrapper around GetVirtualDevicesFn.
    15  func (fer *FakeEmulatorsReader) GetVirtualDevices(ctx context.Context, kind string) ([]vmd.VirtualDevice, error) {
    16  	return fer.GetVirtualDevicesFn(ctx, kind)
    17  }