File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Tests/ksqlDB.RestApi.Client.Tests/KSql/RestApi/Validation Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ using NUnit . Framework ;
2
+ using FluentAssertions ;
3
+ using ksqlDb . RestApi . Client . KSql . RestApi . Parsers ;
4
+ using ksqlDB . RestApi . Client . KSql . RestApi . Validation ;
5
+
6
+ namespace ksqlDb . RestApi . Client . Tests . KSql . RestApi . Validation
7
+ {
8
+ public class PseudoColumnNameValidatorTests
9
+ {
10
+ private PseudoColumnValidator validator = null ! ;
11
+
12
+ [ SetUp ]
13
+ public void TestInitialize ( )
14
+ {
15
+ validator = new ( ) ;
16
+ }
17
+
18
+ [ TestCase ( "Headers" ) ]
19
+ [ TestCase ( nameof ( SystemColumns . ROWTIME ) ) ]
20
+ [ TestCase ( nameof ( SystemColumns . ROWOFFSET ) ) ]
21
+ [ TestCase ( nameof ( SystemColumns . ROWPARTITION ) ) ]
22
+ public void IsValid_ForPseudoColumns_ReturnsTrue ( string columnName )
23
+ {
24
+ //Arrange
25
+
26
+ //Act
27
+ var isValid = validator . IsValid ( columnName ) ;
28
+
29
+ //Assert
30
+ isValid . Should ( ) . BeTrue ( ) ;
31
+ }
32
+
33
+ [ Test ]
34
+ public void IsValid_ForNonPseudoColumns_ReturnsFalse ( )
35
+ {
36
+ //Arrange
37
+
38
+ //Act
39
+ var isValid = validator . IsValid ( "foo" ) ;
40
+
41
+ //Assert
42
+ isValid . Should ( ) . BeFalse ( ) ;
43
+ }
44
+ }
45
+ }
You can’t perform that action at this time.
0 commit comments