MCPcopy Create free account
hub / github.com/Migorithm/rustiful-backend / test_event_handler

Method test_event_handler

library/src/services/handlers.rs:108–123  ·  view source on GitHub ↗
(
        _event: BoardCreated,
        context: AtomicContextManager,
        some_dependency: fn(String, i32) -> ServiceResponse,
    )

Source from the content-addressed store, hash-verified

106pub struct EventHandler;
107impl EventHandler {
108 pub fn test_event_handler(
109 _event: BoardCreated,
110 context: AtomicContextManager,
111 some_dependency: fn(String, i32) -> ServiceResponse,
112 ) -> Future<ServiceResponse> {
113 Box::pin(async move {
114 let mut uow =
115 UnitOfWork::<Repository<BoardAggregate>>::new(context.clone())
116 .await?;
117
118 println!("You got here!");
119 uow.commit().await?;
120
121 Ok(some_dependency("well..".into(), 1))
122 })
123 }
124 pub fn test_event_handler2(
125 _event: BoardCreated,
126 context: AtomicContextManager,

Callers

nothing calls this directly

Calls 1

commitMethod · 0.45

Tested by

no test coverage detected