testArguments produces arguments for the function being tested
(t *testing.T, message, source string, time int64)
| 57 | |
| 58 | // testArguments produces arguments for the function being tested |
| 59 | func testArguments(t *testing.T, message, source string, time int64) *amqp.Delivery { |
| 60 | inputMsg := models.Message{Text: message, Source: source, Time: time} |
| 61 | messageJson, err := json.Marshal(inputMsg) |
| 62 | if err != nil { |
| 63 | t.Fatalf("marshal message: %s", err) |
| 64 | } |
| 65 | d := &amqp.Delivery{Body: messageJson} |
| 66 | |
| 67 | return d |
| 68 | } |