package eu.ydp.empiria.player.client.components;

import com.google.gwt.junit.client.GWTTestCase;
import com.google.gwt.user.client.ui.InlineHTML;

public class ExListBoxTest extends GWTTestCase {

	@Override
	public String getModuleName() {
		return "eu.ydp.empiria.player.Player";
	}

	public void testSelected(){
		ExListBox elb = new ExListBox();
		elb.addOption(new InlineHTML(), new InlineHTML());
		elb.addOption(new InlineHTML(), new InlineHTML());
		elb.setSelectedIndex(0);
		assertEquals(0, elb.getSelectedIndex());
		elb.setSelectedIndex(1);
		assertEquals(1, elb.getSelectedIndex());
		elb.setSelectedIndex(2);
		assertEquals(1, elb.getSelectedIndex());
		elb.setSelectedIndex(-1);
		assertEquals(1, elb.getSelectedIndex());
	}

	public void testEnabled(){
		ExListBox elb = new ExListBox();
		elb.addOption(new InlineHTML(), new InlineHTML());
		elb.addOption(new InlineHTML(), new InlineHTML());
		elb.setSelectedIndex(0);
		assertEquals(0, elb.getSelectedIndex());
		elb.setSelectedIndex(1);
		assertEquals(1, elb.getSelectedIndex());
		elb.setSelectedIndex(2);
		assertEquals(1, elb.getSelectedIndex());
		elb.setSelectedIndex(-1);
		assertEquals(1, elb.getSelectedIndex());
	}
}

@@ -718,32 +718,33 @@
 %0A%09%09assertEquals(
+-
 1, elb.getSelect
@@ -752,24 +752,24 @@
 dIndex());%0D%0A
-
 %09%7D%0D%0A%0D%0A%09publi
@@ -969,261 +969,236 @@
 %0D%0A%09%09
-assertEquals(0, elb.getSelectedIndex());%0D%0A%09%09elb.setSelectedIndex(1);%0D%0A%09%09assertEquals(1, elb.getSelectedIndex());%0D%0A%09%09elb.setSelectedIndex(2);%0D%0A%09%09assertEquals(1, elb.getSelectedIndex());%0D%0A%09%09elb.setSelectedIndex(-1);%0D%0A%09%09assertEquals(1, elb.getSelectedIndex
+elb.setEnabled(true);%0D%0A%09%09assertTrue(elb.getEnabled());%0D%0A%09%09elb.setEnabled(false);%0D%0A%09%09assertFalse(elb.getEnabled());%0D%0A%09%09elb.setEnabled(true);%0D%0A%09%09assertTrue(elb.getEnabled());%0D%0A%09%09elb.setEnabled(false);%0D%0A%09%09assertFalse(elb.getEnabled
 ());

update ExListBox tests task#58489