use of org.springframework.data.keyvalue.core.KeyValueTemplate in project spring-data-keyvalue by spring-projects.
the class AbstractRepositoryUnitTests method setup.
@BeforeEach
void setup() {
KeyValueOperations operations = new KeyValueTemplate(new MapKeyValueAdapter());
KeyValueRepositoryFactory keyValueRepositoryFactory = createKeyValueRepositoryFactory(operations);
this.repository = getRepository(keyValueRepositoryFactory);
}
use of org.springframework.data.keyvalue.core.KeyValueTemplate in project spring-data-keyvalue by spring-projects.
the class MapRepositoriesConfigurationExtensionIntegrationTests method assertKeyValueTemplateWithAdapterFor.
private static void assertKeyValueTemplateWithAdapterFor(Class<?> mapType, ApplicationContext context) {
KeyValueTemplate template = context.getBean(KeyValueTemplate.class);
Object adapter = ReflectionTestUtils.getField(template, "adapter");
assertThat(adapter).isInstanceOf(MapKeyValueAdapter.class);
assertThat(ReflectionTestUtils.getField(adapter, "store")).isInstanceOf(mapType);
}
Aggregations