test: Simplified the integration-tests for `StorageStrategy`
[demos/kafka/chat] / src / test / java / de / juplo / kafka / chat / backend / implementation / inmemory / InMemoryTestUtils.java
1 package de.juplo.kafka.chat.backend.implementation.inmemory;
2
3 import de.juplo.kafka.chat.backend.ChatBackendProperties;
4 import de.juplo.kafka.chat.backend.domain.ChatHomeService;
5 import de.juplo.kafka.chat.backend.implementation.StorageStrategy;
6 import org.springframework.beans.factory.annotation.Autowired;
7
8 import java.time.Clock;
9
10
11 public class InMemoryTestUtils
12 {
13   private final InMemoryServicesConfiguration config =
14       new InMemoryServicesConfiguration();
15
16   @Autowired
17   ChatBackendProperties properties;
18   @Autowired
19   StorageStrategy storageStrategy;
20   @Autowired
21   Clock clock;
22
23
24   public ChatHomeService createNoneShardingChatHomeService()
25   {
26     return config.noneShardingChatHome(
27         properties,
28         storageStrategy,
29         clock);
30   }
31 }