mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Cleanup whitespace
This commit is contained in:
parent
9334f8864e
commit
85c31574ac
|
@ -22,7 +22,7 @@ version(unittest) {
|
||||||
|
|
||||||
class ComponentD {
|
class ComponentD {
|
||||||
public @Autowire InterfaceA componentC = null;
|
public @Autowire InterfaceA componentC = null;
|
||||||
private @Autowire InterfaceA privateComponentC = null;
|
private @Autowire InterfaceA privateComponentC = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
class DummyAttribute{};
|
class DummyAttribute{};
|
||||||
|
@ -91,14 +91,14 @@ version(unittest) {
|
||||||
assert(componentD.componentC !is null, "Autowirable dependency failed to autowire");
|
assert(componentD.componentC !is null, "Autowirable dependency failed to autowire");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test autowiring private members
|
// Test autowiring private members
|
||||||
unittest {
|
unittest {
|
||||||
shared(DependencyContainer) container = new DependencyContainer();
|
shared(DependencyContainer) container = new DependencyContainer();
|
||||||
container.register!(InterfaceA, ComponentC);
|
container.register!(InterfaceA, ComponentC);
|
||||||
auto componentD = new ComponentD();
|
auto componentD = new ComponentD();
|
||||||
container.autowire!(ComponentD)(componentD);
|
container.autowire!(ComponentD)(componentD);
|
||||||
assert(componentD.privateComponentC is componentD.componentC, "Autowire private dependency failed");
|
assert(componentD.privateComponentC is componentD.componentC, "Autowire private dependency failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test autowiring will only happen once
|
// Test autowiring will only happen once
|
||||||
unittest {
|
unittest {
|
||||||
|
@ -208,10 +208,10 @@ version(unittest) {
|
||||||
container.register!ComponentA;
|
container.register!ComponentA;
|
||||||
container.register!ComponentB;
|
container.register!ComponentB;
|
||||||
container.register!ComponentZ;
|
container.register!ComponentZ;
|
||||||
|
|
||||||
auto instance = new ComponentZ();
|
auto instance = new ComponentZ();
|
||||||
container.autowire(instance);
|
container.autowire(instance);
|
||||||
|
|
||||||
assert(instance.componentA !is null);
|
assert(instance.componentA !is null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue