From 17c833a1143608c36f64df455b6341f6d14b3114 Mon Sep 17 00:00:00 2001 From: Mike Bierlee Date: Sun, 22 Jun 2014 16:13:25 +0200 Subject: [PATCH] Use auto instead of explicit type in autowiretest --- test/poodinis/autowiretest.d | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/poodinis/autowiretest.d b/test/poodinis/autowiretest.d index 672777a..37fed0c 100644 --- a/test/poodinis/autowiretest.d +++ b/test/poodinis/autowiretest.d @@ -46,7 +46,7 @@ version(unittest) { unittest { auto container = new Container(); container.register!ComponentA; - ComponentB componentB = new ComponentB(); + auto componentB = new ComponentB(); container.autowire!(ComponentB)(componentB); assert(!componentB.componentIsNull(), "Autowirable dependency failed to autowire"); } @@ -55,7 +55,7 @@ version(unittest) { unittest { auto container = new Container(); container.register!(InterfaceA, ComponentC); - ComponentD componentD = new ComponentD(); + auto componentD = new ComponentD(); container.autowire!(ComponentD)(componentD); assert(!componentD.componentIsNull(), "Autowirable dependency failed to autowire"); } @@ -64,7 +64,7 @@ version(unittest) { unittest { auto container = new Container(); container.register!(InterfaceA, ComponentC).newInstance(); - ComponentD componentD = new ComponentD(); + auto componentD = new ComponentD(); container.autowire!(ComponentD)(componentD); auto expectedComponent = componentD.componentC; container.autowire!(ComponentD)(componentD); @@ -75,14 +75,14 @@ version(unittest) { // Test autowiring unregistered type unittest { auto container = new Container(); - ComponentD componentD = new ComponentD(); + auto componentD = new ComponentD(); assertThrown!(ResolveException)(container.autowire!(ComponentD)(componentD), "Autowiring unregistered type should throw ResolveException"); } // Test autowiring member with non-autowire attribute does not autowire unittest { auto container = new Container(); - ComponentE componentE = new ComponentE(); + auto componentE = new ComponentE(); container.autowire!ComponentE(componentE); assert(componentE.componentC is null, "Autowiring should not occur for members with attributes other than @Autowire"); }