Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3919 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
8 changed files with 167 additions and 5 deletions
@ -0,0 +1,57 @@
@@ -0,0 +1,57 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Drawing; |
||||
using System.IO; |
||||
using System.Windows.Forms; |
||||
|
||||
using ICSharpCode.PythonBinding; |
||||
using NUnit.Framework; |
||||
using PythonBinding.Tests.Utils; |
||||
|
||||
namespace PythonBinding.Tests.Designer |
||||
{ |
||||
[TestFixture] |
||||
public class LoadAnchorStylesTestFixture : LoadFormTestFixtureBase |
||||
{ |
||||
public override string PythonCode { |
||||
get { |
||||
return "class TestForm(System.Windows.Forms.Form):\r\n" + |
||||
" def InitializeComponent(self):\r\n" + |
||||
" self._textBox1 = System.Windows.Forms.TextBox()\r\n" + |
||||
" self.SuspendLayout()\r\n" + |
||||
" # \r\n" + |
||||
" # textBox1\r\n" + |
||||
" # \r\n" + |
||||
" self._textBox1.Name = \"textBoxName\"\r\n" + |
||||
" self._textBox1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left\r\n" + |
||||
" # \r\n" + |
||||
" # TestForm\r\n" + |
||||
" # \r\n" + |
||||
" self.Name = \"TestForm\"\r\n" + |
||||
" self.Controls.Add(self._textBox1)\r\n" + |
||||
" self.ResumeLayout(False)\r\n"; |
||||
} |
||||
} |
||||
|
||||
[TestFixtureSetUp] |
||||
public new void SetUpFixture() |
||||
{ |
||||
base.SetUpFixture(); |
||||
} |
||||
|
||||
[Test] |
||||
public void TextBoxAnchorStyle() |
||||
{ |
||||
AnchorStyles style = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left; |
||||
TextBox textBox = Form.Controls[0] as TextBox; |
||||
Assert.AreEqual(style, textBox.Anchor); |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue