File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Tests/ksqlDB.RestApi.Client.Tests/KSql/RestApi/Statements Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -977,6 +977,29 @@ public void Generate_Enum()
977
977
statement . Should ( ) . Be ( $ "INSERT INTO { nameof ( Port ) } s ({ nameof ( Port . Id ) } , { nameof ( Port . PortType ) } ) VALUES (42, '{ value . PortType } ');") ;
978
978
}
979
979
980
+ private record Amount
981
+ {
982
+ [ JsonPropertyName ( "volume" ) ]
983
+ [ Decimal ( 20 , 8 ) ]
984
+ public decimal Volume { get ; init ; }
985
+ }
986
+
987
+ [ Test ]
988
+ public void Generate_Decimal_ShouldBePrinted ( )
989
+ {
990
+ //Arrange
991
+ var amount = new Amount
992
+ {
993
+ Volume = 1.12345678912345M ,
994
+ } ;
995
+
996
+ //Act
997
+ string statement = new CreateInsert ( modelBuilder ) . Generate ( amount ) ;
998
+
999
+ //Assert
1000
+ statement . Should ( ) . Be ( $ "INSERT INTO { nameof ( Amount ) } s ({ nameof ( Amount . Volume ) . ToLower ( ) } ) VALUES ({ amount . Volume } );") ;
1001
+ }
1002
+
980
1003
#region TODO insert with functions
981
1004
982
1005
readonly struct MovieBytes
You can’t perform that action at this time.
0 commit comments