Skip to content
Snippets Groups Projects
Commit 5633c6b0 authored by Bouma,C.J. (Chris)'s avatar Bouma,C.J. (Chris)
Browse files

Mocks :)

:)
parent b6f554f3
No related branches found
No related tags found
No related merge requests found
...@@ -86,7 +86,7 @@ func TestHandleCorrectMessage(t *testing.T) { ...@@ -86,7 +86,7 @@ func TestHandleCorrectMessage(t *testing.T) {
var resultMessage map[string]interface{} var resultMessage map[string]interface{}
json.Unmarshal(mockBroker.Messages[mockQueue][1].Body, &resultMessage) json.Unmarshal(mockBroker.Messages[mockQueue][1].Body, &resultMessage)
assert.Equal(t, "query_result", resultMessage["type"]) assert.Equal(t, "query_result", resultMessage["type"])
assert.Empty(t, resultMessage["values"]) assert.Equal(t, "test", resultMessage["values"])
} }
// Unit test message received with no session ID // Unit test message received with no session ID
......
...@@ -19,7 +19,6 @@ func NewService() *Service { ...@@ -19,7 +19,6 @@ func NewService() *Service {
// SendAQLQuery sends the query to arangoDB and parses the result (mock) // SendAQLQuery sends the query to arangoDB and parses the result (mock)
func (s *Service) SendAQLQuery(query string, username string, password string, hostname string, port int, database string) (*[]byte, error) { func (s *Service) SendAQLQuery(query string, username string, password string, hostname string, port int, database string) (*[]byte, error) {
//mockResult := make(map[string][]entity.Document)
mockResult, _ := json.Marshal("test") mockResult, _ := json.Marshal("test")
if !s.throwError { if !s.throwError {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment