Class ToolBindings

Object
akka.javasdk.testkit.eval.ToolBindings

public final class ToolBindings extends Object
Which injected stub serves which tool, for cases derived from recordings.

A recorded case carries each tool call production made, with its result. The binding loads that result into the stub that serves the tool in the test:


 var bindings = ToolBindings.builder()
     .bind("getCustomer", call -> crm.add(call.resultAs(Customer.class)))
     .build();

 runner.cases(replayed).bindings(bindings).agent(SupportAgent::ask).run();
 

ExperimentRunner refuses to run a case that names a tool without a binding.