提交 8ff80164 编写于 作者: K Keith Donald

object to String not supported test case

上级 5c7c56a6
......@@ -18,6 +18,7 @@ package org.springframework.core.convert.support;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNull;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.math.BigDecimal;
......@@ -37,7 +38,6 @@ import java.util.Map;
import java.util.Properties;
import java.util.Set;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.core.convert.ConversionFailedException;
import org.springframework.core.convert.ConversionService;
......@@ -595,6 +595,11 @@ public class DefaultConversionTests {
public void convertObjectToStringStringConstructorPresent() {
assertEquals("123456789", conversionService.convert(new SSN("123456789"), String.class));
}
@Test
public void convertObjectToStringNotSupported() {
assertFalse(conversionService.canConvert(TestEntity.class, String.class));
}
@Test
public void convertObjectToObjectValueOfMethod() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册