File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ using Microsoft . VisualStudio . TestTools . UnitTesting ;
2+ using SQLite . CodeFirst . Builder . NameCreators ;
3+
4+ namespace SQLite . CodeFirst . Test . Builder . NameCreators
5+ {
6+ [ TestClass ]
7+ public class IndexNameCreatorTest
8+ {
9+ [ TestMethod ]
10+ public void CreateIndexName ( )
11+ {
12+ string result = IndexNameCreator . CreateIndexName ( "MyTable" , "MyProperty" ) ;
13+ Assert . AreEqual ( "\" IX_MyTable_MyProperty\" " , result ) ;
14+ }
15+
16+ [ TestMethod ]
17+ public void CreateIndexNameEscaped ( )
18+ {
19+ string result = IndexNameCreator . CreateIndexName ( "\" base.MyTable\" " , "MyProperty" ) ;
20+ Assert . AreEqual ( "\" IX_base.MyTable_MyProperty\" " , result ) ;
21+ }
22+ }
23+ }
Original file line number Diff line number Diff line change 7676 <Compile Include =" ..\Shared\AssemblySharedInfo.cs" >
7777 <Link >Properties\AssemblySharedInfo.cs</Link >
7878 </Compile >
79+ <Compile Include =" Builder\NameCreators\IndexNameCreatorTest.cs" />
7980 <Compile Include =" Builder\NameCreators\TableNameCreatorTest.cs" />
8081 <Compile Include =" Properties\AssemblyInfo.cs" />
8182 <Compile Include =" Statement\ColumnConstraint\MaxLengthConstraint.cs" />
You can’t perform that action at this time.
0 commit comments