Exemple #1
0
 /// <summary>
 /// Creates a new instance of the Wix Dialog class.
 /// </summary>
 /// <param name="dialogElement">The dialog XML element loaded from
 /// the Wix document</param>
 public WixDialog(WixDocument document, XmlElement dialogElement, WixBinaries binaries)
 {
     this.document      = document;
     this.dialogElement = dialogElement;
     this.binaries      = binaries;
     namespaceManager   = new WixNamespaceManager(dialogElement.OwnerDocument.NameTable);
 }
		public void GetBinaryFileNameWhenWixDocNotInProject()
		{
			WixDocument doc = new WixDocument();
			WixBinaries binaries = new WixBinaries(doc, this);
			
			Assert.IsNull(binaries.GetBinaryFileName("UnknownId"));
		}
Exemple #3
0
		/// <summary>
		/// Creates a new instance of the Wix Dialog class.
		/// </summary>
		/// <param name="dialogElement">The dialog XML element loaded from
		/// the Wix document</param>
		public WixDialog(WixDocument document, XmlElement dialogElement, WixBinaries binaries)
		{
			this.document = document;
			this.dialogElement = dialogElement;
			this.binaries = binaries;
			namespaceManager = new WixNamespaceManager(dialogElement.OwnerDocument.NameTable);
		}
		public void SetUpFixture()
		{			
			WixProject p = WixBindingTestsHelper.CreateEmptyWixProject();
			projectDirectory = p.Directory;
			p.Name = "MySetup";
			
			FileProjectItem item = new FileProjectItem(p, ItemType.Compile);
			item.Include = "Setup.wxs";
			string docFileName = item.FileName;
			ProjectService.AddProjectItem(p, item);
			
			item = new FileProjectItem(p, ItemType.Compile);
			item.Include = "InvalidXml.wxs";
			ProjectService.AddProjectItem(p, item);

			item = new FileProjectItem(p, ItemType.Compile);
			item.Include = "MissingFile.wxs";
			ProjectService.AddProjectItem(p, item);
			
			item = new FileProjectItem(p, ItemType.Compile);
			item.Include = "Fragment.wxs";
			ProjectService.AddProjectItem(p, item);

			WixDocument doc = new WixDocument(p);
			doc.FileName = docFileName;
			doc.LoadXml(GetMainWixXml());
			
			binaries = new WixBinaries(doc, this);
		}