File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
Statement/ColumnConstraint Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 6666 </Choose >
6767 <ItemGroup >
6868 <Compile Include =" Properties\AssemblyInfo.cs" />
69+ <Compile Include =" Statement\ColumnConstraint\MaxLengthConstraint.cs" />
6970 <Compile Include =" Statement\ColumnStatementCollectionTest.cs" />
7071 <Compile Include =" Statement\PrimaryKeyStatementTest.cs" />
7172 <Compile Include =" Statement\CreateDatabaseStatementTest.cs" />
Original file line number Diff line number Diff line change 1+ using System ;
2+ using Microsoft . VisualStudio . TestTools . UnitTesting ;
3+ using SQLite . CodeFirst . Statement . ColumnConstraint ;
4+
5+ namespace SQLite . CodeFirst . Test . Statement . ColumnConstraint
6+ {
7+ [ TestClass ]
8+ public class MaxLengthConstraintTest : StatementTestBase
9+ {
10+ [ TestMethod ]
11+ public void CreateStatementTest ( )
12+ {
13+ var maxLengthConstraint = new MaxLengthConstraint ( 12 ) ;
14+ string output = maxLengthConstraint . CreateStatement ( ) ;
15+ Assert . AreEqual ( output , "(12)" ) ;
16+ }
17+
18+ [ TestMethod ]
19+ [ ExpectedException ( typeof ( InvalidOperationException ) ) ]
20+ public void CreateStatementInvalidParameterTest ( )
21+ {
22+ var maxLengthConstraint = new MaxLengthConstraint ( ) ;
23+ maxLengthConstraint . CreateStatement ( ) ;
24+ }
25+ }
26+ }
You can’t perform that action at this time.
0 commit comments