| 1 |
|
package guru.mikelue.foxglove; |
| 2 |
|
|
| 3 |
|
import java.sql.JDBCType; |
| 4 |
|
import java.util.EnumSet; |
| 5 |
|
|
| 6 |
|
import org.junit.jupiter.api.AfterEach; |
| 7 |
|
import org.junit.jupiter.api.BeforeEach; |
| 8 |
|
import org.junit.jupiter.api.Test; |
| 9 |
|
|
| 10 |
|
import guru.mikelue.misc.testlib.AbstractTestBase; |
| 11 |
|
|
| 12 |
|
import static org.assertj.core.api.Assertions.assertThat; |
| 13 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 4 |
Complexity Density: 1 |
|
| 14 |
|
public class ColumnMetaTest extends AbstractTestBase { |
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 15 |
1 |
public ColumnMetaTest() {}... |
| 16 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 17 |
1 |
@BeforeEach... |
| 18 |
|
void setup() {} |
| 19 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 20 |
1 |
@AfterEach... |
| 21 |
|
void tearDown() {} |
| 22 |
|
|
| 23 |
|
|
| 24 |
|
@link |
| 25 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
1PASS
|
|
| 26 |
1 |
@Test... |
| 27 |
|
void testToString() |
| 28 |
|
{ |
| 29 |
1 |
final String columnName = "ap_address"; |
| 30 |
|
|
| 31 |
1 |
ColumnMeta testedInstance = new ColumnMeta( |
| 32 |
|
columnName, |
| 33 |
|
EnumSet.allOf(ColumnMeta.Property.class), |
| 34 |
|
"VARCHAR", |
| 35 |
|
JDBCType.VARCHAR, |
| 36 |
|
32, 10 |
| 37 |
|
); |
| 38 |
|
|
| 39 |
1 |
getLogger().info("ColumnMeta.toString(): {}", testedInstance.toString()); |
| 40 |
|
|
| 41 |
1 |
assertThat(testedInstance.toString()) |
| 42 |
|
.contains(columnName) |
| 43 |
|
.contains("JDBC<VARCHAR>", "VARCHAR") |
| 44 |
|
.contains("NULLABLE", "DEFAULT_VALUE", "AUTO_INCREMENT", "GENERATED") |
| 45 |
|
.contains("32", "10"); |
| 46 |
|
} |
| 47 |
|
} |