- @Autowired
- MongoDbStorageStrategy storageStrategy;
- @Autowired
- ChatRoomRepository chatRoomRepository;
- @Autowired
- MessageRepository messageRepository;
-
-
- public InMemoryWithMongoDbStorageIT()
- {
- super(Clock.systemDefaultZone());
- }
-
-
- @Override
- protected StorageStrategy getStorageStrategy()
- {
- return storageStrategy;
- }
-
- @TestConfiguration
- static class InMemoryWithMongoDbStorageStrategyITConfig
- {
- @Bean
- MongoDbStorageStrategy storageStrategy(
- ChatRoomRepository chatRoomRepository,
- MessageRepository messageRepository)
- {
- return new MongoDbStorageStrategy(chatRoomRepository, messageRepository);
- }
-
- @Bean
- Clock clock()
- {
- return Clock.systemDefaultZone();
- }
- }
-