use of org.springframework.data.redis.core.BoundHashOperations in project spring-cloud-config by spring-cloud.
the class RedisEnvironmentRepositoryIntegrationTests method test.
@Test
public void test() {
BoundHashOperations bound = redis.boundHashOps("foo-bar");
bound.put("name", "foo");
bound.put("tag", "myapp");
Environment env = new RedisEnvironmentRepository(redis, new RedisEnvironmentProperties()).findOne("foo", "bar", "");
assertThat(env.getName()).isEqualTo("foo");
assertThat(env.getPropertySources()).isNotEmpty();
assertThat(env.getPropertySources().get(0).getSource().get("tag")).isEqualTo("myapp");
}
Aggregations