Search in sources :

Example 1 with SystemSettings

use of com.codingchili.core.configuration.system.SystemSettings in project chili-core by codingchili.

the class DelayTest method setUp.

@Before
public void setUp() {
    this.context = new ContextMock() {

        @Override
        public SystemSettings system() {
            SystemSettings settings = new SystemSettings();
            settings.setShutdownLogTimeout(1);
            return settings;
        }
    };
    Delay.initialize(context);
}
Also used : ContextMock(com.codingchili.core.testing.ContextMock) SystemSettings(com.codingchili.core.configuration.system.SystemSettings) Before(org.junit.Before)

Example 2 with SystemSettings

use of com.codingchili.core.configuration.system.SystemSettings in project chili-core by codingchili.

the class SystemContextTest method setUp.

@Before
public void setUp() {
    this.settings = Configurations.system();
    settings.getMetrics().setRate(100);
    settings.getMetrics().setEnabled(true);
    this.context = new ContextMock() {

        @Override
        public Logger logger(Class aClass) {
            return new AbstractLogger(getClass()) {

                @Override
                public void onMetricsSnapshot(JsonObject metrics) {
                    listener.onMetric(metrics);
                }
            };
        }

        @Override
        public SystemSettings system() {
            return settings;
        }
    };
}
Also used : JsonObject(io.vertx.core.json.JsonObject) ContextMock(com.codingchili.core.testing.ContextMock) AbstractLogger(com.codingchili.core.logging.AbstractLogger) Logger(com.codingchili.core.logging.Logger) SystemSettings(com.codingchili.core.configuration.system.SystemSettings) AbstractLogger(com.codingchili.core.logging.AbstractLogger)

Aggregations

SystemSettings (com.codingchili.core.configuration.system.SystemSettings)2 ContextMock (com.codingchili.core.testing.ContextMock)2 AbstractLogger (com.codingchili.core.logging.AbstractLogger)1 Logger (com.codingchili.core.logging.Logger)1 JsonObject (io.vertx.core.json.JsonObject)1 Before (org.junit.Before)1