public void SetUp()
		{
			displayBinding = new DerivedPythonFormsDesignerDisplayBinding();
			viewContent = new MockTextEditorViewContent();
			parseInfo = new ParseInformation(new DefaultCompilationUnit(new DefaultProjectContent()));
			viewContent.PrimaryFileName = new FileName("test.py");
			viewContent.TextEditor.Document.Text = "text content";
			displayBinding.ParseServiceParseInfoToReturn = parseInfo;
			displayBinding.IsParseInfoDesignable = true;
			canAttachToDesignableClass = displayBinding.CanAttachTo(viewContent);
		}
		void CreateDesignerGenerator()
		{
			textEditorViewContent = new MockTextEditorViewContent();
			formsDesignerOpenedFile = new MockOpenedFile("test.py");
			textEditorViewContent.PrimaryFile = formsDesignerOpenedFile;
			formsDesignerView = new FormsDesignerViewContent(textEditorViewContent, formsDesignerOpenedFile);
			textEditorOptions = new MockTextEditorOptions();
			generator = new TestableScriptingDesignerGenerator(textEditorOptions);
			generator.Attach(formsDesignerView);
			generator.ParseInfoToReturnFromParseFile = generator.CreateParseInfoWithOneClass();
		}
		public void SetUpFixture()
		{
			textEditorOptions = new MockTextEditorOptions();
			generator = new DerivedRubyDesignerGenerator(textEditorOptions);
			mockViewContent = new MockTextEditorViewContent();
			viewContent = new DerivedFormDesignerViewContent(mockViewContent, new MockOpenedFile(fileName));
			generator.Attach(viewContent);
			viewContent.DesignerCodeFileContent = GetTextEditorCode();
			
			RubyParser parser = new RubyParser();
			ICompilationUnit parserCompilationUnit = parser.Parse(new DefaultProjectContent(), fileName, GetTextEditorCode());
			ParseInformation parseInfo = new ParseInformation(parserCompilationUnit);
			generator.ParseInfoToReturnFromParseFileMethod = parseInfo;
			
			AfterSetUpFixture();
		}
		public void FormDesignerNotCreatedIfAlreadyAttached()
		{
			MockTextEditorViewContent view = new MockTextEditorViewContent();			
			IViewContent[] views = null;
			using (FormsDesignerViewContent formsDesigner = new FormsDesignerViewContent(view, new MockOpenedFile("test.py"))) {
				view.SecondaryViewContents.Add(formsDesigner);
				views = displayBinding.CreateSecondaryViewContent(view, new MockTextEditorOptions());
			}
			Assert.AreEqual(0, views.Length);
		}
		public void CreatesPythonFormsDesigner()
		{
			MockTextEditorViewContent view = new MockTextEditorViewContent();
			IViewContent[] views = displayBinding.CreateSecondaryViewContent(view, new MockTextEditorOptions());
			Assert.AreEqual(1, views.Length);
			Assert.IsTrue(views[0] is FormsDesignerViewContent);
			views[0].Dispose();
		}