Package com.proofpoint.configuration

Examples of com.proofpoint.configuration.ConfigurationModule


    public void testDefaultConfig()
    {
        long testStartTime = System.currentTimeMillis();

        ConfigurationFactory configFactory = new ConfigurationFactory(ImmutableMap.<String, String>of("node.environment", "environment"));
        Injector injector = Guice.createInjector(new NodeModule(), new ConfigurationModule(configFactory), new ApplicationNameModule("test-application"));
        NodeInfo nodeInfo = injector.getInstance(NodeInfo.class);
        Assert.assertNotNull(nodeInfo);
        Assert.assertEquals(nodeInfo.getApplication(), "test-application");
        Assert.assertEquals(nodeInfo.getEnvironment(), "environment");
        Assert.assertEquals(nodeInfo.getPool(), "general");
View Full Code Here


                .put("node.binary-spec", binarySpec)
                .put("node.config-spec", configSpec)
                .build()
        );

        Injector injector = Guice.createInjector(new NodeModule(), new ConfigurationModule(configFactory), new ApplicationNameModule("test-application"));
        NodeInfo nodeInfo = injector.getInstance(NodeInfo.class);
        Assert.assertNotNull(nodeInfo);
        Assert.assertEquals(nodeInfo.getApplication(), "test-application");
        Assert.assertEquals(nodeInfo.getEnvironment(), environment);
        Assert.assertEquals(nodeInfo.getPool(), pool);
View Full Code Here

    public void testBinding()
            throws Exception
    {
        Injector injector = Guice.createInjector(
                new ApplicationNameModule("test-application"),
                new ConfigurationModule(new ConfigurationFactory(ImmutableMap.of("testing.discovery.uri", "fake://server"))),
                new JsonModule(),
                new TestingNodeModule(),
                new TestingMBeanModule(),
                new ReportingModule(),
                new DiscoveryModule()
View Full Code Here

        Guice.createInjector(
                new ApplicationNameModule("test-application"),
                new TestingNodeModule(),
                new TestingDiscoveryModule(),
                new TestingMBeanModule(),
                new ConfigurationModule(new ConfigurationFactory(ImmutableMap.<String, String>of())),
                new JsonModule(),
                new ReportingModule(),
                new ReportingClientModule());
    }
View Full Code Here

        ConfigurationFactory configurationFactory = new ConfigurationFactory(properties);

        // Required to bind a configuration module and an MBean server when binding an H2EmbeddedDataSourceModule
        List<Module> moduleList = ImmutableList.<Module>builder()
                .add(modules)
                .add(new ConfigurationModule(configurationFactory))
                .add(new Module() {
                    @Override
                    public void configure(Binder binder)
                    {
                        binder.bind(MBeanServer.class).toInstance(mock(MBeanServer.class));
View Full Code Here

        }

        // system modules
        Builder<Module> moduleList = ImmutableList.builder();
        moduleList.add(new LifeCycleModule());
        moduleList.add(new ConfigurationModule(configurationFactory));
        moduleList.add(new ApplicationNameModule(applicationName));
        if (!messages.isEmpty()) {
            moduleList.add(new ValidationErrorModule(messages));
        }
        moduleList.add(new Module()
View Full Code Here

        Injector injector = Guice.createInjector(Stage.PRODUCTION,
                new JmxModule(),
                new ApplicationNameModule("test-application"),
                new TestingNodeModule(),
                new MBeanModule(),
                new ConfigurationModule(configFactory));
        injector.getInstance(JmxAgent.class);
    }
View Full Code Here

    public void setUp()
            throws Exception
    {
        injector = Guice.createInjector(
                new ApplicationNameModule("test-application"),
                new ConfigurationModule(new ConfigurationFactory(ImmutableMap.<String, String>of())),
                new TestingNodeModule(),
                new TestingDiscoveryModule(),
                new TestingMBeanModule(),
                new ReportingModule(),
                new Module()
View Full Code Here

    @Test
    public void testHttpSelectorAnnotation()
    {
        injector = Guice.createInjector(
                new ApplicationNameModule("test-application"),
                new ConfigurationModule(new ConfigurationFactory(ImmutableMap.<String, String>of())),
                new TestingNodeModule(),
                new TestingDiscoveryModule(),
                new TestingMBeanModule(),
                new ReportingModule(),
                new Module()
View Full Code Here

        ConfigurationFactory configFactory = new ConfigurationFactory(properties);
        Injector injector = Guice.createInjector(new HttpServerModule(),
                new ApplicationNameModule("test-application"),
                new TestingNodeModule(),
                new ConfigurationModule(configFactory),
                new NullEventModule(),
                new TestingMBeanModule(),
                new ReportingModule(),
                new Module()
                {
View Full Code Here

TOP

Related Classes of com.proofpoint.configuration.ConfigurationModule

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.