Search in sources :

Example 6 with ContextMock

use of com.codingchili.core.testing.ContextMock in project chili-core by codingchili.

the class FileWatcherIT method setUp.

@Before
public void setUp() {
    this.context = new ContextMock();
    Delay.initialize(context);
}
Also used : ContextMock(com.codingchili.core.testing.ContextMock) Before(org.junit.Before)

Example 7 with ContextMock

use of com.codingchili.core.testing.ContextMock in project chili-core by codingchili.

the class ClusterListenerTest method setUp.

@Before
public void setUp(TestContext test) {
    Async async = test.async();
    this.context = new ContextMock();
    this.handler = new TestHandler(context, REPLY_ADDRESS);
    this.cluster = new ClusterListener().handler(handler).settings(new ListenerSettings());
    context.listener(() -> cluster).onComplete(done -> {
        if (done.failed()) {
            done.cause().printStackTrace();
        }
        test.assertTrue(done.succeeded());
        this.deployment = done.result();
        async.complete();
    });
}
Also used : Async(io.vertx.ext.unit.Async) ClusterListener(com.codingchili.core.listener.transport.ClusterListener) ContextMock(com.codingchili.core.testing.ContextMock)

Example 8 with ContextMock

use of com.codingchili.core.testing.ContextMock in project chili-core by codingchili.

the class ConfigurationsTest method setUp.

@Before
public void setUp() {
    Configurations.shutdown();
    context = new ContextMock();
}
Also used : ContextMock(com.codingchili.core.testing.ContextMock)

Example 9 with ContextMock

use of com.codingchili.core.testing.ContextMock in project chili-core by codingchili.

the class ConsoleLoggerTest method setUp.

@BeforeClass
public static void setUp() {
    context = new ContextMock();
    logger = new ConsoleLogger(context, ConsoleLoggerTest.class);
}
Also used : ContextMock(com.codingchili.core.testing.ContextMock)

Aggregations

ContextMock (com.codingchili.core.testing.ContextMock)9 SystemSettings (com.codingchili.core.configuration.system.SystemSettings)2 Logger (com.codingchili.core.logging.Logger)2 Async (io.vertx.ext.unit.Async)2 Before (org.junit.Before)2 ConfigurableTest (com.codingchili.core.configuration.ConfigurableTest)1 ClusterListener (com.codingchili.core.listener.transport.ClusterListener)1 AbstractLogger (com.codingchili.core.logging.AbstractLogger)1 ConsoleLogger (com.codingchili.core.logging.ConsoleLogger)1 TrustAndKeyProvider (com.codingchili.core.security.TrustAndKeyProvider)1 JsonObject (io.vertx.core.json.JsonObject)1 Test (org.junit.Test)1