Search in sources :

Example 1 with MongoJackObjectMapperProvider

use of org.graylog2.bindings.providers.MongoJackObjectMapperProvider in project graylog2-server by Graylog2.

the class ClusterEventCleanupPeriodicalTest method setUpService.

@Before
public void setUpService() throws Exception {
    DateTimeUtils.setCurrentMillisFixed(TIME.getMillis());
    this.mongoConnection = mongoRule.getMongoConnection();
    MongoJackObjectMapperProvider provider = new MongoJackObjectMapperProvider(objectMapper);
    this.clusterEventCleanupPeriodical = new ClusterEventCleanupPeriodical(provider, mongoRule.getMongoConnection());
}
Also used : MongoJackObjectMapperProvider(org.graylog2.bindings.providers.MongoJackObjectMapperProvider) Before(org.junit.Before)

Example 2 with MongoJackObjectMapperProvider

use of org.graylog2.bindings.providers.MongoJackObjectMapperProvider in project graylog2-server by Graylog2.

the class ClusterEventPeriodicalTest method setUpService.

@Before
public void setUpService() throws Exception {
    DateTimeUtils.setCurrentMillisFixed(TIME.getMillis());
    this.mongoConnection = mongoRule.getMongoConnection();
    MongoJackObjectMapperProvider provider = new MongoJackObjectMapperProvider(objectMapper);
    when(nodeId.toString()).thenReturn("ID");
    this.clusterEventPeriodical = new ClusterEventPeriodical(provider, mongoRule.getMongoConnection(), nodeId, new ChainingClassLoader(getClass().getClassLoader()), serverEventBus, clusterEventBus);
}
Also used : MongoJackObjectMapperProvider(org.graylog2.bindings.providers.MongoJackObjectMapperProvider) ChainingClassLoader(org.graylog2.shared.plugins.ChainingClassLoader) Before(org.junit.Before)

Example 3 with MongoJackObjectMapperProvider

use of org.graylog2.bindings.providers.MongoJackObjectMapperProvider in project graylog2-server by Graylog2.

the class DecoratorServiceImplTest method setUp.

@Before
public void setUp() {
    final ObjectMapperProvider objectMapperProvider = new ObjectMapperProvider();
    final MongoJackObjectMapperProvider provider = new MongoJackObjectMapperProvider(objectMapperProvider.get());
    decoratorService = new DecoratorServiceImpl(mongoRule.getMongoConnection(), provider);
}
Also used : MongoJackObjectMapperProvider(org.graylog2.bindings.providers.MongoJackObjectMapperProvider) MongoJackObjectMapperProvider(org.graylog2.bindings.providers.MongoJackObjectMapperProvider) ObjectMapperProvider(org.graylog2.shared.bindings.providers.ObjectMapperProvider) Before(org.junit.Before)

Example 4 with MongoJackObjectMapperProvider

use of org.graylog2.bindings.providers.MongoJackObjectMapperProvider in project graylog2-server by Graylog2.

the class ClusterConfigServiceImplTest method setUpService.

@Before
public void setUpService() throws Exception {
    DateTimeUtils.setCurrentMillisFixed(TIME.getMillis());
    this.mongoConnection = mongoRule.getMongoConnection();
    MongoJackObjectMapperProvider provider = new MongoJackObjectMapperProvider(objectMapper);
    when(nodeId.toString()).thenReturn("ID");
    this.clusterConfigService = new ClusterConfigServiceImpl(provider, mongoRule.getMongoConnection(), nodeId, new ChainingClassLoader(getClass().getClassLoader()), clusterEventBus);
}
Also used : MongoJackObjectMapperProvider(org.graylog2.bindings.providers.MongoJackObjectMapperProvider) ChainingClassLoader(org.graylog2.shared.plugins.ChainingClassLoader) Before(org.junit.Before)

Example 5 with MongoJackObjectMapperProvider

use of org.graylog2.bindings.providers.MongoJackObjectMapperProvider in project graylog2-server by Graylog2.

the class BundleServiceTest method setUp.

@Before
public void setUp() throws Exception {
    final ObjectMapper objectMapper = new ObjectMapperProvider().get();
    bundleService = new BundleService(new MongoJackObjectMapperProvider(objectMapper), mongoRule.getMongoConnection(), bundleImporterProvider, bundleExporterProvider);
}
Also used : MongoJackObjectMapperProvider(org.graylog2.bindings.providers.MongoJackObjectMapperProvider) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) MongoJackObjectMapperProvider(org.graylog2.bindings.providers.MongoJackObjectMapperProvider) ObjectMapperProvider(org.graylog2.shared.bindings.providers.ObjectMapperProvider) Before(org.junit.Before)

Aggregations

MongoJackObjectMapperProvider (org.graylog2.bindings.providers.MongoJackObjectMapperProvider)6 Before (org.junit.Before)6 ObjectMapperProvider (org.graylog2.shared.bindings.providers.ObjectMapperProvider)3 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)2 ChainingClassLoader (org.graylog2.shared.plugins.ChainingClassLoader)2