Interface McpAssured.McpAssert<ASSERT extends McpAssured.McpAssert<ASSERT>>
- All Known Subinterfaces:
McpAssured.McpSseAssert,McpAssured.McpStdioAssert,McpAssured.McpStreamableAssert,McpAssured.McpWebSocketAssert
- Enclosing class:
- McpAssured
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA generic message.static interfaceApingmessage.static interfaceA "completion/complete" message for prompts.static interfaceA "prompts/get" message.static interfaceA "prompts/list" message.static interfaceA "resources/list" message.static interfaceA "resources/read" message.static interfaceA "resources/templates/list" message.static interfaceA "completion/complete" message for resource templates.static interfaceA "tools/call" message.static interfaceA "tools/list" message. -
Method Summary
Modifier and TypeMethodDescriptionmessage(io.vertx.core.json.JsonObject message) Build a generic message.ping()Build a "ping" message.default ASSERTpingPong()Send a "ping" message and assert an empty pong result.promptComplete(String promptName) Build a "completion/complete" message.default ASSERTpromptComplete(String promptName, String argumentName, String argumentValue, Consumer<io.quarkiverse.mcp.server.CompletionResponse> assertFunction) Send a "completion/complete" message to the server.promptsGet(String promptName) Build a "prompts/get" message.default ASSERTpromptsGet(String promptName, Consumer<io.quarkiverse.mcp.server.PromptResponse> assertFunction) Send a "prompts/get" message to the server.default ASSERTpromptsGet(String promptName, Map<String, String> args, Consumer<io.quarkiverse.mcp.server.PromptResponse> assertFunction) Send a "prompts/get" message to the server.Build a "prompts/list" message.default ASSERTpromptsList(Consumer<McpAssured.PromptsPage> assertFunction) Send a "prompts/list" message to the server.Build a "resources/list" message.default ASSERTresourcesList(Consumer<McpAssured.ResourcesPage> assertFunction) Send a "resources/list" message to the server.resourcesRead(String uri) Build a "resources/read" message.default ASSERTresourcesRead(String uri, Consumer<io.quarkiverse.mcp.server.ResourceResponse> assertFunction) Send a "resources/read" message to the server.Build a "resources/templates/list" message.default ASSERTresourcesTemplatesList(Consumer<McpAssured.ResourcesTemplatesPage> assertFunction) Send a "resources/templates/list" message to the server.resourceTemplateComplete(String uriTemplate) Build a "completion/complete" message.default ASSERTresourceTemplateComplete(String uriTemplate, String argumentName, String argumentValue, Consumer<io.quarkiverse.mcp.server.CompletionResponse> assertFunction) Send a "completion/complete" message to the server.Blocks until all responses are available and all assert functions complete.Build a "tools/call" message.default ASSERTSend a "tools/call" message to the server.default ASSERTtoolsCall(String toolName, Map<String, Object> args, Consumer<io.quarkiverse.mcp.server.ToolResponse> assertFunction) Send a "tools/call" message to the server.Send a "tools/list" message to the server.default ASSERTtoolsList(Consumer<McpAssured.ToolsPage> assertFunction) Send a "tools/list" message to the server.
-
Method Details
-
pingPong
Send a "ping" message and assert an empty pong result.- Returns:
- self
-
ping
Build a "ping" message.- Returns:
- a new builder
-
toolsList
Send a "tools/list" message to the server.The assert function is not used until the
thenAssertResults()method is called.- Parameters:
assertFunction-- Returns:
- self
-
toolsList
Send a "tools/list" message to the server.The assert function is not used until the
thenAssertResults()method is called.- Parameters:
assertFunction-- Returns:
- a new builder
-
toolsCall
@CheckReturnValue default ASSERT toolsCall(String toolName, Consumer<io.quarkiverse.mcp.server.ToolResponse> assertFunction) Send a "tools/call" message to the server.The assert function is not used until the
thenAssertResults()method is called.- Parameters:
toolName-assertFunction-- Returns:
- self
-
toolsCall
@CheckReturnValue default ASSERT toolsCall(String toolName, Map<String, Object> args, Consumer<io.quarkiverse.mcp.server.ToolResponse> assertFunction) Send a "tools/call" message to the server.The assert function is not used until the
thenAssertResults()method is called.- Parameters:
toolName-args-assertFunction-- Returns:
- self
-
toolsCall
Build a "tools/call" message.The message is not sent until the
McpAssured.McpAssert.ToolsCallMessage.send()is called.- Parameters:
toolName-- Returns:
- a new builder
-
promptsList
Send a "prompts/list" message to the server.The assert function is not used until the
thenAssertResults()method is called.- Parameters:
assertFunction-- Returns:
- self
-
promptsList
McpAssured.McpAssert.PromptsListMessage<ASSERT> promptsList()Build a "prompts/list" message.- Parameters:
assertFunction-- Returns:
- a new builder
-
promptsGet
default ASSERT promptsGet(String promptName, Consumer<io.quarkiverse.mcp.server.PromptResponse> assertFunction) Send a "prompts/get" message to the server.The assert function is not used until the
thenAssertResults()method is called.- Parameters:
promptName-assertFunction-- Returns:
- self
-
promptsGet
default ASSERT promptsGet(String promptName, Map<String, String> args, Consumer<io.quarkiverse.mcp.server.PromptResponse> assertFunction) Send a "prompts/get" message to the server.The assert function is not used until the
thenAssertResults()method is called.- Parameters:
promptName-args-assertFunction-- Returns:
- self
-
resourcesRead
default ASSERT resourcesRead(String uri, Consumer<io.quarkiverse.mcp.server.ResourceResponse> assertFunction) Send a "resources/read" message to the server.The assert function is not used until the
thenAssertResults()method is called.- Parameters:
uri-assertFunction-- Returns:
- self
-
resourcesRead
Build a "resources/read" message.- Parameters:
uri-- Returns:
- a new builder
-
resourcesList
Send a "resources/list" message to the server.The assert function is not used until the
thenAssertResults()method is called.- Parameters:
uri-assertFunction-- Returns:
- self
-
resourcesList
McpAssured.McpAssert.ResourcesListMessage<ASSERT> resourcesList()Build a "resources/list" message.- Returns:
- a new builder
-
resourcesTemplatesList
Send a "resources/templates/list" message to the server.The assert function is not used until the
thenAssertResults()method is called.- Parameters:
uri-assertFunction-- Returns:
- self
-
resourcesTemplatesList
McpAssured.McpAssert.ResourcesTemplatesListMessage<ASSERT> resourcesTemplatesList()Build a "resources/templates/list" message.- Returns:
- a new builder
-
resourceTemplateComplete
McpAssured.McpAssert.ResourceTemplateCompleteMessage<ASSERT> resourceTemplateComplete(String uriTemplate) Build a "completion/complete" message.- Parameters:
uriTemplate-- Returns:
- a new builder
-
resourceTemplateComplete
default ASSERT resourceTemplateComplete(String uriTemplate, String argumentName, String argumentValue, Consumer<io.quarkiverse.mcp.server.CompletionResponse> assertFunction) Send a "completion/complete" message to the server.The assert function is not used until the
thenAssertResults()method is called.- Parameters:
uriTemplate-argumentName-argumentValue-assertFunction-- Returns:
- self
-
promptsGet
Build a "prompts/get" message.The message is not sent until the
McpAssured.McpAssert.PromptsGetMessage.send()is called.- Parameters:
promptName-- Returns:
- a new builder
-
promptComplete
Build a "completion/complete" message.- Parameters:
promptName-- Returns:
- a new builder
-
promptComplete
default ASSERT promptComplete(String promptName, String argumentName, String argumentValue, Consumer<io.quarkiverse.mcp.server.CompletionResponse> assertFunction) Send a "completion/complete" message to the server.The assert function is not used until the
thenAssertResults()method is called.- Parameters:
promptName-argumentName-argumentValue-assertFunction-- Returns:
- self
-
message
@CheckReturnValue McpAssured.McpAssert.GenericMessage<ASSERT> message(io.vertx.core.json.JsonObject message) Build a generic message.- Parameters:
message-- Returns:
- self
-
thenAssertResults
McpAssured.Snapshot thenAssertResults()Blocks until all responses are available and all assert functions complete.- Returns:
- the snapshot
-