本文整理汇总了C#中WixTest.Candle类的典型用法代码示例。如果您正苦于以下问题:C# Candle类的具体用法?C# Candle怎么用?C# Candle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Candle类属于WixTest命名空间,在下文中一共展示了Candle类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: LongFilePath
public void LongFilePath()
{
//the max length of a path is 247 chars, the filepath is 259 chars
string OutputPath = Utilities.FileUtilities.GetUniqueFileName();
//add initial 170 chars
OutputPath = Path.Combine(OutputPath, @"FilePathNewfolder11(20chars)\Newfolder12(20chars)Newfolder12(20chars)Newfolder13(20chars)Newfolder13(20chars)\Newfolder14(20chars)Newfolder15(20chars)Newfolder16(20chars)");
int i = 245 - OutputPath.Length;
while (i > 0)
{
OutputPath = Path.Combine(OutputPath, @"pt");
i = 245 - OutputPath.Length;
}
if (OutputPath.Length < 246)
{
OutputPath = Path.Combine(OutputPath, "T");
}
Assert.IsTrue(OutputPath.Length <248, "The output path is not less than 248 chars");
Directory.CreateDirectory(OutputPath);
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(Tests.WixTests.SharedAuthoringDirectory, "BasicProduct.wxs"));
candle.OutputFile = Path.Combine(OutputPath, "Prod.wixobj");
Assert.IsTrue((candle.OutputFile.Length > 256) && (candle.OutputFile.Length < 260), "The output filepath{0} is not between 256 and 260 chars",candle .OutputFile .Length );
candle.Run();
}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:30,代码来源:Output.FileSystemTests.cs
示例2: 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
示例3: NoPedanticSwitch
public void NoPedanticSwitch()
{
Candle candle = new Candle();
candle.Pedantic = false;
candle.SourceFiles.Add(PedanticTests.TestFile);
candle.Run();
}
开发者ID:bleissem,项目名称:wix3,代码行数:7,代码来源:PedanticTests.cs
示例4: FileNameWithSpace
public void FileNameWithSpace()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(Tests.WixTests.SharedAuthoringDirectory, "BasicProduct.wxs"));
candle.OutputFile = Path.Combine(Utilities.FileUtilities.GetUniqueFileName(), "Pro duct.wixobj");
candle.Run();
}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:7,代码来源:Output.FileSystemTests.cs
示例5: NoErrorOnSpecifyingMinSizeInFileSearch
public void NoErrorOnSpecifyingMinSizeInFileSearch()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(RegressionTests.TestDataDirectory,@"NoErrorOnSpecifyingMinSizeInFileSearch\FileSearch.wxs"));
candle.ExpectedExitCode = 0;
candle.Run();
}
开发者ID:bleissem,项目名称:wix3,代码行数:7,代码来源:RegressionTests.cs
示例6: SuppressAllWarningsSwitch
public void SuppressAllWarningsSwitch()
{
Candle candle = new Candle();
candle.SourceFiles.Add(testFile);
candle.SuppressAllWarnings = true;
candle.Run();
}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:7,代码来源:SuppressWarningsTests.cs
示例7: ShortcutDirectoryNotSet
public void ShortcutDirectoryNotSet()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(RegressionTests.TestDataDirectory, @"ShortcutDirectoryNotSet\ShortcutProduct.wxs"));
candle.ExpectedExitCode = 0;
candle.Run();
}
开发者ID:zooba,项目名称:wix3,代码行数:7,代码来源:RegressionTests.cs
示例8: 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
示例9: NoSuppressWarningsSwitch
public void NoSuppressWarningsSwitch()
{
Candle candle = new Candle();
candle.SourceFiles.Add(testFile);
candle.ExpectedWixMessages.Add(new WixMessage(1096, WixMessage.MessageTypeEnum.Warning));
candle.ExpectedWixMessages.Add(new WixMessage(1075, WixMessage.MessageTypeEnum.Warning));
candle.Run();
}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:8,代码来源:SuppressWarningsTests.cs
示例10: NoTraceSwitch
public void NoTraceSwitch()
{
Candle candle = new Candle();
candle.SourceFiles.Add(testFile);
candle.Trace = false;
candle.ExpectedWixMessages.Add(new WixMessage(1075, "The Product/@UpgradeCode attribute was not found; it is strongly recommended to ensure that this product can be upgraded.", WixMessage.MessageTypeEnum.Warning));
candle.Run();
}
开发者ID:zooba,项目名称:wix3,代码行数:8,代码来源:TraceTests.cs
示例11: EmbedCabAttrWithoutCabinetAttr
public void EmbedCabAttrWithoutCabinetAttr()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(RegressionTests.TestDataDirectory,@"EmbedCabAttrWithoutCabinetAttr\EmbedCabProduct.wxs"));
candle.ExpectedExitCode = 10;
candle.ExpectedWixMessages.Add(new WixMessage(10, "The Media/@Cabinet attribute was not found; it is required when attribute EmbedCab has a value of 'yes'.", WixMessage.MessageTypeEnum.Error));
candle.Run();
}
开发者ID:bleissem,项目名称:wix3,代码行数:8,代码来源:RegressionTests.cs
示例12: VerifyDeprecatedSwitch
public void VerifyDeprecatedSwitch()
{
Candle candle = new Candle();
candle.SourceFiles.Add(testFile);
candle.OtherArguments = "-swall";
candle.ExpectedWixMessages.Add(new WixMessage(1108, "The command line switch 'swall' is deprecated. Please use 'sw' instead.", WixMessage.MessageTypeEnum.Warning));
candle.Run();
}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:8,代码来源:SuppressWarningsTests.cs
示例13: SuppressSpecificWarnings
public void SuppressSpecificWarnings()
{
Candle candle = new Candle();
candle.SourceFiles.Add(testFile);
candle.SuppressWarnings.Add(1075);
candle.ExpectedWixMessages.Add(new WixMessage(1096, WixMessage.MessageTypeEnum.Warning));
candle.Run();
}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:8,代码来源:SuppressWarningsTests.cs
示例14: MultipleWxsFiles
public void MultipleWxsFiles()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(WixTests.SharedAuthoringDirectory, "BasicProduct.wxs"));
candle.SourceFiles.Add(Path.Combine(Path.Combine(InputTests.TestDataDirectory, @"MultipleWxsFiles\product.wxs")));
candle.SourceFiles.Add(Path.Combine(Path.Combine(InputTests.TestDataDirectory, @"MultipleWxsFiles\feature.wxs")));
candle.Run();
}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:8,代码来源:Input.InputTests.cs
示例15: InvalidWxsFile
public void InvalidWxsFile()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(InputTests.TestDataDirectory, @"InvalidWxsFile\Product.wxs"));
candle.ExpectedWixMessages.Add(new WixMessage(104, "Not a valid source file; detail: Data at the root level is invalid. Line 1, position 1.", WixMessage.MessageTypeEnum.Error));
candle.ExpectedExitCode = 104;
candle.Run();
}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:8,代码来源:Input.InputTests.cs
示例16: EmptyWxsFile
public void EmptyWxsFile()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(InputTests.TestDataDirectory, @"EmptyWxsFile\Product.wxs"));
candle.ExpectedWixMessages.Add(new WixMessage(104, "Not a valid source file; detail: Root element is missing.", WixMessage.MessageTypeEnum.Error));
candle.ExpectedExitCode = 104;
candle.Run();
}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:8,代码来源:Input.InputTests.cs
示例17: OutSwitch
public void OutSwitch()
{
string outputDirectory = Utilities.FileUtilities.GetUniqueFileName();
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(Tests.WixTests.SharedAuthoringDirectory, "BasicProduct.wxs"));
candle.OutputFile = Path.Combine(outputDirectory, "BasicProduct.wixobj"); ;
candle.Run();
}
开发者ID:bleissem,项目名称:wix3,代码行数:8,代码来源:Output.OutputTests.cs
示例18: Light
/// <summary>
/// Constructor that uses data from a Candle object to create a Light object
/// </summary>
/// <param name="candle">A Candle object</param>
/// <param name="xmlOutput">False if Light should build an MSI. True if Light should build a wixout.</param>
public Light(Candle candle, bool xmlOutput)
: this()
{
this.XmlOutput = xmlOutput;
// The output of Candle is the input for Light
this.ObjectFiles = candle.ExpectedOutputFiles;
}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:13,代码来源:Light.cs
示例19: ProductVersionAttributeNotPopulated
public void ProductVersionAttributeNotPopulated()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(RegressionTests.TestDataDirectory,@"ProductVersionAttributeNotPopulated\ProductVersionAttributeMissing.wxs"));
candle.ExpectedWixMessages.Add(new WixMessage(10, "The Product/@Version attribute was not found; it is required.", WixMessage.MessageTypeEnum.Error));
candle.ExpectedExitCode = 10;
candle.Run();
}
开发者ID:bleissem,项目名称:wix3,代码行数:8,代码来源:RegressionTests.cs
示例20: DirectoryAttributeWithPropertyAttribute
public void DirectoryAttributeWithPropertyAttribute()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(RemoveFolderTests.TestDataDirectory, @"DirectoryAttributeWithPropertyAttribute\product.wxs"));
candle.ExpectedWixMessages.Add(new WixMessage(35, "The RemoveFolder/@Property attribute cannot be specified when attribute Directory is present with value 'WixTestFolder'.", WixMessage.MessageTypeEnum.Error));
candle .ExpectedExitCode = 35;
candle.Run();
}
开发者ID:bleissem,项目名称:wix3,代码行数:8,代码来源:Components.RemoveFolderTests.cs
注:本文中的WixTest.Candle类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论