31
31
import java .util .NoSuchElementException ;
32
32
import java .util .Set ;
33
33
34
+ import static org .javalite .activejdbc .test .JdbcProperties .driver ;
34
35
import static org .javalite .common .Collections .*;
35
36
36
37
@@ -517,7 +518,12 @@ public void shouldGenerateValidUpdateSQLWithTime() {
517
518
the (Base .exec (updateSql )).shouldBeEqual (1 );
518
519
519
520
alarm = Alarm .findById (alarm .getId ());
520
- the (alarm .getString ("alarm_time" ).startsWith (t )).shouldBeTrue ();
521
+
522
+ if (driver ().contains ("jtds" )){
523
+ the (alarm .getString ("alarm_time" ).startsWith (t )).shouldBeTrue ();
524
+ }else {
525
+ the (alarm .getTime ("alarm_time" ).toString ()).shouldBeEqual (t );
526
+ }
521
527
}
522
528
523
529
@ Test (expected = NoSuchElementException .class )
@@ -556,7 +562,12 @@ public void shouldGenerateValidInsertSQLWithTime() {
556
562
Object id = Base .execInsert (insertSql , alarm .getIdName ());
557
563
558
564
alarm = Alarm .findById (id );
559
- the (alarm .getTime ("alarm_time" ).toString ()).shouldBeEqual (t );
565
+
566
+ if (driver ().contains ("jtds" )){
567
+ the (alarm .getString ("alarm_time" ).startsWith (t )).shouldBeTrue ();
568
+ }else {
569
+ the (alarm .getTime ("alarm_time" ).toString ()).shouldBeEqual (t );
570
+ }
560
571
}
561
572
562
573
@ Test
@@ -696,7 +707,7 @@ public void testNewFromMap() {
696
707
}
697
708
698
709
@ Test
699
- public void testNewFromMapCaseInsensive () {
710
+ public void testNewFromMapCaseInsensitive () {
700
711
Person p = new Person ().fromMap (map ("NAME" , "Joe" , "Last_Name" , "Schmoe" , "dob" , "2003-06-15" ));
701
712
702
713
a (p .get ("name" )).shouldNotBeNull ();
@@ -712,6 +723,11 @@ public void shouldConvertTime() {
712
723
alarm .save ();
713
724
714
725
alarm = Alarm .findById (alarm .getId ());
715
- the (alarm .getTime ("alarm_time" ).toString ()).shouldBeEqual (t );
726
+
727
+ if (driver ().contains ("jtds" )){
728
+ the (alarm .getString ("alarm_time" ).startsWith (t )).shouldBeTrue ();
729
+ }else {
730
+ the (alarm .getTime ("alarm_time" ).toString ()).shouldBeEqual (t );
731
+ }
716
732
}
717
733
}
0 commit comments