I'm having an issue getting column IDs back for a sheet. Below is my unit test that is failing. Any thoughts about what I'm doing wrong? It doesn't look like the ID is getting into the Column model.
It is failing with: java.lang.AssertionError: Column "Primary Column" has null Id.
@Test
public void getColumnInfo() {
try {
Token token = new Token();
token.setAccessToken(TEST_API_TOKEN);
Smartsheet conn = new SmartsheetBuilder().setAccessToken(token.getAccessToken()).build();
List<Column> columns = conn.sheets().columns().listColumns(TEST_SHEET_ID);
org.junit.Assert.assertTrue("Sheet has columns.", columns.size() > 0);
for (Column column : columns) {
String columnName = column.getTitle();
org.junit.Assert.assertNotNull("Column has null Title.", columnName);
org.junit.Assert.assertNotNull("Column \"" + columnName + "\" has null Index.", column.getIndex());
org.junit.Assert.assertNotNull("Column \"" + columnName + "\" has null Type.", column.getType());
org.junit.Assert.assertNotNull("Column \"" + columnName + "\" has null Id.", column.getId());
}
} catch (Exception ex) {
org.junit.Assert.assertNull("Exception calling API.", ex);
}
}
This is v1.1.0 of the Smartsheet Java SDK.