Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@4561 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
5 changed files with 75 additions and 4 deletions
@ -0,0 +1,47 @@ |
|||||||
|
// <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.ComponentModel; |
||||||
|
using System.ComponentModel.Design; |
||||||
|
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 FormBaseClassCreatedOnLoadTestFixture : LoadFormTestFixtureBase |
||||||
|
{ |
||||||
|
public override string PythonCode { |
||||||
|
get { |
||||||
|
ComponentCreator.AddType("FormBase.FormBase", typeof(Component)); |
||||||
|
|
||||||
|
return "class TestForm(FormBase.FormBase):\r\n" + |
||||||
|
" def InitializeComponent(self):\r\n" + |
||||||
|
" pass"; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void BaseClassNamePassedAsGetTypeParam() |
||||||
|
{ |
||||||
|
Assert.AreEqual("FormBase.FormBase", ComponentCreator.TypeNames[0]); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void BaseClassTypePassedToCreateComponent() |
||||||
|
{ |
||||||
|
Assert.AreEqual(typeof(Component).FullName, ComponentCreator.CreatedComponents[0].TypeName); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue