From 9d1ba8af67a836e41fb7b5ded7c34bb0e2e0055b Mon Sep 17 00:00:00 2001 From: Subhash Chandran Date: Fri, 23 Nov 2018 21:56:43 +0530 Subject: [PATCH] #14 4-digit numbers treated as date-time type --- .../org/wiztools/xsdgen/TypeInferenceUtilTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/test/java/org/wiztools/xsdgen/TypeInferenceUtilTest.java b/src/test/java/org/wiztools/xsdgen/TypeInferenceUtilTest.java index d2b223b..732ab65 100644 --- a/src/test/java/org/wiztools/xsdgen/TypeInferenceUtilTest.java +++ b/src/test/java/org/wiztools/xsdgen/TypeInferenceUtilTest.java @@ -71,4 +71,16 @@ public void testGetTypeOfContentDateTimeInvalid() { String result = TypeInferenceUtil.getTypeOfContent(content); assertEquals(expResult, result); } + + /** + * Reported in issue #14 ( https://github.com/wiztools/xsd-gen/issues/14 ) + */ + @Test + public void testFourDgtAsTime() { + System.out.println("testFourDgtAsTime"); + String content = "2012"; + String expResult = TypeInferenceUtil.XSD_INT; + String result = TypeInferenceUtil.getTypeOfContent(content); + assertEquals(expResult, result); + } }