diff --git a/test/poodinis/containertest.d b/test/poodinis/containertest.d index 457553e..a1fb291 100644 --- a/test/poodinis/containertest.d +++ b/test/poodinis/containertest.d @@ -94,4 +94,13 @@ version(unittest) { } } + // Test resolve single instance for type + unittest { + auto container = new Container(); + container.register!(TestClass)().singleInstance(); + auto instance1 = container.resolve!(TestClass); + auto instance2 = container.resolve!(TestClass); + assert(instance1 is instance2); + } + } \ No newline at end of file