testArguments produces arguments for the function being tested
(t *testing.T, message, source string, time int64)
| 44 | |
| 45 | // testArguments produces arguments for the function being tested |
| 46 | func testArguments(t *testing.T, message, source string, time int64) *amqp.Delivery { |
| 47 | inputMsg := models.Message{Text: message, Source: source, Time: time} |
| 48 | messageJson, err := json.Marshal(inputMsg) |
| 49 | if err != nil { |
| 50 | t.Fatalf("marshal message: %s", err) |
| 51 | } |
| 52 | d := &amqp.Delivery{Body: messageJson} |
| 53 | |
| 54 | return d |
| 55 | } |