Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5785 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61pull/1/head
63 changed files with 700 additions and 153 deletions
@ -0,0 +1,65 @@
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0"?> |
||||
<Template author="Justin Dearing" version="1.0"> |
||||
|
||||
<Config |
||||
name = "${res:Templates.File.WebHandler.Name}" |
||||
icon = "C#.File.NewClass" |
||||
category = "C#" |
||||
subcategory = "ASP.NET" |
||||
defaultname = "WebHandler${Number}.ashx" |
||||
language = "C#" |
||||
/> |
||||
|
||||
<Description>${res:Templates.File.WebHandler.Description}</Description> |
||||
<!-- |
||||
Special new file templates: |
||||
${StandardNamespace} -> Standardnamespace of the current project or FileNameWithoutExtension |
||||
${FullName} -> Full generated path name |
||||
${FileName} -> File name with extension |
||||
${FileNameWithoutExtension} -> File name without extension |
||||
${Extension} -> Extension in the form ".cs" |
||||
${Path} -> Full path of the file |
||||
--> |
||||
<Files> |
||||
<File name="${Path}/${FileName}.cs" DependentUpon="${FileName}" language="C#"><![CDATA[${StandardHeader.C#} |
||||
using System; |
||||
using System.Web; |
||||
|
||||
namespace ${StandardNamespace} |
||||
{ |
||||
/// <summary> |
||||
/// Description of ${ClassName} |
||||
/// </summary> |
||||
public class ${ClassName} : IHttpHandler |
||||
{ |
||||
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
||||
#region Process Request |
||||
public void ProcessRequest(HttpContext context) |
||||
{ |
||||
context.Response.ContentType = "text/plain"; |
||||
context.Response.Write(@"Hello #Develop."); |
||||
context.Response.Flush(); |
||||
context.Response.Close(); |
||||
} |
||||
#endregion |
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
||||
|
||||
public bool IsReusable |
||||
{ |
||||
get { return true; } |
||||
} |
||||
|
||||
} |
||||
} |
||||
]]></File> |
||||
<File name="${FullName}" language="HTML"><![CDATA[<%@ WebHandler |
||||
Language = "C#" |
||||
Class = "${StandardNamespace}.${ClassName}" |
||||
%> |
||||
]]> </File> |
||||
|
||||
</Files> |
||||
|
||||
<AdditionalOptions/> |
||||
</Template> |
@ -0,0 +1,39 @@
@@ -0,0 +1,39 @@
|
||||
// <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.ComponentModel; |
||||
using System.ComponentModel.Design; |
||||
using System.Data; |
||||
using System.Drawing; |
||||
using System.Windows.Forms; |
||||
using ICSharpCode.PythonBinding; |
||||
using IronPython.Compiler.Ast; |
||||
using NUnit.Framework; |
||||
using PythonBinding.Tests.Utils; |
||||
|
||||
namespace PythonBinding.Tests.Designer |
||||
{ |
||||
[TestFixture] |
||||
public class DeserializeConstraintArrayTestFixture : DeserializeAssignmentTestFixtureBase |
||||
{ |
||||
public override string GetPythonCode() |
||||
{ |
||||
return "self.Items = System.Array[System.Data.Constraint](\r\n" + |
||||
" [System.Data.UniqueConstraint(\"Constraint1\", System.Array[System.String](\r\n" + |
||||
" [\"Column1\"]), False)]))"; |
||||
} |
||||
|
||||
[Test] |
||||
public void DeserializedObjectIsExpectedArray() |
||||
{ |
||||
UniqueConstraint constraint = new UniqueConstraint("Constraint1", new string[] { "Column1" }, false); |
||||
Constraint[] expectedArray = new Constraint[] { constraint }; |
||||
Assert.AreEqual(expectedArray, deserializedObject); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,41 @@
@@ -0,0 +1,41 @@
|
||||
// <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.Data; |
||||
using ICSharpCode.PythonBinding; |
||||
using NUnit.Framework; |
||||
using PythonBinding.Tests.Utils; |
||||
|
||||
namespace PythonBinding.Tests.Utils.Tests |
||||
{ |
||||
[TestFixture] |
||||
public class MockComponentCreatorTests |
||||
{ |
||||
MockComponentCreator componentCreator; |
||||
|
||||
[SetUp] |
||||
public void Init() |
||||
{ |
||||
componentCreator = new MockComponentCreator(); |
||||
} |
||||
|
||||
[Test] |
||||
public void GetTypeReturnsConstraintTypeWhenPassedSystemDataConstraintString() |
||||
{ |
||||
Type type = componentCreator.GetType(typeof(Constraint).FullName); |
||||
Assert.AreEqual(typeof(Constraint), type); |
||||
} |
||||
|
||||
[Test] |
||||
public void GetTypeReturnsUniqueConstraintTypeWhenPassedSystemDataUniqueConstraintString() |
||||
{ |
||||
Type type = componentCreator.GetType(typeof(UniqueConstraint).FullName); |
||||
Assert.AreEqual(typeof(UniqueConstraint), type); |
||||
} |
||||
} |
||||
} |
@ -1,2 +0,0 @@
@@ -1,2 +0,0 @@
|
||||
SharpDevelop is currently using a slighly modified version of NUnit 2.5.4.10098: |
||||
nunit.util.dll is modified: the hardcoded .NET version "4.0.21006" (.NET 4 Beta 2) was replaced with "4.0.30319" (.NET 4 RTM). |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue