llama.testing

Testing utilities for Camel Mock endpoints.

expect-bodies

(expect-bodies endpoint & messages)

Testing. Create an expectation on endpoint to have received the bodies in messages. See mock.

mock

(mock ctx endpoint)

Use in a test. Get a mock endpoint in endpoint as an MockEndpoint in context ctx.

(let [ctx (DefaultCamelContext.)
      mock-endpoint (mock ctx "mock:bar")]
  (expect-bodies mock-endpoint "HI!")
  (send-body ctx mock-endpoint "HI!")
  (is (mock-satisfied? mock-endpoint)))

mock-not-satisfied?

(mock-not-satisfied? mock)

Runs the mock assertion, returns true if the mock endpoint is satisfied, false if an AssertionError is thrown. See mock.

mock-satisfied?

(mock-satisfied? mock)

Runs the mock assertion, returns true if the mock endpoint is satisfied, false if an AssertionError is thrown. See mock.