cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

InfoTable.isEmpty() returns true even if getRowCount() > 0

rtaylor-3
1-Newbie

InfoTable.isEmpty() returns true even if getRowCount() > 0

I'm writing some unit tests for a custom extension in ThingWorx 6.5.4.

In my test i create and populate a ValueCollection and add it to a new InfoTable (created using its default constructor).

When i run my test and verify that the table is not empty, it fails.

InfoTable table = new InfoTable();

ValueCollection row = new ValueCollection();

table.addRow(row);

Assert.assertTrue(table.isEmpty());

Assert.assertTrue(table.getRowCount() > 0);

This test passes and i don't understand why.

Javadocs for InfoTable imply that isEmpty():

isEmpty()

Returns a boolean indicating whether this InfoTable has a size of zero

This makes no sense to me.

What am i missing?

0 REPLIES 0
Top Tags