Package restx.config

Examples of restx.config.ElementsFromConfigFactoryMachine


    @Test
    public void should_provide_config_elements_as_named_strings() throws Exception {
        Factory factory = Factory.builder()
                .addMachine(new ConsolidatedConfigFactoryMachine())
                .addMachine(new ElementsFromConfigFactoryMachine())
                .addMachine(configSupplierMachine(0, "s1", ConfigElement.of("key1", "val1")))
                .addMachine(configSupplierMachine(0, "s2", ConfigElement.of("key2", "val2")))
                .build();

        Optional<String> s = factory.queryByName(Name.of(String.class, "key1")).findOneAsComponent();
View Full Code Here


    @Test
    public void should_provide_individual_config_elements() throws Exception {
        Factory factory = Factory.builder()
                .addMachine(new ConsolidatedConfigFactoryMachine())
                .addMachine(new ElementsFromConfigFactoryMachine())
                .addMachine(configSupplierMachine(0, "s1", ConfigElement.of("o1", "d1", "key1", "val1")))
                .build();

        Optional<ConfigElement> s = factory.queryByName(Name.of(ConfigElement.class, "key1")).findOneAsComponent();
View Full Code Here

TOP

Related Classes of restx.config.ElementsFromConfigFactoryMachine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.