package tests
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"os"
"strings"
)
type MockSBCS struct {
cl *CommandLineMockup
sbccomm *SBClientMockup
}
type SBClientMockup struct {
Credentials
GetUser func() string
GetPassword func() string
GetHost func() string
SetCredentials func(Credentials)
Catalog func() (*Catalog, error)
TestConnection func() error
LastState func(string) (*LastState, error)
Instances func() (*Instances, error)
Deprovision func(*BindPayload, string) error
UpdateService func(*UpdatePayload, string) error
Provision func(*ProvisonPayload, string) error
Bind func(*BindPayload, string, string) (string, error)
UnBind func(*BindPayload, string, string) error
NewSBClient func(*Credentials) *SBClient
}
type CommandLineMockup struct {
Executable string
Command string
Options []string
NoOptions bool
Force bool
Plan string
Tags string
Custom string
JSON bool
Parse func([]string) (err error)
checkCustom func(string) string
}
unc MockCatalog() (*Catalog, error) {
return c, err
}