mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Autoformat code
This commit is contained in:
parent
dfac28102e
commit
b8caa00be1
|
@ -222,4 +222,20 @@ version (unittest)
|
||||||
assert(componentA.instance is componentB);
|
assert(componentA.instance is componentB);
|
||||||
assert(componentB.instance is componentA);
|
assert(componentB.instance is componentA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Test autowiring class where a method is marked with @Autowire does nothing
|
||||||
|
unittest
|
||||||
|
{
|
||||||
|
// It should also not show deprecation warning:
|
||||||
|
// Deprecation: `__traits(getAttributes)` may only be used for individual functions, not overload sets such as: `lala`
|
||||||
|
// the result of `__traits(getOverloads)` may be used to select the desired function to extract attributes from
|
||||||
|
|
||||||
|
auto container = new shared DependencyContainer();
|
||||||
|
container.register!AutowiredMethod;
|
||||||
|
auto instance = container.resolve!AutowiredMethod;
|
||||||
|
|
||||||
|
assert(instance !is null);
|
||||||
|
assert(instance.lala == 42);
|
||||||
|
assert(instance.lala(77) == 77);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue