diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/WixToolsetTest.Sql/SqlExtensionFixture.cs | 12 | ||||
-rw-r--r-- | src/test/WixToolsetTest.Sql/TestData/UsingSql/PackageComponents.wxs | 12 |
2 files changed, 18 insertions, 6 deletions
diff --git a/src/test/WixToolsetTest.Sql/SqlExtensionFixture.cs b/src/test/WixToolsetTest.Sql/SqlExtensionFixture.cs index 7d51c0fb..aa9d7a1f 100644 --- a/src/test/WixToolsetTest.Sql/SqlExtensionFixture.cs +++ b/src/test/WixToolsetTest.Sql/SqlExtensionFixture.cs | |||
@@ -11,15 +11,19 @@ namespace WixToolsetTest.Sql | |||
11 | public class SqlExtensionFixture | 11 | public class SqlExtensionFixture |
12 | { | 12 | { |
13 | [Fact] | 13 | [Fact] |
14 | public void CanBuildUsingSqlString() | 14 | public void CanBuildUsingSqlStuff() |
15 | { | 15 | { |
16 | var folder = TestData.Get(@"TestData\UsingSql"); | 16 | var folder = TestData.Get(@"TestData\UsingSql"); |
17 | var build = new Builder(folder, typeof(SqlExtensionFactory), new[] { folder }); | 17 | var build = new Builder(folder, typeof(SqlExtensionFactory), new[] { folder }); |
18 | 18 | ||
19 | var results = build.BuildAndQuery(Build, "SqlString"); | 19 | var results = build.BuildAndQuery(Build, "Wix4SqlDatabase", "Wix4SqlFileSpec", "Wix4SqlScript", "Wix4SqlString"); |
20 | Assert.Equal(new[] | 20 | WixAssert.CompareLineByLine(new[] |
21 | { | 21 | { |
22 | "SqlString:TestString\tTestDB\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tCREATE TABLE TestTable1(name varchar(20), value varchar(20))\t\t1\t", | 22 | "Wix4SqlDatabase:TestDB\tMySQLHostName\tMyInstanceName\tMyDB\tDatabaseComponent\t\tTestFileSpecId\tTestLogFileSpecId\t35", |
23 | "Wix4SqlFileSpec:TestFileSpecId\tTestFileSpecLogicalName\tTestFileSpec\t10MB\t100MB\t10%", | ||
24 | "Wix4SqlFileSpec:TestLogFileSpecId\tTestLogFileSpecLogicalName\tTestLogFileSpec\t1MB\t10MB\t1%", | ||
25 | "Wix4SqlScript:TestScript\tTestDB\tDatabaseComponent\tScriptBinary\t\t1\t", | ||
26 | "Wix4SqlString:TestString\tTestDB\tDatabaseComponent\tCREATE TABLE TestTable1(name varchar(20), value varchar(20))\t\t1\t", | ||
23 | }, results.ToArray()); | 27 | }, results.ToArray()); |
24 | } | 28 | } |
25 | 29 | ||
diff --git a/src/test/WixToolsetTest.Sql/TestData/UsingSql/PackageComponents.wxs b/src/test/WixToolsetTest.Sql/TestData/UsingSql/PackageComponents.wxs index 653f7e02..f7626926 100644 --- a/src/test/WixToolsetTest.Sql/TestData/UsingSql/PackageComponents.wxs +++ b/src/test/WixToolsetTest.Sql/TestData/UsingSql/PackageComponents.wxs | |||
@@ -2,12 +2,20 @@ | |||
2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" | 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" |
3 | xmlns:sql="http://wixtoolset.org/schemas/v4/wxs/sql"> | 3 | xmlns:sql="http://wixtoolset.org/schemas/v4/wxs/sql"> |
4 | <Fragment> | 4 | <Fragment> |
5 | <Binary Id="ScriptBinary" SourceFile="example.txt" /> | ||
6 | |||
5 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | 7 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> |
6 | <Component> | 8 | <Component Id="DatabaseComponent" Guid="{322802E7-D65E-4C91-924F-FC6D30FEEB34}"> |
7 | <File Source="example.txt" /> | 9 | <File Id="TestFileSpec" Source="example.txt" /> |
10 | <File Id="TestLogFileSpec" Source="example.txt" /> | ||
11 | |||
8 | <sql:SqlDatabase Id="TestDB" Database="MyDB" Server="MySQLHostName" Instance="MyInstanceName" CreateOnInstall="yes" DropOnUninstall="yes" ConfirmOverwrite="yes"> | 12 | <sql:SqlDatabase Id="TestDB" Database="MyDB" Server="MySQLHostName" Instance="MyInstanceName" CreateOnInstall="yes" DropOnUninstall="yes" ConfirmOverwrite="yes"> |
9 | <sql:SqlString Id="TestString" SQL="CREATE TABLE TestTable1(name varchar(20), value varchar(20))" ExecuteOnInstall="yes" /> | 13 | <sql:SqlString Id="TestString" SQL="CREATE TABLE TestTable1(name varchar(20), value varchar(20))" ExecuteOnInstall="yes" /> |
14 | <sql:SqlFileSpec Id="TestFileSpecId" Filename="TestFileSpec" Name="TestFileSpecLogicalName" Size="10MB" GrowthSize="10%" MaxSize="100MB" /> | ||
15 | <sql:SqlLogFileSpec Id="TestLogFileSpecId" Filename="TestLogFileSpec" Name="TestLogFileSpecLogicalName" Size="1MB" GrowthSize="1%" MaxSize="10MB" /> | ||
10 | </sql:SqlDatabase> | 16 | </sql:SqlDatabase> |
17 | |||
18 | <sql:SqlScript Id="TestScript" BinaryRef="ScriptBinary" SqlDb="TestDB" ExecuteOnInstall="yes" /> | ||
11 | </Component> | 19 | </Component> |
12 | </ComponentGroup> | 20 | </ComponentGroup> |
13 | </Fragment> | 21 | </Fragment> |