*/
package jalview.gui;
+import static org.testng.Assert.assertEquals;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertNotNull;
import static org.testng.AssertJUnit.assertTrue;
import java.util.Collection;
import java.util.Vector;
+import javax.swing.JComboBox;
+
import org.junit.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
SequenceI[] selectedSeqs = new SequenceI[] { seq };
StructureChooser sc = new StructureChooser(selectedSeqs, seq, null);
+
+ // if structures are not discovered then don't
+ // populate filter options
sc.populateFilterComboBox(false, false);
int optionsSize = sc.getCmbFilterOption().getItemCount();
- assertEquals(2, optionsSize); // if structures are not discovered then don't
- // populate filter options
+ System.out.println("Items (no data, no cache): ");
+ StringBuilder items = new StringBuilder();
+ for (int p=0;p<optionsSize;p++)
+ {
+ items.append
+ ("- ").append(sc.getCmbFilterOption().getItemAt(p).getName()).append("\n");
+
+ }
+ // report items when this fails - seems to be a race condition
+ assertEquals(optionsSize,2,items.toString());
sc.populateFilterComboBox(true, false);
optionsSize = sc.getCmbFilterOption().getItemCount();