mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Test deprecated options-by-array overload
This commit is contained in:
parent
2278378080
commit
e800a9029e
|
@ -503,6 +503,15 @@ version(unittest) {
|
||||||
assertThrown!ResolveException(container.resolve!TestClass);
|
assertThrown!ResolveException(container.resolve!TestClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Test registering type with option doNotAddConcreteTypeRegistration as array (DEPRECATED)
|
||||||
|
unittest {
|
||||||
|
shared(DependencyContainer) container = new DependencyContainer();
|
||||||
|
container.register!(TestInterface, TestClass)([RegistrationOption.doNotAddConcreteTypeRegistration]);
|
||||||
|
|
||||||
|
auto firstInstance = container.resolve!TestInterface;
|
||||||
|
assertThrown!ResolveException(container.resolve!TestClass);
|
||||||
|
}
|
||||||
|
|
||||||
// Test registering type with option DO_NOT_ADD_CONCRETE_TYPE_REGISTRATION (DEPRECATED)
|
// Test registering type with option DO_NOT_ADD_CONCRETE_TYPE_REGISTRATION (DEPRECATED)
|
||||||
unittest {
|
unittest {
|
||||||
shared(DependencyContainer) container = new DependencyContainer();
|
shared(DependencyContainer) container = new DependencyContainer();
|
||||||
|
|
Loading…
Reference in a new issue