public void Constructor_NewInstance_ParseInfoToReturnFromParseFileHasOneClass() { CreateTestableScriptingDesignerGenerator(); parseInfo = generator.CreateParseInfoWithOneClass(); int count = parseInfo.CompilationUnit.Classes.Count; Assert.AreEqual(1, count); }
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(); }