1 16 17 package org.apache.commons.beanutils.converters; 18 19 import junit.framework.TestCase; 20 import junit.framework.TestCase; 21 22 28 29 public class StringArrayConverterTestCase extends TestCase { 30 31 public StringArrayConverterTestCase(String name) { 32 super(name); 33 } 34 35 public void testIntToString() { 36 37 int[] testArray = {1, 2, 3, 4, 5}; 38 String [] results = (String []) new StringArrayConverter().convert(String .class, testArray); 39 40 assertEquals("Incorrect results size", 5, results.length); 41 assertEquals("Entry one is wrong", "1", results[0]); 42 assertEquals("Entry two is wrong", "2", results[1]); 43 assertEquals("Entry three is wrong", "3", results[2]); 44 assertEquals("Entry four is wrong", "4", results[3]); 45 assertEquals("Entry five is wrong", "5", results[4]); 46 } 47 } 48 49 | Popular Tags |