@@ -0,0 +1,2022 @@
+/*%0A * Copyright (C) 2008 feilong%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *         http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.feilong.core.bean.convertutiltest;%0A%0Aimport static org.junit.Assert.assertArrayEquals;%0A%0Aimport org.junit.Test;%0A%0Aimport com.feilong.core.bean.ConvertUtil;%0Aimport com.feilong.test.User;%0A%0Aimport static com.feilong.core.bean.ConvertUtil.toArray;%0A%0Apublic class ConvertUtilToArrayVarargsTest%7B%0A%0A    /**%0A     * To array2.%0A     */%0A    @Test%0A    public void testToArray()%7B%0A        User user1 = new User();%0A        user1.setId(1L);%0A        User user2 = new User();%0A        user2.setId(2L);%0A%0A        User%5B%5D users = %7B user1, user2 %7D;%0A        assertArrayEquals(users, toArray(user1, user2));%0A    %7D%0A%0A    /**%0A     * Test to array1.%0A     */%0A    @Test%0A    public void testToArray1()%7B%0A        assertArrayEquals(new String%5B%5D %7B %22xinge%22, %22feilong%22 %7D, toArray(%22xinge%22, %22feilong%22));%0A    %7D%0A%0A    /**%0A     * Test to array null.%0A     */%0A    @Test%0A    public void testToArrayNull()%7B%0A        Object%5B%5D array = ConvertUtil.toArray(null);%0A        assertArrayEquals(null, array);%0A    %7D%0A%0A    /**%0A     * Test to array4.%0A     */%0A    @Test%0A    public void testToArray4()%7B%0A        assertArrayEquals(new String%5B%5D %7B%7D, ConvertUtil.%3CString%3E toArray());%0A        assertArrayEquals(new Integer%5B%5D %7B%7D, ConvertUtil.%3CInteger%3E toArray());%0A    %7D%0A%0A    /**%0A     * Test to array null 1.%0A     */%0A    @Test%0A    public void testToArrayNull1()%7B%0A        String%5B%5D array = ConvertUtil.toArray((String) null);%0A        assertArrayEquals(new String%5B%5D %7B null %7D, array);%0A    %7D%0A%7D%0A

add ConvertUtilToArrayVarargsTest