use of se.jbee.inject.config.Options in project silk by jbee.
the class TestMultipleOptionChoicesBinds method thatMultipleOptionChoicesArePossible.
@Test
public void thatMultipleOptionChoicesArePossible() {
Options options = Options.STANDARD.chosen(Choices.A, Choices.D);
Globals globals = Globals.STANDARD.options(options);
Injector injector = Bootstrap.injector(RootBundle.class, globals);
assertEqualSets(new String[] { "A", "D" }, injector.resolve(dependency(String[].class)));
}
use of se.jbee.inject.config.Options in project silk by jbee.
the class TestOptionBinds method assertOptionResolvedToValue.
private static void assertOptionResolvedToValue(Machine actualOption, String expected) {
Options options = Options.STANDARD.chosen(actualOption);
Injector injector = Bootstrap.injector(ModularBindsBundle.class, Globals.STANDARD.options(options));
String[] actual = injector.resolve(dependency(String[].class));
assertArrayEquals(new String[] { expected }, actual);
}