Simple dependency injection framework for D.
Based on Jakub Stasiak similar work.
import std.conv : to;
import std.stdio : writefln;
import endovena;
interface IGreeter {
string greet();
}
class Greeter: IGreeter {
string greet() { return "Hello!"; }
}
void main() {
Container container;
container.register!(IGreeter, Greeter);
auto greeter = container.get!IGreeter();
writefln(greeter.greet)
}
Output:
Hello!
See also directory tests/
and wiki.
You can use dub:
$ dub build
Or (on linux) makefile:
$ make
You need to have dub >= 0.9.21 installed and reacheble from your PATH.
dub --verbose test
or with make:
$ make
- dryioc C# IoC
- unit-threaded Multi-threaded unit test framework for D.
Distributed under the Boost Software License, Version 1.0. See copy at http://www.boost.org/LICENSE_1_0.txt.