package to.etc.domui.test.theme;

import org.junit.*;
import org.mozilla.javascript.*;

import to.etc.domui.server.*;
import to.etc.domui.test.util.*;

public class TestRhino {
	private DomApplication m_da;

	@Before
	public void setUp() throws Exception {
		m_da = DomUITestUtil.getApplication();
	}

	@Test
	public void testRhino1() throws Exception {
		Context cx = Context.enter();

		try {
			Scriptable scope = cx.initStandardObjects();

			String evl = "icon = new Object(); icon['btnOkay.png\'] = 'btnOkay.svg.png?w=10&h=10';";
			Object res = cx.evaluateString(scope, evl, "<cmd>", 1, null);

			Object val = scope.get("icon", scope);
			System.out.println("Icon = " + Context.toString(val));
			if(val instanceof Scriptable) {
				Scriptable icon = (Scriptable) val;
				Object mapped = icon.get("btnOkay.png", icon);
				System.out.println("Mapped = " + mapped);
			}


		} finally {
			Context.exit();
		}


	}

}

@@ -139,13 +139,15 @@
 test
-.util
+support
 .*;%0A
@@ -265,21 +265,18 @@
 a = 
+TUtil
 DomUI
-TestUtil
 .get

Fix JUnit test changes.