File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 7676 <Compile Include =" Statement\ForeignKeyStatementTest.cs" />
7777 <Compile Include =" Statement\CreateTableStatementTest.cs" />
7878 <Compile Include =" Statement\CreateIndexStatementCollectionTest.cs" />
79+ <Compile Include =" Statement\ColumnStatementTest.cs" />
7980 </ItemGroup >
8081 <ItemGroup >
8182 <Folder Include =" Builder\" />
Original file line number Diff line number Diff line change 1+ using Microsoft . VisualStudio . TestTools . UnitTesting ;
2+ using Moq ;
3+ using SQLite . CodeFirst . Statement ;
4+ using SQLite . CodeFirst . Statement . ColumnConstraint ;
5+
6+ namespace SQLite . CodeFirst . Test . Statement
7+ {
8+ [ TestClass ]
9+ public class ColumnStatementTest : StatementTestBase
10+ {
11+ [ TestMethod ]
12+ public void CreateStatement ( )
13+ {
14+ var columnConstraintsMock = new Mock < IColumnConstraintCollection > ( ) ;
15+ columnConstraintsMock . Setup ( c => c . CreateStatement ( ) ) . Returns ( "dummyColumnConstraint" ) ;
16+
17+ var columnStatement = new ColumnStatement
18+ {
19+ ColumnConstraints = columnConstraintsMock . Object ,
20+ ColumnName = "dummyColumnName" ,
21+ TypeName = "dummyType"
22+ } ;
23+ string output = columnStatement . CreateStatement ( ) ;
24+ Assert . AreEqual ( output , "[dummyColumnName] dummyType dummyColumnConstraint" ) ;
25+ }
26+ }
27+ }
You can’t perform that action at this time.
0 commit comments