at.spardat.xma.boot.test.UtilTest Maven / Gradle / Ivy
/*******************************************************************************
* Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH .
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* s IT Solutions AT Spardat GmbH - initial API and implementation
*******************************************************************************/
package at.spardat.xma.boot.test;
import java.net.MalformedURLException;
import java.net.URL;
import junit.framework.TestCase;
import at.spardat.xma.boot.util.Util;
/**
* class: Tester
*
* @author s3595 Chris Sch?fer (CGS)
* @version 0.1.0
*
*/
public class UtilTest extends TestCase {
/**
* @param name
*/
public UtilTest(String name) {
super(name);
}
/**
* @param args
* @return void
*/
public static void main(String[] args) {
UtilTest test = new UtilTest("main");
test.test_01();
}
public void test_01(){
Util c = Util.getInstance();
String b = new String( "http://lh:7001/comp/test.jar?var=?reic*h| __");
try {
URL url = new URL( b);
System.out.println( "original: " + b );
StringBuffer sb = c.urlToPath(url);
System.out.println( "encoded: " + sb );
// Assert.assertTrue( sb.equals(b));
} catch (MalformedURLException e) {
e.printStackTrace();
}
} //
}// class