|
| 1 | +/* |
| 2 | + * Copyright 2021 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 | +package org.springframework.data.jdbc.core.dialect; |
| 17 | + |
| 18 | +import static org.assertj.core.api.Assertions.*; |
| 19 | + |
| 20 | +import org.junit.jupiter.api.Test; |
| 21 | +import org.postgresql.geometric.PGbox; |
| 22 | +import org.postgresql.geometric.PGcircle; |
| 23 | +import org.postgresql.geometric.PGlseg; |
| 24 | +import org.postgresql.geometric.PGpath; |
| 25 | +import org.postgresql.geometric.PGpoint; |
| 26 | +import org.postgresql.geometric.PGpolygon; |
| 27 | +import org.postgresql.util.PGobject; |
| 28 | + |
| 29 | +/** |
| 30 | + * Unit tests for {@link JdbcPostgresDialect}. |
| 31 | + * |
| 32 | + * @author Jens Schauder |
| 33 | + */ |
| 34 | +public class JdbcPostgresDialectUnitTests { |
| 35 | + |
| 36 | + @Test // GH-1065 |
| 37 | + void pgobjectIsConsideredSimple() { |
| 38 | + assertThat(JdbcPostgresDialect.INSTANCE.simpleTypes()).contains(PGobject.class); |
| 39 | + } |
| 40 | + |
| 41 | + @Test // GH-1065 |
| 42 | + void geometricalTypesAreConsideredSimple() { |
| 43 | + |
| 44 | + assertThat(JdbcPostgresDialect.INSTANCE.simpleTypes()).contains( // |
| 45 | + PGpoint.class, // |
| 46 | + PGbox.class, // |
| 47 | + PGcircle.class, // |
| 48 | + org.postgresql.geometric.PGline.class, // |
| 49 | + PGpath.class, // |
| 50 | + PGpolygon.class, // |
| 51 | + PGlseg.class); |
| 52 | + } |
| 53 | +} |
0 commit comments