1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
5
using ICSharpCode.PythonBinding;
8
namespace PythonBinding.Tests.Designer
11
public class PythonCodeBuilderTests
13
PythonCodeBuilder codeBuilder;
18
codeBuilder = new PythonCodeBuilder();
19
codeBuilder.IndentString = "\t";
23
/// Check that the "self._components = System.ComponentModel.Container()" line is generated
24
/// the once and before any other lines of code.
27
public void AppendCreateComponentsContainerTwice()
29
codeBuilder.IndentString = " ";
30
codeBuilder.IncreaseIndent();
31
codeBuilder.AppendIndentedLine("self._listView = System.Windows.Forms.ListView()");
32
codeBuilder.InsertCreateComponentsContainer();
33
codeBuilder.InsertCreateComponentsContainer();
36
" self._components = System.ComponentModel.Container()\r\n" +
37
" self._listView = System.Windows.Forms.ListView()\r\n";
39
Assert.AreEqual(expectedCode, codeBuilder.ToString());