1. Project Clover database Wed Nov 12 2025 05:07:35 UTC
  2. Package guru.mikelue.foxglove

File ColumnMetaTest.java

 

Code metrics

0
4
4
1
47
33
4
1
1
4
1

Classes

Class Line # Actions
ColumnMetaTest 14 4 0% 4 0
1.0100%
 

Contributing tests

No tests hitting this source file were found.

Source view

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   
 
14    public class ColumnMetaTest extends AbstractTestBase {
 
15  1 toggle public ColumnMetaTest() {}
16   
 
17  1 toggle @BeforeEach
18    void setup() {}
19   
 
20  1 toggle @AfterEach
21    void tearDown() {}
22   
23    /**
24    * Tests the {@link String} representation.
25    */
 
26  1 toggle @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    }