-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
81dbac2
commit 440334c
Showing
8 changed files
with
109 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 29 additions & 29 deletions
58
src/test/java/net/snowflake/client/jdbc/SnowflakeColumnMetadataTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
package net.snowflake.client.jdbc; | ||
|
||
import org.junit.Test; | ||
|
||
import java.util.List; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
import static org.junit.Assert.assertFalse; | ||
import static org.mockito.Mockito.mock; | ||
|
||
import java.util.List; | ||
import org.junit.Test; | ||
|
||
public class SnowflakeColumnMetadataTest { | ||
|
||
@Test | ||
public void testSnowflakeColumnMetaData() { | ||
SnowflakeColumnMetadata metadata = new SnowflakeColumnMetadata("mock",1,true,2,3,4,"fake",true,null,null,null,null,true); | ||
List<FieldMetadata> list = mock(List.class); | ||
metadata.setName("test"); | ||
metadata.setType(10); | ||
metadata.setNullable(false); | ||
metadata.setLength(12); | ||
metadata.setPrecision(13); | ||
metadata.setScale(14); | ||
metadata.setTypeName("type"); | ||
metadata.setFixed(false); | ||
metadata.setFields(list); | ||
metadata.setAutoIncrement(false); | ||
@Test | ||
public void testSnowflakeColumnMetaData() { | ||
SnowflakeColumnMetadata metadata = | ||
new SnowflakeColumnMetadata( | ||
"mock", 1, true, 2, 3, 4, "fake", true, null, null, null, null, true); | ||
List<FieldMetadata> list = mock(List.class); | ||
metadata.setName("test"); | ||
metadata.setType(10); | ||
metadata.setNullable(false); | ||
metadata.setLength(12); | ||
metadata.setPrecision(13); | ||
metadata.setScale(14); | ||
metadata.setTypeName("type"); | ||
metadata.setFixed(false); | ||
metadata.setFields(list); | ||
metadata.setAutoIncrement(false); | ||
|
||
assertEquals(metadata.getName(),"test"); | ||
assertEquals(metadata.getType(),10); | ||
assertFalse(metadata.isNullable()); | ||
assertEquals(metadata.getLength(),12); | ||
assertEquals(metadata.getPrecision(),13); | ||
assertEquals(metadata.getScale(),14); | ||
assertEquals(metadata.getTypeName(),"type"); | ||
assertFalse(metadata.isFixed()); | ||
assertEquals(metadata.getFields(),list); | ||
assertFalse(metadata.isAutoIncrement()); | ||
} | ||
assertEquals(metadata.getName(), "test"); | ||
assertEquals(metadata.getType(), 10); | ||
assertFalse(metadata.isNullable()); | ||
assertEquals(metadata.getLength(), 12); | ||
assertEquals(metadata.getPrecision(), 13); | ||
assertEquals(metadata.getScale(), 14); | ||
assertEquals(metadata.getTypeName(), "type"); | ||
assertFalse(metadata.isFixed()); | ||
assertEquals(metadata.getFields(), list); | ||
assertFalse(metadata.isAutoIncrement()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters