Author: scheu Date: Thu Feb 28 08:47:23 2008 New Revision: 632052 URL: http://svn.apache.org/viewvc?rev=632052&view=rev Log: Quick Addition of ConvertUtils testcase to verify ConvertUtils function. There is no change to the engine or jaxws code.
Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/misc/ConvertUtilsTest.java Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/misc/ConvertUtilsTest.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/misc/ConvertUtilsTest.java?rev=632052&view=auto ============================================================================== --- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/misc/ConvertUtilsTest.java (added) +++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/misc/ConvertUtilsTest.java Thu Feb 28 08:47:23 2008 @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.axis2.jaxws.misc; + +import org.apache.axis2.jaxws.utility.ConvertUtils; + +import junit.framework.TestCase; + +/** + * Unit Test for the ConvertUtils utility + */ +public class ConvertUtilsTest extends TestCase { + + public void test() throws Exception { + Byte[] input = new Byte[3]; + input[0] = new Byte((byte) 0); + input[1] = new Byte((byte) 1); + input[2] = new Byte((byte) 2); + + byte[] output = new byte[3]; + + output = (byte[]) ConvertUtils.convert(input, + output.getClass()); + + assertTrue(output.length == 3); + assertTrue(output[0] == (byte) 0); + assertTrue(output[1] == (byte) 1); + assertTrue(output[2] == (byte) 2); + } +} --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]