public void Init()
		{
			SD.InitializeForUnitTests();
			textEditor = new MockTextEditor();
			MockTextEditorViewContent viewContent = new MockTextEditorViewContent();
			viewContent.TextEditor = textEditor;
			viewContent.SetFileName(@"d:\projects\test\file.wxs");
			
			workbench = new MockWorkbench();
			workbench.ViewContentCollection.Add(viewContent);
			
			MockTextEditorOptions textEditorOptions = new MockTextEditorOptions();
			MockXmlTextWriter xmlTextWriter = new MockXmlTextWriter(textEditorOptions);
			WixProject project = WixBindingTestsHelper.CreateEmptyWixProject();
			document = new WixDocument(project, new DefaultFileLoader());
			document.LoadXml(GetWixXml());
			document.FileName = @"d:\projects\test\File.wxs";
			textEditor.Document.Text = GetWixXml();
			
			MockWixPackageFilesControl packageFilesControl = new MockWixPackageFilesControl();
			packageFilesView = new PackageFilesView(project, workbench, packageFilesControl, xmlTextWriter);
			
			packageFilesControl.IsDirty = true;
			AddNewChildElementsToDirectory();
			packageFilesView.Write(document);
		}
		public void WixDesignerAttached()
		{
			MockTextEditorViewContent view = new MockTextEditorViewContent();
			using (WixDialogDesigner designerAdded = new WixDialogDesigner(view)) {
				view.SecondaryViewContents.Add(designerAdded);
				Assert.IsNotNull(WixDialogDesigner.GetDesigner(view));
			}
		}
		public void Init()
		{
			primaryView = new MockTextEditorViewContent();
			primaryView.SetFileName(@"d:\projects\test\dialog.wxs");
			
			dialogDesigner = new WixDialogDesignerGenerator();
			MockOpenedFile openedFile = new MockOpenedFile("dialog.designer.wxs", false);
			dialogDesigner.Attach(new FormsDesignerViewContent(primaryView, openedFile));
			
			files = new List<OpenedFile>();
			IEnumerable<OpenedFile> sourceFiles = dialogDesigner.GetSourceFiles(out designerOpenedFile);
			if (sourceFiles != null) {
				files.AddRange(sourceFiles);
			}
		}
		public void Init()
		{
			existingTextEditor = new MockTextEditor();
			MockTextEditorViewContent viewContent = new MockTextEditorViewContent();
			viewContent.TextEditor = existingTextEditor;
			viewContent.SetFileName(@"d:\projects\test\file.wxs");
			
			workbench = new MockWorkbench();
			workbench.ViewContentCollection.Add(new MockViewContent());
			workbench.ViewContentCollection.Add(viewContent);
			
			document = new WixDocument();
			document.FileName = @"d:\Projects\Test\File.wxs";
			
			openEditors = new OpenTextEditors(workbench);
		}
		public void Init()
		{
			viewWithOpenWixDocument = new MockTextEditorViewContent();
			viewWithOpenWixDocument.SetFileName(@"d:\projects\test\a.wxs");
			
			workbench = new MockWorkbench();
			workbench.ViewContentCollection.Add(viewWithOpenWixDocument);
			
			document = new WixDocument();
			document.FileName = @"d:\projects\test\a.wxs";
			
			packageFilesControl = new MockWixPackageFilesControl();
			packageFilesControl.Document = document;
			
			project = WixBindingTestsHelper.CreateEmptyWixProject();
			packageFilesView = new PackageFilesView(project, workbench, packageFilesControl);
			
			AfterInit();
		}
		public void Init()
		{
			view = new MockTextEditorViewContent();
		}
		public void Init()
		{
			SD.InitializeForUnitTests();
			view = new MockTextEditorViewContent();
		}
		public void NullFileName()
		{
			MockTextEditorViewContent view = new MockTextEditorViewContent();
			view.SetFileName(null);
			Assert.IsFalse(binding.CanAttachTo(view));			
		}
		public void UntitledNonWixFileName()
		{
			MockTextEditorViewContent view = new MockTextEditorViewContent();
			view.SetUntitledFileName("Setup.txt");
			Assert.IsFalse(binding.CanAttachTo(view));
		}
		public void WixFileNameUppercase()
		{
			MockTextEditorViewContent view = new MockTextEditorViewContent();
			view.SetFileName("SETUP.WXS");
			Assert.IsTrue(binding.CanAttachTo(view));
		}
		public void WixIncludeFileName()
		{
			MockTextEditorViewContent view = new MockTextEditorViewContent();
			view.SetFileName("Setup.wxi");
			Assert.IsTrue(binding.CanAttachTo(view));
		}
		public void CreatesWixDialogDesigner()
		{
			MockTextEditorViewContent view = new MockTextEditorViewContent();
			IViewContent[] views = binding.CreateSecondaryViewContent(view);
			Assert.AreEqual(1, views.Length);
			Assert.IsTrue(views[0] is WixDialogDesigner);
			views[0].Dispose();
		}
		public void UntitledWixFileName()
		{
			MockTextEditorViewContent view = new MockTextEditorViewContent();
			view.SetUntitledName("Setup.wxs");
			Assert.IsTrue(binding.CanAttachTo(view));
		}