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 CanRetrievePrimaryOpenedFile() { MockOpenedFile file = new MockOpenedFile(@"d:\a.txt", false); view.PrimaryFile = file; Assert.AreSame(file, view.PrimaryFile); }