From 5a67cc27e743874c560123011dc910d22f2f71b8 Mon Sep 17 00:00:00 2001 From: Arvid Gerstmann Date: Tue, 22 Oct 2024 16:20:12 +0000 Subject: [PATCH] dep test --- ferrunix/tests/it/derive_async.rs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/ferrunix/tests/it/derive_async.rs b/ferrunix/tests/it/derive_async.rs index 381958d..d0e984d 100644 --- a/ferrunix/tests/it/derive_async.rs +++ b/ferrunix/tests/it/derive_async.rs @@ -27,13 +27,24 @@ use ferrunix::{Inject, RegistrationFunc, Registry}; // ferrunix::autoregister!(RegistrationFunc::new(Empty::register)); + +#[derive(Inject)] +#[provides(transient)] +struct Dep0 {} + #[derive(Inject)] -#[provides(transient = "StringTemplate")] -struct StringTemplate { - #[inject(ctor = r#""The Magic Number is ""#)] - raw: &'static str, +#[provides(transient)] +struct Dep1 { + #[inject(transient)] + dep0: Dep0, } +#[derive(Inject)] +#[provides(transient)] +struct Dep2 { + #[inject(transient)] + dep1: Dep1, +} #[tokio::test] async fn simple_derive() {