Browse Source

moved test case where it belongs

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2493 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/head
Keith Donald 16 years ago
parent
commit
f4a9460bc6
  1. 9
      org.springframework.core/src/test/java/org/springframework/core/convert/support/DefaultConversionTests.java
  2. 11
      org.springframework.core/src/test/java/org/springframework/core/convert/support/GenericConversionServiceTests.java

9
org.springframework.core/src/test/java/org/springframework/core/convert/support/DefaultConversionTests.java

@ -712,15 +712,6 @@ public class DefaultConversionTests { @@ -712,15 +712,6 @@ public class DefaultConversionTests {
getClass().getField("genericMap2")));
assertEquals(new Long(1), result.get(1L));
}
@Test
public void genericConverterDelegatingBackToConversionServiceConverterNotFound() {
try {
conversionService.convert("1", Integer[].class);
} catch (ConversionFailedException e) {
assertTrue(e.getCause() instanceof ConverterNotFoundException);
}
}
@Test
@SuppressWarnings("unchecked")

11
org.springframework.core/src/test/java/org/springframework/core/convert/support/GenericConversionServiceTests.java

@ -129,5 +129,16 @@ public class GenericConversionServiceTests { @@ -129,5 +129,16 @@ public class GenericConversionServiceTests {
Integer three = conversionService.convert("3", int.class);
assertEquals(3, three.intValue());
}
@Test
public void genericConverterDelegatingBackToConversionServiceConverterNotFound() {
try {
conversionService.addGenericConverter(new ObjectToArrayConverter(conversionService));
conversionService.convert("1", Integer[].class);
fail("Should hace failed");
} catch (ConversionFailedException e) {
assertTrue(e.getCause() instanceof ConverterNotFoundException);
}
}
}

Loading…
Cancel
Save