Skip to content

Commit 4f584d7

Browse files
committed
Small refactoring to enable testing of CreateTableStatement.
1 parent 4f1c25b commit 4f584d7

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

SQLite.CodeFirst/SQLite.CodeFirst.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
<Reference Include="System.Data" />
7474
</ItemGroup>
7575
<ItemGroup>
76+
<Compile Include="Statement\IStatementCollection.cs" />
7677
<Compile Include="Utility\AssociationTypeWrapper.cs" />
7778
<Compile Include="Builder\ColumnStatementCollectionBuilder.cs" />
7879
<Compile Include="Builder\CreateIndexStatementBuilder.cs" />

SQLite.CodeFirst/Statement/ColumnStatementCollection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace SQLite.CodeFirst.Statement
77
{
8-
internal class ColumnStatementCollection : Collection<IStatement>, IStatement
8+
internal class ColumnStatementCollection : Collection<IStatement>, IStatementCollection
99
{
1010
private const string ColumnStatementSeperator = ", ";
1111

SQLite.CodeFirst/Statement/CreateTableStatement.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ internal class CreateTableStatement : IStatement
77
private const string Template = "CREATE TABLE {table-name} ({column-def});";
88

99
public string TableName { get; set; }
10-
public ColumnStatementCollection ColumnStatementCollection { get; set; }
10+
public IStatementCollection ColumnStatementCollection { get; set; }
1111

1212
public string CreateStatement()
1313
{
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using System.Collections.Generic;
2+
3+
namespace SQLite.CodeFirst.Statement
4+
{
5+
interface IStatementCollection : IStatement, ICollection<IStatement>
6+
{
7+
}
8+
}

0 commit comments

Comments
 (0)