jaroslav@1337: /** jaroslav@1337: * Back 2 Browser Bytecode Translator jaroslav@1337: * Copyright (C) 2012 Jaroslav Tulach jaroslav@1337: * jaroslav@1337: * This program is free software: you can redistribute it and/or modify jaroslav@1337: * it under the terms of the GNU General Public License as published by jaroslav@1337: * the Free Software Foundation, version 2 of the License. jaroslav@1337: * jaroslav@1337: * This program is distributed in the hope that it will be useful, jaroslav@1337: * but WITHOUT ANY WARRANTY; without even the implied warranty of jaroslav@1337: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jaroslav@1337: * GNU General Public License for more details. jaroslav@1337: * jaroslav@1337: * You should have received a copy of the GNU General Public License jaroslav@1337: * along with this program. Look for COPYING file in the top folder. jaroslav@1337: * If not, see http://opensource.org/licenses/GPL-2.0. jaroslav@1337: */ jaroslav@1337: package org.apidesign.bck2brwsr.tck; jaroslav@1337: jaroslav@1337: import java.net.URL; jaroslav@1337: import java.util.ResourceBundle; jaroslav@1337: import org.apidesign.bck2brwsr.vmtest.Compare; jaroslav@1337: import org.apidesign.bck2brwsr.vmtest.VMTest; jaroslav@1337: import org.testng.annotations.Factory; jaroslav@1337: jaroslav@1337: /** jaroslav@1337: * jaroslav@1337: * @author Jaroslav Tulach jaroslav@1337: */ jaroslav@1337: public class ResourceBundleTest { jaroslav@1337: jaroslav@1337: @Compare public String readFromBundle() throws Exception { jaroslav@1337: ResourceBundle b = ResourceBundle.getBundle("org/apidesign/bck2brwsr/tck/Bundle"); jaroslav@1337: return b.getString("KEY"); jaroslav@1337: } jaroslav@1337: jaroslav@1337: @Compare public String toURIFromURL() throws Exception { jaroslav@1337: URL u = new URL("http://apidesign.org"); jaroslav@1337: return u.toURI().toString(); jaroslav@1337: } jaroslav@1337: jaroslav@1337: @Factory public static Object[] create() { jaroslav@1337: return VMTest.create(ResourceBundleTest.class); jaroslav@1337: } jaroslav@1337: }