本文整理汇总了C#中WixTest.Light类的典型用法代码示例。如果您正苦于以下问题:C# Light类的具体用法?C# Light怎么用?C# Light使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Light类属于WixTest命名空间,在下文中一共展示了Light类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: LongIdentifiers
public void LongIdentifiers()
{
string longDirectoryName = "Directory_01234567890123456789012345678901234567890123456789012345678901234567890123456789";
string longComponentName = "Component_01234567890123456789012345678901234567890123456789012345678901234567890123456789";
string longFileName = "Test_txt_01234567890123456789012345678901234567890123456789012345678901234567890123456789";
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(IdentifierTests.TestDataDirectory, @"LongIdentifiers\product.wxs"));
candle.ExpectedWixMessages.Add(new WixMessage(1026, string.Format("The Directory/@Id attribute's value, '{0}', is too long for an identifier. Standard identifiers are 72 characters long or less.", longDirectoryName),WixMessage.MessageTypeEnum.Warning));
candle.ExpectedWixMessages.Add(new WixMessage(1026, string.Format("The Component/@Id attribute's value, '{0}', is too long for an identifier. Standard identifiers are 72 characters long or less.", longComponentName), WixMessage.MessageTypeEnum.Warning));
candle.ExpectedWixMessages.Add(new WixMessage(1026, string.Format("The File/@Id attribute's value, '{0}', is too long for an identifier. Standard identifiers are 72 characters long or less.", longFileName), WixMessage.MessageTypeEnum.Warning));
candle.ExpectedWixMessages.Add(new WixMessage(1026, string.Format("The ComponentRef/@Id attribute's value, '{0}', is too long for an identifier. Standard identifiers are 72 characters long or less.", longComponentName), WixMessage.MessageTypeEnum.Warning));
candle.Run();
Light light = new Light(candle);
light.SuppressedICEs.Add("ICE03");
light.Run();
// verify long names in the resulting msi
string query = string.Format("SELECT `Directory` FROM `Directory` WHERE `Directory` = '{0}'", longDirectoryName);
string queryResult = Verifier.Query(light.OutputFile, query);
Assert.Equal(longDirectoryName, queryResult);
query = string.Format("SELECT `Component` FROM `Component` WHERE `Component` = '{0}'", longComponentName);
queryResult = Verifier.Query(light.OutputFile, query);
Assert.Equal(longComponentName, queryResult);
query = string.Format("SELECT `File` FROM `File` WHERE `File` = '{0}'", longFileName);
queryResult = Verifier.Query(light.OutputFile, query);
Assert.Equal(longFileName, queryResult);
query = string.Format("SELECT `Component_` FROM `FeatureComponents` WHERE `Component_` = '{0}'", longComponentName);
queryResult = Verifier.Query(light.OutputFile, query);
Assert.Equal(longComponentName, queryResult);
}
开发者ID:zooba,项目名称:wix3,代码行数:35,代码来源:Authoring.IdentifierTests.cs
示例2: NamedBindPath
public void NamedBindPath()
{
// Create a temp text file to bind into the wix library
DirectoryInfo tempDirectory = Directory.CreateDirectory(Utilities.FileUtilities.GetUniqueFileName());
string testFileName = Path.Combine(tempDirectory.FullName, "TextFile1.txt");
StreamWriter outputFile = File.CreateText(testFileName);
outputFile.Write("abc");
outputFile.Close();
// Build the library
Lit lit = new Lit();
lit.ObjectFiles.Add(Candle.Compile(Path.Combine(BindPathTests.TestDataDirectory, @"NamedBindPath\Product.wxs")));
lit.BindPath = String.Concat("Test=", tempDirectory.FullName);
lit.BindFiles = true;
lit.Run();
// Delete the source file
File.Delete(testFileName);
// Link the library and verify files are in the resulting msi layout
Light light = new Light(lit);
light.Run();
string outputFileName = Path.Combine(Path.GetDirectoryName(lit.OutputFile), @"PFiles\WixTestFolder\TextFile1.txt");
Assert.IsTrue(File.Exists(outputFileName), "File was not created in msi layout as expected.");
Assert.IsTrue(File.ReadAllText(outputFileName).Equals("abc"), "File contents do not match expected.");
}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:27,代码来源:BindPaths.BindPathTests.cs
示例3: PreMsi50ShortcutProperty
public void PreMsi50ShortcutProperty()
{
// Loop through a list of pre-MSI 5.0 Windows Installer version
foreach (MSIVersions.Versions version in Enum.GetValues(typeof(MSIVersions.Versions)))
{
// Skip MSI 5.0 and later
if (MSIVersions.GetVersion(version) >= MSIVersions.GetVersion(MSIVersions.Versions.MSI50))
{
continue;
}
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(ShortcutPropertyTests.TestDataDirectory, @"PreMsi50ShortcutProperty\product.wxs"));
candle.PreProcessorParams.Add("InstallerVersion", MSIVersions.GetVersionInMSIFormat(version));
candle.Run();
Light light = new Light(candle);
// Only run validation on MSIs built with the current or earlier than current versions of Windows Installer
if (DTF.Installer.Version < MSIVersions.GetVersion(version))
{
light.SuppressMSIAndMSMValidation = true;
}
light.Run();
}
}
开发者ID:zooba,项目名称:wix3,代码行数:27,代码来源:Shortcuts.ShortcutPropertyTests.cs
示例4: SimplePedantic
public void SimplePedantic()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(WixTests.SharedAuthoringDirectory, "BasicProduct.wxs"));
candle.Run();
Light light = new Light(candle);
light.Pedantic = true;
light.Run();
}
开发者ID:zooba,项目名称:wix3,代码行数:10,代码来源:Messages.PedanticTests.cs
示例5: InvalidCultures
public void InvalidCultures()
{
Candle candle = new Candle();
candle.SourceFiles.Add(WixTests.BasicProductWxs);
candle.Run();
Light light = new Light(candle);
light.Cultures = "en-US;in-VA;lid";
light.Run();
}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:10,代码来源:Cultures.CultureTests.cs
示例6: SimpleSuppressICE
public void SimpleSuppressICE()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(SuppressICEsTests.TestDataDirectory, @"SimpleSuppressICE\product.wxs"));
candle.Run();
Light light = new Light(candle);
light.SuppressedICEs.Add("ICE18");
light.Run();
}
开发者ID:zooba,项目名称:wix3,代码行数:10,代码来源:ICEs.SuppressICEsTests.cs
示例7: SF1824809
public void SF1824809()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(RegressionTests.TestDataDirectory, @"SF1824809\product.wxs"));
candle.Run();
Light light = new Light();
light.ObjectFiles = candle.ExpectedOutputFiles;
light.Run();
}
开发者ID:bleissem,项目名称:wix3,代码行数:10,代码来源:RegressionTests.cs
示例8: SimpleSuppressWarnings
public void SimpleSuppressWarnings()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Environment.ExpandEnvironmentVariables(Path.Combine(SuppressWarningsTests.TestDataDirectory, @"Shared\Warning1079.wxs")));
candle.Run();
Light light = new Light(candle);
light.SuppressWarnings.Add("1079");
light.Run();
}
开发者ID:bleissem,项目名称:wix3,代码行数:10,代码来源:Warnings.SuppressWarningsTests.cs
示例9: SimpleReuseCab
public void SimpleReuseCab()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(ReuseCabTests.TestDataDirectory, @"SimpleReuseCab\product.wxs"));
candle.Run();
Light light = new Light(candle);
light.ReuseCab = true;
light.CachedCabsPath = Path.Combine(ReuseCabTests.TestDataDirectory, "SimpleReuseCab");
light.Run();
}
开发者ID:zooba,项目名称:wix3,代码行数:11,代码来源:Cabs.ReuseCabTests.cs
示例10: DuplicateRemoveFolders
public void DuplicateRemoveFolders()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(RemoveFolderTests.TestDataDirectory, @"DuplicateRemoveFolders\product.wxs"));
candle.Run();
Light light = new Light(candle);
light.ExpectedWixMessages.Add(new WixMessage(130, "The primary key 'RemoveFolder1' is duplicated in table 'RemoveFile'. Please remove one of the entries or rename a part of the primary key to avoid the collision.", WixMessage.MessageTypeEnum.Error));
light.ExpectedExitCode = 130;
light.Run();
}
开发者ID:bleissem,项目名称:wix3,代码行数:11,代码来源:Components.RemoveFolderTests.cs
示例11: ValidIdentifier
public void ValidIdentifier()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(LocalizationTests.TestDataDirectory, @"ValidIdentifier\product.wxs"));
candle.Run();
Light light = new Light(candle);
light.LocFiles.Add(Path.Combine(LocalizationTests.TestDataDirectory, @"ValidIdentifier\en-us.wxl"));
light.Cultures = "en-us";
light.Run();
}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:11,代码来源:Localization.LocalizationTests.cs
示例12: SimpleWarningsAsErrors
public void SimpleWarningsAsErrors()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(WarningsAsErrorsTests.TestDataDirectory, @"Shared\Warning1079.wxs"));
candle.Run();
Light light = new Light(candle);
light.TreatAllWarningsAsErrors = true;
light.ExpectedWixMessages.Add(new WixMessage(1079, WixMessage.MessageTypeEnum.Error));
light.ExpectedExitCode = 1079;
light.Run();
}
开发者ID:bleissem,项目名称:wix3,代码行数:12,代码来源:Warnings.WarningsAsErrorsTests.cs
示例13: NullValues
public void NullValues()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(CustomTableTests.TestDataDirectory, @"NullValues\product.wxs"));
candle.Run();
Light light = new Light(candle);
light.ExpectedWixMessages.Add(new WixMessage(53, "There is no data for column 'Column2' in a contained row of custom table 'CustomTable1'. A non-null value must be supplied for this column.", WixMessage.MessageTypeEnum.Error));
light.ExpectedWixMessages.Add(new WixMessage(53, "There is no data for column 'Column2' in a contained row of custom table 'CustomTable1'. A non-null value must be supplied for this column.", WixMessage.MessageTypeEnum.Error));
light.ExpectedExitCode = 53;
light.Run();
}
开发者ID:bleissem,项目名称:wix3,代码行数:12,代码来源:CustomTables.CustomTableTests.cs
示例14: ChainDuplicatePackageGroupRefs
public void ChainDuplicatePackageGroupRefs()
{
string candleOutput = Candle.Compile(Path.Combine(ChainTests.TestDataDirectory, @"ChainDuplicatePackageGroupRefs\Product.wxs"));
Light light = new Light();
light.ObjectFiles.Add(candleOutput);
light.OutputFile = "setup.exe";
light.ExpectedWixMessages.Add(new WixMessage(343, Message.MessageTypeEnum.Error)); //A circular reference of ordering dependencies was detected.
light.IgnoreWixMessageOrder = true;
light.ExpectedExitCode = 343;
light.Run();
}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:12,代码来源:Bundle.ChainTests.cs
示例15: ValidServiceConfig
public void ValidServiceConfig()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(RegressionTests.TestDataDirectory,@"ValidServiceConfig\product.wxs"));
candle.Extensions.Add("WixUtilExtension");
candle.Run();
Light light = new Light(candle);
light.Extensions.Add("WixUtilExtension");
light.OutputFile = string.Empty;
light.Run();
}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:12,代码来源:UtilExtension.RegressionTests.cs
示例16: Hebrew
public void Hebrew()
{
string wixobj = Candle.Compile(Path.Combine(LocalizationTests.TestDataDirectory, @"Shared\product.wxs"));
Light light = new Light();
light.ObjectFiles.Add(wixobj);
light.LocFiles.Add(Path.Combine(LocalizationTests.TestDataDirectory, @"he-il\he-il.wxl"));
light.OutputFile = Path.Combine(Path.Combine(this.TestContext.TestDir, Path.GetRandomFileName()), "he-il.msi");
light.Run();
Verifier.CompareResults(Path.Combine(LocalizationTests.TestDataDirectory, @"he-il\he-il.msi"), light.OutputFile);
}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:12,代码来源:Localization.LocalizationTests.cs
示例17: Codepage_x_EBCDIC_KoreanExtended
public void Codepage_x_EBCDIC_KoreanExtended()
{
string codepage = "x-EBCDIC-KoreanExtended";
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(ProductTests.TestDataDirectory, @"Codepage\product.wxs"));
candle.PreProcessorParams.Add("Codepage", codepage);
candle.Run();
Light light = new Light(candle);
light.Run();
}
开发者ID:zooba,项目名称:wix3,代码行数:12,代码来源:InstallPackages.ProductTests.cs
示例18: SimpleBindPath
public void SimpleBindPath()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(BindPathTests.TestDataDirectory, @"SimpleBindPath\product.wxs"));
candle.Run();
Light light = new Light(candle);
light.BindPath = WixTests.SharedFilesDirectory;
light.Run();
Verifier.VerifyResults(Path.Combine(BindPathTests.TestDataDirectory, @"SimpleBindPath\expected.msi"), light.OutputFile);
}
开发者ID:bleissem,项目名称:wix3,代码行数:12,代码来源:BindPaths.BindPathTests.cs
示例19: Codepage_UTF32
public void Codepage_UTF32()
{
string codepage = "utf-32";
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(ProductTests.TestDataDirectory, @"Codepage\product.wxs"));
candle.PreProcessorParams.Add("Codepage", codepage);
candle.Run();
Light light = new Light(candle);
light.Run();
}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:12,代码来源:InstallPackages.ProductTests.cs
示例20: MultipleWixobjs
public void MultipleWixobjs()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(WixobjTests.TestDataDirectory, @"WixobjTests\product.wxs"));
candle.SourceFiles.Add(Path.Combine(WixobjTests.TestDataDirectory, @"WixobjTests\features.wxs"));
candle.SourceFiles.Add(Path.Combine(WixobjTests.TestDataDirectory, @"WixobjTests\component1.wxs"));
candle.Run();
Light light = new Light();
light.ObjectFiles = candle.ExpectedOutputFiles;
light.Run();
}
开发者ID:bleissem,项目名称:wix3,代码行数:12,代码来源:Input.WixobjTests.cs
注:本文中的WixTest.Light类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论