Search in sources :

Example 1 with MongoDBTestService

use of org.graylog.testing.mongodb.MongoDBTestService in project graylog2-server by Graylog2.

the class EncryptedValueTest method setUp.

@BeforeEach
void setUp(MongoDBTestService mongodb) {
    encryptedValueService = new EncryptedValueService("1234567890abcdef");
    this.objectMapper = new ObjectMapperProvider(ObjectMapperProvider.class.getClassLoader(), Collections.emptySet(), encryptedValueService, GRNRegistry.createWithBuiltinTypes()).get();
    this.dbService = new TestService(mongodb.mongoConnection(), new MongoJackObjectMapperProvider(objectMapper));
}
Also used : MongoDBTestService(org.graylog.testing.mongodb.MongoDBTestService) MongoJackObjectMapperProvider(org.graylog2.bindings.providers.MongoJackObjectMapperProvider) MongoJackObjectMapperProvider(org.graylog2.bindings.providers.MongoJackObjectMapperProvider) ObjectMapperProvider(org.graylog2.shared.bindings.providers.ObjectMapperProvider) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

MongoDBTestService (org.graylog.testing.mongodb.MongoDBTestService)1 MongoJackObjectMapperProvider (org.graylog2.bindings.providers.MongoJackObjectMapperProvider)1 ObjectMapperProvider (org.graylog2.shared.bindings.providers.ObjectMapperProvider)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1