File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed
Tests/ksqlDB.RestApi.Client.Tests/FluentAPI/Builders Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ public void RowTime_Property_ShouldBeIgnoredInDDL()
55
55
builder . Metadata . FieldsMetadata . First ( c => c . MemberInfo . Name == nameof ( Tweet . RowTime ) ) . IgnoreInDDL . Should ( ) . BeTrue ( ) ;
56
56
}
57
57
58
- public class Foo
58
+ public class Row
59
59
{
60
60
public long RowTime ;
61
61
}
@@ -66,10 +66,10 @@ public void RowTime_Field_ShouldBeIgnoredInDDL()
66
66
//Arrange
67
67
68
68
//Act
69
- EntityTypeBuilder < Foo > fooBuilder = new ( ) ;
69
+ EntityTypeBuilder < Row > rowBuilder = new ( ) ;
70
70
71
71
//Assert
72
- fooBuilder . Metadata . FieldsMetadata . First ( c => c . MemberInfo . Name == nameof ( Foo . RowTime ) ) . IgnoreInDDL . Should ( ) . BeTrue ( ) ;
72
+ rowBuilder . Metadata . FieldsMetadata . First ( c => c . MemberInfo . Name == nameof ( Row . RowTime ) ) . IgnoreInDDL . Should ( ) . BeTrue ( ) ;
73
73
}
74
74
75
75
[ Test ]
@@ -87,5 +87,24 @@ public void DecimalType_ShouldHaveDecimalFieldMetadata()
87
87
. First ( c => c . MemberInfo . Name == nameof ( Tweet . AccountBalance ) )
88
88
. Should ( ) . NotBeNull ( ) ;
89
89
}
90
+
91
+ public class MyValue : Row
92
+ {
93
+ public int Id { get ; set ; }
94
+ }
95
+
96
+ [ Test ]
97
+ public void RowTimeField_AsPseudoColumn_ShouldBeRegisteredOnce ( )
98
+ {
99
+ //Arrange
100
+ EntityTypeBuilder < MyValue > customBuilder = new ( ) ;
101
+
102
+ //Act
103
+ customBuilder . Property ( c => c . RowTime )
104
+ . AsPseudoColumn ( ) ;
105
+
106
+ //Assert
107
+ customBuilder . Metadata . FieldsMetadata . Count ( c => c . MemberInfo . Name == nameof ( Row . RowTime ) ) . Should ( ) . Be ( 1 ) ;
108
+ }
90
109
}
91
110
}
You can’t perform that action at this time.
0 commit comments