Documentation ¶
Index ¶
- func GetVeiculosHandler(w http.ResponseWriter, r *http.Request)
- func GetVeiculosStatus500Handler(w http.ResponseWriter, r *http.Request)
- func GetVeiculosWrongBodyHandler(w http.ResponseWriter, r *http.Request)
- func NewMockServer(handler func(w http.ResponseWriter, r *http.Request)) *httptest.Server
- type MockConfigurer
- func (mc MockConfigurer) DBName() string
- func (mc MockConfigurer) DBStrConn() string
- func (mc MockConfigurer) ServiceURL() string
- func (mc *MockConfigurer) SetDBName(name string)
- func (mc *MockConfigurer) SetDBStrConn(str string)
- func (mc *MockConfigurer) SetServiceURL(url string)
- func (mc *MockConfigurer) SetUrbsCode(code string)
- func (mc *MockConfigurer) SetWakeUpURL(url string)
- func (mc MockConfigurer) UrbsCode() string
- func (mc MockConfigurer) WakeUpURL() string
- type MockStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetVeiculosHandler ¶
func GetVeiculosHandler(w http.ResponseWriter, r *http.Request)
GetVeiculosHandler simula a o serviço getVeiculos da urbs
func GetVeiculosStatus500Handler ¶
func GetVeiculosStatus500Handler(w http.ResponseWriter, r *http.Request)
GetVeiculosStatus500Handler simula um status 500 do serviços getVeiculos
func GetVeiculosWrongBodyHandler ¶
func GetVeiculosWrongBodyHandler(w http.ResponseWriter, r *http.Request)
GetVeiculosWrongBodyHandler simula um retorno errado do serviço getveiculos
func NewMockServer ¶
Types ¶
type MockConfigurer ¶
type MockConfigurer struct {
// contains filtered or unexported fields
}
MockConfigurer é um confgiurer para ser utilizado em testes.
func ConfigToMock ¶
func ConfigToMock(c config.Configurer) MockConfigurer
ConfigToMock cria um MockConfigurer a partir de um Configurer
func (*MockConfigurer) SetDBName ¶
func (mc *MockConfigurer) SetDBName(name string)
SetDBName é o setter do dbName
func (*MockConfigurer) SetDBStrConn ¶
func (mc *MockConfigurer) SetDBStrConn(str string)
SetDBStrConn é o setter do dbStrConn
func (*MockConfigurer) SetServiceURL ¶
func (mc *MockConfigurer) SetServiceURL(url string)
SetServiceURL é o setter do serviceURL
func (*MockConfigurer) SetUrbsCode ¶
func (mc *MockConfigurer) SetUrbsCode(code string)
SetUrbsCode é o setter do urbsCode
func (*MockConfigurer) SetWakeUpURL ¶
func (mc *MockConfigurer) SetWakeUpURL(url string)
SetWakeUpURL é o setter do wakeupURL
type MockStore ¶
type MockStore struct {
// contains filtered or unexported fields
}
MockStore é uma store para ser usada em testes
func (*MockStore) SaveLinhas ¶
SaveLinhas salva as linhas na store
func (*MockStore) SaveVeiculos ¶
SaveVeiculos salva os veículos na store.
Click to show internal directories.
Click to hide internal directories.