@@ -730,233 +730,6 @@ public void test_BasicEntityFactory_createScalar_string() throws Exception {
730730 assertEquals ("21474836.00" ,re2 .getString ());
731731 }
732732
733-
734- // @Test
735- // public void test_BasicEntityFactory_createScalar_string_bool() throws Exception {
736- // BasicEntityFactory factory = new BasicEntityFactory();
737- // String ex = null;
738- // BasicBoolean re1 = (BasicBoolean)factory.createScalar(Entity.DATA_TYPE.DT_BOOL, "true",0);
739- // assertEquals("true",re1.getString());
740- // BasicBoolean re2 = (BasicBoolean)factory.createScalar(Entity.DATA_TYPE.DT_BOOL, "false",0);
741- // assertEquals("false",re2.getString());
742- //
743- // BasicBoolean re3 = (BasicBoolean)factory.createScalar(Entity.DATA_TYPE.DT_BOOL, "1",0);
744- // assertEquals("true",re1.getString());
745- // BasicBoolean re4 = (BasicBoolean)factory.createScalar(Entity.DATA_TYPE.DT_BOOL, "0",0);
746- // assertEquals("false",re2.getString());
747- // BasicBoolean re5 = (BasicBoolean)factory.createScalar(Entity.DATA_TYPE.DT_BOOL, null,0);
748- // assertEquals("false",re2.getString());
749- // }
750- //
751- // @Test
752- // public void test_BasicEntityFactory_createScalar_string_byte() throws Exception {
753- // BasicEntityFactory factory = new BasicEntityFactory();
754- // String ex = null;
755- // BasicByte re1 = (BasicByte)factory.createScalar(Entity.DATA_TYPE.DT_BYTE, "1",0);
756- // assertEquals("1",re1.getString());
757- // BasicByte re2 = (BasicByte)factory.createScalar(Entity.DATA_TYPE.DT_BYTE, "12",0);
758- // assertEquals("12",re2.getString());
759- // BasicByte re3 = (BasicByte)factory.createScalar(Entity.DATA_TYPE.DT_BYTE, null,0);
760- // assertEquals("",re3.getString());
761- // }
762- //
763- // @Test
764- // public void test_BasicEntityFactory_createScalar_string_short() throws Exception {
765- // BasicEntityFactory factory = new BasicEntityFactory();
766- // String ex = null;
767- // BasicShort re1 = (BasicShort)factory.createScalar(Entity.DATA_TYPE.DT_SHORT, "-32768",0);
768- // assertEquals("",re1.getString());
769- // BasicShort re2 = (BasicShort)factory.createScalar(Entity.DATA_TYPE.DT_SHORT, "32767",0);
770- // assertEquals("32767",re2.getString());
771- // BasicShort re3 = (BasicShort)factory.createScalar(Entity.DATA_TYPE.DT_SHORT, null,0);
772- // assertEquals("",re3.getString());
773- // BasicShort re4 = (BasicShort)factory.createScalar(Entity.DATA_TYPE.DT_SHORT, "0",0);
774- // assertEquals("0",re4.getString());
775- // }
776- //
777- // @Test
778- // public void test_BasicEntityFactory_createScalar_string_int() throws Exception {
779- // BasicEntityFactory factory = new BasicEntityFactory();
780- // String ex = null;
781- // BasicInt re1 = (BasicInt)factory.createScalar(Entity.DATA_TYPE.DT_INT, "-2147483648",0);
782- // assertEquals("",re1.getString());
783- // BasicInt re2 = (BasicInt)factory.createScalar(Entity.DATA_TYPE.DT_INT, "2147483647",0);
784- // assertEquals("2147483647",re2.getString());
785- // BasicInt re3 = (BasicInt)factory.createScalar(Entity.DATA_TYPE.DT_INT, null,0);
786- // assertEquals("",re3.getString());
787- // BasicInt re4 = (BasicInt)factory.createScalar(Entity.DATA_TYPE.DT_INT, "0",0);
788- // assertEquals("0",re4.getString());
789- // }
790- //
791- // @Test
792- // public void test_BasicEntityFactory_createScalar_string_long() throws Exception {
793- // BasicEntityFactory factory = new BasicEntityFactory();
794- // String ex = null;
795- // BasicLong re1 = (BasicLong)factory.createScalar(Entity.DATA_TYPE.DT_LONG, "-9223372036854775808",0);
796- // assertEquals("",re1.getString());
797- // BasicLong re2 = (BasicLong)factory.createScalar(Entity.DATA_TYPE.DT_LONG, "9223372036854775807",0);
798- // assertEquals("9223372036854775807",re2.getString());
799- // BasicLong re3 = (BasicLong)factory.createScalar(Entity.DATA_TYPE.DT_LONG, null,0);
800- // assertEquals("",re3.getString());
801- // BasicLong re4 = (BasicLong)factory.createScalar(Entity.DATA_TYPE.DT_LONG, "0",0);
802- // assertEquals("0",re4.getString());
803- // }
804- //
805- // @Test
806- // public void test_BasicEntityFactory_createScalar_string_float() throws Exception {
807- // BasicEntityFactory factory = new BasicEntityFactory();
808- // String ex = null;
809- // BasicFloat re1 = (BasicFloat)factory.createScalar(Entity.DATA_TYPE.DT_FLOAT, "-9.1",0);
810- // assertEquals("-9.10000038",re1.getString());
811- // BasicFloat re2 = (BasicFloat)factory.createScalar(Entity.DATA_TYPE.DT_FLOAT, "922.3372",0);
812- // assertEquals("922.33721924",re2.getString());
813- // BasicFloat re3 = (BasicFloat)factory.createScalar(Entity.DATA_TYPE.DT_FLOAT, null,0);
814- // assertEquals("",re3.getString());
815- // BasicFloat re4 = (BasicFloat)factory.createScalar(Entity.DATA_TYPE.DT_FLOAT, "0",0);
816- // assertEquals("0",re4.getString());
817- // }
818- //
819- // @Test
820- // public void test_BasicEntityFactory_createScalar_string_double() throws Exception {
821- // BasicEntityFactory factory = new BasicEntityFactory();
822- // BasicDouble re1 = (BasicDouble)factory.createScalar(Entity.DATA_TYPE.DT_DOUBLE, "-9.99",0);
823- // assertEquals("-9.99",re1.getString());
824- // BasicDouble re2 = (BasicDouble)factory.createScalar(Entity.DATA_TYPE.DT_DOUBLE, "922.3372",0);
825- // assertEquals("922.3372",re2.getString());
826- // BasicDouble re3 = (BasicDouble)factory.createScalar(Entity.DATA_TYPE.DT_DOUBLE, null,0);
827- // assertEquals("",re3.getString());
828- // BasicDouble re4 = (BasicDouble)factory.createScalar(Entity.DATA_TYPE.DT_DOUBLE, "0",0);
829- // assertEquals("0",re4.getString());
830- // }
831- //
832- // @Test
833- // public void test_BasicEntityFactory_createScalar_string_date() throws Exception {
834- // BasicEntityFactory factory = new BasicEntityFactory();
835- // BasicDate re1 = (BasicDate)factory.createScalar(Entity.DATA_TYPE.DT_DATE, "2024-06-02",0);
836- // assertEquals("2024.06.02",re1.getString());
837- // BasicDate re2 = (BasicDate)factory.createScalar(Entity.DATA_TYPE.DT_DATE, "1964-06-02",0);
838- // assertEquals("1964.06.02",re2.getString());
839- // BasicDate re3 = (BasicDate)factory.createScalar(Entity.DATA_TYPE.DT_DATE, null,0);
840- // assertEquals("",re3.getString());
841- // BasicDate re4 = (BasicDate)factory.createScalar(Entity.DATA_TYPE.DT_DATE, "2039-06-02",0);
842- // assertEquals("2039.06.02",re4.getString());
843- // }
844- //
845- // @Test
846- // public void test_BasicEntityFactory_createScalar_string_month() throws Exception {
847- // BasicEntityFactory factory = new BasicEntityFactory();
848- // BasicMonth re1 = (BasicMonth)factory.createScalar(Entity.DATA_TYPE.DT_MONTH, "2024-06",0);
849- // assertEquals("2024.06M",re1.getString());
850- // BasicMonth re2 = (BasicMonth)factory.createScalar(Entity.DATA_TYPE.DT_MONTH, "1964-06",0);
851- // assertEquals("1964.06M",re2.getString());
852- // BasicMonth re3 = (BasicMonth)factory.createScalar(Entity.DATA_TYPE.DT_MONTH, null,0);
853- // assertEquals("",re3.getString());
854- // BasicMonth re4 = (BasicMonth)factory.createScalar(Entity.DATA_TYPE.DT_MONTH, "2039-06",0);
855- // assertEquals("2039.06M",re4.getString());
856- // }
857- //
858- // @Test
859- // public void test_BasicEntityFactory_createScalar_string_time() throws Exception {
860- // BasicEntityFactory factory = new BasicEntityFactory();
861- // BasicTime re1 = (BasicTime)factory.createScalar(Entity.DATA_TYPE.DT_TIME, "10:00:00.999",0);
862- // assertEquals("10:00:00.999",re1.getString());
863- // BasicTime re2 = (BasicTime)factory.createScalar(Entity.DATA_TYPE.DT_TIME, "23:59:59.888",0);
864- // assertEquals("23:59:59.888",re2.getString());
865- // BasicTime re3 = (BasicTime)factory.createScalar(Entity.DATA_TYPE.DT_TIME, null,0);
866- // assertEquals("",re3.getString());
867- // BasicTime re4 = (BasicTime)factory.createScalar(Entity.DATA_TYPE.DT_TIME, "00:00:00.000",0);
868- // assertEquals("00:00:00.000",re4.getString());
869- // }
870- // @Test
871- // public void test_BasicEntityFactory_createScalar_string_minute() throws Exception {
872- // BasicEntityFactory factory = new BasicEntityFactory();
873- // BasicMinute re1 = (BasicMinute)factory.createScalar(Entity.DATA_TYPE.DT_MINUTE, "10:00:00",0);
874- // assertEquals("10:00m",re1.getString());
875- // BasicMinute re2 = (BasicMinute)factory.createScalar(Entity.DATA_TYPE.DT_MINUTE, "23:59:59",0);
876- // assertEquals("23:59m",re2.getString());
877- // BasicMinute re3 = (BasicMinute)factory.createScalar(Entity.DATA_TYPE.DT_MINUTE, null,0);
878- // assertEquals("",re3.getString());
879- // BasicMinute re4 = (BasicMinute)factory.createScalar(Entity.DATA_TYPE.DT_MINUTE, "00:00:00",0);
880- // assertEquals("00:00m",re4.getString());
881- // }
882- // @Test
883- // public void test_BasicEntityFactory_createScalar_string_second() throws Exception {
884- // BasicEntityFactory factory = new BasicEntityFactory();
885- // BasicSecond re1 = (BasicSecond)factory.createScalar(Entity.DATA_TYPE.DT_SECOND, "10:00:00",0);
886- // assertEquals("10:00:00",re1.getString());
887- // BasicSecond re2 = (BasicSecond)factory.createScalar(Entity.DATA_TYPE.DT_SECOND, "23:59:59",0);
888- // assertEquals("23:59:59",re2.getString());
889- // String obj = null;
890- // BasicSecond re3 = (BasicSecond)factory.createScalar(Entity.DATA_TYPE.DT_SECOND, obj,0);
891- // assertEquals("",re3.getString());
892- // BasicSecond re4 = (BasicSecond)factory.createScalar(Entity.DATA_TYPE.DT_SECOND, "00:00:00",0);
893- // assertEquals("00:00:00",re4.getString());
894- // }
895- // @Test
896- // public void test_BasicEntityFactory_createScalar_string_datetime() throws Exception {
897- // BasicEntityFactory factory = new BasicEntityFactory();
898- // BasicDateTime re1 = (BasicDateTime)factory.createScalar(Entity.DATA_TYPE.DT_DATETIME, "2024-06-02T10:00:00.000",0);
899- // assertEquals("2024.06.02T10:00:00",re1.getString());
900- // BasicDateTime re2 = (BasicDateTime)factory.createScalar(Entity.DATA_TYPE.DT_DATETIME, "1964-06-02T23:59:59.999",0);
901- // assertEquals("1964.06.02T23:59:59",re2.getString());
902- // BasicDateTime re3 = (BasicDateTime)factory.createScalar(Entity.DATA_TYPE.DT_DATETIME, null,0);
903- // assertEquals("",re3.getString());
904- // BasicDateTime re4 = (BasicDateTime)factory.createScalar(Entity.DATA_TYPE.DT_DATETIME, "2036-06-02T10:00:00.888",0);
905- // assertEquals("2036.06.02T10:00:00",re4.getString());
906- // }
907- // @Test
908- // public void test_BasicEntityFactory_createScalar_string_timestamp() throws Exception {
909- // BasicEntityFactory factory = new BasicEntityFactory();
910- // BasicTimestamp re1 = (BasicTimestamp)factory.createScalar(Entity.DATA_TYPE.DT_TIMESTAMP, "2024-06-02T10:00:00.000",0);
911- // assertEquals("2024.06.02T10:00:00.000",re1.getString());
912- // BasicTimestamp re2 = (BasicTimestamp)factory.createScalar(Entity.DATA_TYPE.DT_TIMESTAMP, "1964-06-02T23:59:59.999",0);
913- // assertEquals("1964.06.02T23:59:59.999",re2.getString());
914- // BasicTimestamp re3 = (BasicTimestamp)factory.createScalar(Entity.DATA_TYPE.DT_TIMESTAMP, null,0);
915- // assertEquals("",re3.getString());
916- // BasicTimestamp re4 = (BasicTimestamp)factory.createScalar(Entity.DATA_TYPE.DT_TIMESTAMP, "2039-06-02T10:00:00.888",0);
917- // assertEquals("2039.06.02T10:00:00.888",re4.getString());
918- // }
919- //
920- // @Test
921- // public void test_BasicEntityFactory_createScalar_string_nanotime() throws Exception {
922- // BasicEntityFactory factory = new BasicEntityFactory();
923- // BasicNanoTime re = (BasicNanoTime)factory.createScalar(Entity.DATA_TYPE.DT_NANOTIME, "10:00:00.000",0);
924- // assertEquals("10:00:00.000000000",re.getString());
925- // BasicNanoTime re1 = (BasicNanoTime)factory.createScalar(Entity.DATA_TYPE.DT_NANOTIME, "10:00:00.0002222",0);
926- // assertEquals("10:00:00.000222200",re1.getString());
927- // BasicNanoTime re2 = (BasicNanoTime)factory.createScalar(Entity.DATA_TYPE.DT_NANOTIME, "23:59:59.999",0);
928- // assertEquals("23:59:59.999000000",re2.getString());
929- // BasicNanoTime re3 = (BasicNanoTime)factory.createScalar(Entity.DATA_TYPE.DT_NANOTIME, null,0);
930- // assertEquals("",re3.getString());
931- // BasicNanoTime re4 = (BasicNanoTime)factory.createScalar(Entity.DATA_TYPE.DT_NANOTIME, "10:00:00.888",0);
932- // assertEquals("10:00:00.888000000",re4.getString());
933- // }
934- //
935- // @Test
936- // public void test_BasicEntityFactory_createScalar_string_nanotimestamp() throws Exception {
937- // BasicEntityFactory factory = new BasicEntityFactory();
938- // BasicNanoTimestamp re1 = (BasicNanoTimestamp)factory.createScalar(Entity.DATA_TYPE.DT_NANOTIMESTAMP, "2024-06-02T10:00:00.000",0);
939- // assertEquals("2024.06.02T10:00:00.000000000",re1.getString());
940- // BasicNanoTimestamp re2 = (BasicNanoTimestamp)factory.createScalar(Entity.DATA_TYPE.DT_NANOTIMESTAMP, "1964-06-02T23:59:59.999",0);
941- // assertEquals("1964.06.02T23:59:59.999000000",re2.getString());
942- // BasicNanoTimestamp re3 = (BasicNanoTimestamp)factory.createScalar(Entity.DATA_TYPE.DT_NANOTIMESTAMP, null,0);
943- // assertEquals("",re3.getString());
944- // BasicNanoTimestamp re4 = (BasicNanoTimestamp)factory.createScalar(Entity.DATA_TYPE.DT_NANOTIMESTAMP, "2039-06-02T10:00:00.888",0);
945- // assertEquals("2039.06.02T10:00:00.888000000",re4.getString());
946- // }
947- //
948- // @Test
949- // public void test_BasicEntityFactory_createScalar_string_datehour() throws Exception {
950- // BasicEntityFactory factory = new BasicEntityFactory();
951- // BasicDateHour re1 = (BasicDateHour)factory.createScalar(Entity.DATA_TYPE.DT_DATEHOUR, "2024-06-02T10:00:00.000",0);
952- // assertEquals("2024.06.02T10",re1.getString());
953- // BasicDateHour re2 = (BasicDateHour)factory.createScalar(Entity.DATA_TYPE.DT_DATEHOUR, "1964-06-02T23:59:59.999",0);
954- // assertEquals("1964.06.02T23",re2.getString());
955- // BasicDateHour re3 = (BasicDateHour)factory.createScalar(Entity.DATA_TYPE.DT_DATEHOUR, null,0);
956- // assertEquals("",re3.getString());
957- // BasicDateHour re4 = (BasicDateHour)factory.createScalar(Entity.DATA_TYPE.DT_DATEHOUR, "2039-06-02T10:00:00.888",0);
958- // assertEquals("2039.06.02T10",re4.getString());
959- // }
960733 @ Test
961734 public void test_BasicEntityFactory_createScalar_float () throws Exception {
962735 BasicEntityFactory factory = new BasicEntityFactory ();
0 commit comments