Exampple.Router.ConnCase.Client (exampple v0.10.6)

Link to this section Summary

Functions

The assert_all_stanza_receive macro receives as many messages as needed to match the list of stanzas passed as the first parameter in the process and checks it out against the list of stanzas passed as the first parameter. It waits for an incoming stanza for the timeout passed as second parameter. By default the second parameter is configured to 5 seconds.

The assert_stanza_receive macro receives a message in the process and checks it out against the stanza passed as a parameter. It waits for an incoming stanza for the timeout passed as second parameter. By default the second parameter is configured to 5 seconds.

The assert_stanza_received macro asks to DummyTcpClient for a stanza received and compares it to the stanza passed as parameter. If there is no stanzas received previously, nil is returned.

The client_received macro injects a stanza inside of the client. The stanza should be in %Xmlel{} format or a binary chunk.

The stanza_receive macro waits for a message during the timeout passed as a parameter or 5 seconds by default.

The stanza_received macro ask for a previously received stanza to DummyTcpClient. If there is no stanzas waiting then it returns nil.

Starts the TCP server and subscribe the caller process. It is called by the setup macro injected when ConnCase is used.

Link to this section Functions

Link to this macro

assert_all_stanza_receive(stanzas, timeout \\ 5000)

(macro)

The assert_all_stanza_receive macro receives as many messages as needed to match the list of stanzas passed as the first parameter in the process and checks it out against the list of stanzas passed as the first parameter. It waits for an incoming stanza for the timeout passed as second parameter. By default the second parameter is configured to 5 seconds.

Link to this macro

assert_stanza_receive(stanza, timeout \\ 5000)

(macro)

The assert_stanza_receive macro receives a message in the process and checks it out against the stanza passed as a parameter. It waits for an incoming stanza for the timeout passed as second parameter. By default the second parameter is configured to 5 seconds.

Link to this macro

assert_stanza_received(stanza)

(macro)

The assert_stanza_received macro asks to DummyTcpClient for a stanza received and compares it to the stanza passed as parameter. If there is no stanzas received previously, nil is returned.

Link to this macro

client_received(stanza)

(macro)

The client_received macro injects a stanza inside of the client. The stanza should be in %Xmlel{} format or a binary chunk.

See Exampple.DummyTcpClient.received/1 for further information.

Link to this macro

stanza_receive(timeout \\ 5000)

(macro)

The stanza_receive macro waits for a message during the timeout passed as a parameter or 5 seconds by default.

Link to this macro

stanza_received()

(macro)

The stanza_received macro ask for a previously received stanza to DummyTcpClient. If there is no stanzas waiting then it returns nil.

Link to this macro

start_tcp()

(macro)

Starts the TCP server and subscribe the caller process. It is called by the setup macro injected when ConnCase is used.