pub struct TestScenario { /* private fields */ }Expand description
A fluent sequence of commands and synchronization points for a test agent.
Implementations§
Source§impl TestScenario
impl TestScenario
pub fn new() -> Self
pub fn send(self, command: Command) -> Self
pub fn user_text(self, text: impl Into<String>) -> Self
pub fn cancel(self) -> Self
pub fn switch_model( self, provider: impl StreamingModelProvider + 'static, ) -> Self
pub fn replace_conversation(self, messages: Vec<ChatMessage>) -> Self
pub fn wait_for( self, predicate: impl Fn(&AgentEvent) -> bool + Send + 'static, ) -> Self
pub fn wait_for_turn_end(self) -> Self
pub fn wait_for_compaction_start(self) -> Self
pub fn wait_for_retry(self, attempt: u32) -> Self
Trait Implementations§
Source§impl Default for TestScenario
impl Default for TestScenario
Source§fn default() -> TestScenario
fn default() -> TestScenario
Returns the “default value” for a type. Read more
Source§impl From<Vec<TestAgentStep>> for TestScenario
impl From<Vec<TestAgentStep>> for TestScenario
Source§fn from(steps: Vec<TestAgentStep>) -> Self
fn from(steps: Vec<TestAgentStep>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for TestScenario
impl !Sync for TestScenario
impl !UnwindSafe for TestScenario
impl Freeze for TestScenario
impl Send for TestScenario
impl Unpin for TestScenario
impl UnsafeUnpin for TestScenario
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more