package jp.sourceforge.cfneo.at4ie.api.impl.ie.invoker;

import static org.junit.Assert.*;
import jp.sourceforge.cfneo.at4ie.api.ActionCommandEnum;
import jp.sourceforge.cfneo.at4ie.api.impl.DefaultTestCase;
import jp.sourceforge.cfneo.at4ie.api.impl.ie.AT4IEInternetExplorer;
import jp.sourceforge.cfneo.at4ie.api.impl.ie.DefaultContext;

import org.junit.Test;

public class AssertSelectedOptionInvokerTest {

	@Test
	public void testInvoke() {
		try {
			AT4IEInternetExplorer ie = new AT4IEInternetExplorer();
			// Open.
			ie.start("C:\\home\\eclipse\\workspace\\AutoTester4IE\\src\\test\\resources\\htmltest\\watijtest1.html");

			// doTest.
			DefaultContext context = new DefaultContext();
			DefaultTestCase testCase = new DefaultTestCase(
					context, ActionCommandEnum.ASSERT_SELECTED_OPTIONS,
					"id=select1",
					"a:abcde\\,b:bcdef\\,c:cdefg");
			AssertSelectedOptionInvoker invoker = new AssertSelectedOptionInvoker(context, ie);
			invoker.invoke(testCase);
			// Close.
			ie.close();
		} catch (Exception e) {
			e.printStackTrace();
			fail();
		}
	}

}
