|
18 | 18 | import static org.assertj.core.api.Assertions.assertThat; |
19 | 19 | import static org.assertj.core.api.Assertions.assertThatExceptionOfType; |
20 | 20 |
|
| 21 | +import java.net.URL; |
21 | 22 | import java.text.SimpleDateFormat; |
22 | 23 | import java.time.ZoneId; |
23 | 24 | import java.time.ZonedDateTime; |
|
57 | 58 | import org.springframework.data.neo4j.core.transaction.Neo4jBookmarkManager; |
58 | 59 | import org.springframework.data.neo4j.core.transaction.Neo4jTransactionManager; |
59 | 60 | import org.springframework.data.neo4j.integration.shared.common.AllArgsCtorNoBuilder; |
| 61 | +import org.springframework.data.neo4j.integration.shared.common.ThingWithAllCypherTypes; |
60 | 62 | import org.springframework.data.neo4j.integration.shared.common.ThingWithAllCypherTypes2; |
| 63 | +import org.springframework.data.neo4j.integration.shared.common.ThingWithAllSpatialTypes; |
| 64 | +import org.springframework.data.neo4j.integration.shared.common.ThingWithUUIDID; |
61 | 65 | import org.springframework.data.neo4j.integration.shared.conversion.Neo4jConversionsITBase; |
62 | 66 | import org.springframework.data.neo4j.integration.shared.conversion.ThingWithAllAdditionalTypes; |
63 | | -import org.springframework.data.neo4j.integration.shared.common.ThingWithAllCypherTypes; |
64 | | -import org.springframework.data.neo4j.integration.shared.common.ThingWithAllSpatialTypes; |
65 | 67 | import org.springframework.data.neo4j.integration.shared.conversion.ThingWithCustomTypes; |
66 | | -import org.springframework.data.neo4j.integration.shared.common.ThingWithUUIDID; |
67 | 68 | import org.springframework.data.neo4j.repository.Neo4jRepository; |
68 | 69 | import org.springframework.data.neo4j.repository.config.EnableNeo4jRepositories; |
69 | 70 | import org.springframework.data.neo4j.test.BookmarkCapture; |
@@ -160,8 +161,17 @@ Stream<DynamicNode> conversionsShouldBeAppliedToEntities() { |
160 | 161 |
|
161 | 162 | DynamicContainer reads = DynamicContainer.dynamicContainer("read", |
162 | 163 | entry.getValue().entrySet().stream().map(a -> DynamicTest.dynamicTest(a.getKey(), |
163 | | - () -> assertThat(ReflectionTestUtils.getField(thing, a.getKey())) |
164 | | - .isEqualTo(a.getValue())))); |
| 164 | + () -> { |
| 165 | + Object actual = ReflectionTestUtils.getField(thing, a.getKey()); |
| 166 | + Object expected = a.getValue(); |
| 167 | + if (actual instanceof URL && expected instanceof URL) { |
| 168 | + // The host has been chosen to avoid interaction with the URLStreamHandler |
| 169 | + // Should be enough for our comparision. |
| 170 | + actual = ((URL) actual).getHost(); |
| 171 | + expected = ((URL) expected).getHost(); |
| 172 | + } |
| 173 | + assertThat(actual).isEqualTo(expected); |
| 174 | + }))); |
165 | 175 |
|
166 | 176 | DynamicContainer writes = DynamicContainer.dynamicContainer("write", entry.getValue().keySet().stream() |
167 | 177 | .map(o -> DynamicTest |
|
0 commit comments