NodeOutputAssertion

@TestOnly
data class NodeOutputAssertion<Input, Output>(val node: NodeReference<Input, Output>, val context: DummyAIAgentContext, val input: Input, val expectedOutput: Output)(source)

Represents an assertion for testing the output of a specific node within an AI agent's subgraph.

This class is intended to be used for verifying that a node, when executed in a specific agent context with a given input, produces the expected output.

Parameters

Input

The type of the input data that the node processes.

Output

The type of the output data produced by the node.

Constructors

Link copied to clipboard
constructor(node: NodeReference<Input, Output>, context: DummyAIAgentContext, input: Input, expectedOutput: Output)

Properties

Link copied to clipboard

The testing or mock context in which the node executes. Provides the necessary environment and configurations for the node's execution.

Link copied to clipboard

The expected output data to be verified against the actual output from the node.

Link copied to clipboard

The input data passed to the node during execution.

Link copied to clipboard

A reference to the node whose behavior is being tested.