# `Jido.Chat.AdapterTestKit.MockTransport`
[🔗](https://github.com/agentjido/jido_chat/blob/v1.2.0/lib/jido/chat/adapter_test_kit/mock_transport.ex#L1)

A deterministic provider-free transport for adapter tests.

The transport records calls in order. A response queue can be set for each
operation. When a queue is empty, `request/4` returns its supplied default.

# `call`

```elixir
@type call() :: %{operation: operation(), payload: term(), sequence: pos_integer()}
```

# `operation`

```elixir
@type operation() :: atom()
```

# `server`

```elixir
@type server() :: GenServer.server()
```

# `calls`

```elixir
@spec calls(server(), operation() | nil) :: [call()]
```

Returns all calls, or only calls for one operation.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `request`

```elixir
@spec request(server(), operation(), term(), term()) :: term()
```

Records a request and returns the next queued response or the default.

# `reset`

```elixir
@spec reset(server()) :: :ok
```

Clears recorded calls and queued responses.

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

Starts a mock transport.

# `stub`

```elixir
@spec stub(server(), operation(), term() | [term()]) :: :ok
```

Replaces the response queue for an operation.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
