Skip to content

Commit 5be0049

Browse files
nosanmhalbritter
authored andcommitted
Add a test to verify that ReflectionHint for Hazelcast ClientConfig is present
See gh-42874
1 parent 6fce6ff commit 5be0049

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright 2012-2024 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.springframework.boot.testcontainers.service.connection.hazelcast;
18+
19+
import com.hazelcast.client.config.ClientConfig;
20+
import org.junit.jupiter.api.Test;
21+
22+
import org.springframework.aot.hint.RuntimeHints;
23+
import org.springframework.aot.hint.predicate.RuntimeHintsPredicates;
24+
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionDetailsFactoryHints;
25+
26+
import static org.assertj.core.api.Assertions.assertThat;
27+
28+
/**
29+
* Tests for {@link HazelcastContainerConnectionDetailsFactory}.
30+
*
31+
* @author Dmytro Nosan
32+
*/
33+
class HazelcastContainerConnectionDetailsFactoryTests {
34+
35+
@Test
36+
void shouldRegisterHints() {
37+
RuntimeHints hints = ContainerConnectionDetailsFactoryHints.getRegisteredHints(getClass().getClassLoader());
38+
assertThat(RuntimeHintsPredicates.reflection().onType(ClientConfig.class)).accepts(hints);
39+
}
40+
41+
}

0 commit comments

Comments
 (0)