mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Fix test to properly test the variadic variant
This commit is contained in:
parent
e800a9029e
commit
f67e67b93c
|
@ -528,10 +528,10 @@ version(unittest) {
|
||||||
container.resolve!TestClass;
|
container.resolve!TestClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test registering type with options in the DEPRECATED way
|
// Test registering type with option doNotAddConcreteTypeRegistration as variadic (DEPRECATED)
|
||||||
unittest {
|
unittest {
|
||||||
shared(DependencyContainer) container = new DependencyContainer();
|
shared(DependencyContainer) container = new DependencyContainer();
|
||||||
container.register!(TestInterface, TestClass)(RegistrationOption.doNotAddConcreteTypeRegistration);
|
container.register!(TestInterface, TestClass)(RegistrationOption.none, RegistrationOption.doNotAddConcreteTypeRegistration);
|
||||||
|
|
||||||
auto firstInstance = container.resolve!TestInterface;
|
auto firstInstance = container.resolve!TestInterface;
|
||||||
assertThrown!ResolveException(container.resolve!TestClass);
|
assertThrown!ResolveException(container.resolve!TestClass);
|
||||||
|
|
Loading…
Reference in a new issue