home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 February / CMCD0205.ISO / Software / Freeware / Programare / Sharp / SharpDevelop_1.0.3.1761_Setup.exe / CSharp.UnitTest.xft < prev    next >
Extensible Markup Language  |  2004-10-06  |  3KB  |  87 lines

  1. <?xml version="1.0"?>
  2. <Template author="Mike Krueger" version="1.0">
  3.     
  4.     <Config
  5.           name        = "${res:Templates.File.UnitTest.Name}"
  6.           icon        = "C#.File.FullFile"
  7.           category    = "C#"
  8.           defaultname = "Test${Number}.cs"
  9.           language    = "C#"/>
  10.      
  11.     <Description>${res:Templates.File.UnitTest.Description}</Description>
  12.     
  13.     <!-- 
  14.     Special new file templates:
  15.         ${StandardNamespace}        -> Standardnamespace of the current project or FileNameWithoutExtension
  16.         ${FullName}                 -> Full generated path name
  17.         ${FileName}                 -> File name with extension
  18.         ${FileNameWithoutExtension} -> File name without extension
  19.         ${Extension}                -> Extension in the form ".cs"
  20.         ${Path}                     -> Full path of the file
  21.      -->
  22.     <Properties>
  23.         <Property
  24.             name          = "ConditionalClass"
  25.             localizedName = "${res:Templates.File.Properties.AddIFDEFTest}"
  26.             type          = "System.Boolean"
  27.             defaultValue  = "False"
  28.             category      = "${res:Templates.File.Properties.ContextCategory}"
  29.             description   = "${res:Templates.File.Properties.AddIFDEFTest.Description}"
  30.         />
  31.         <Property
  32.             name          = "AddSetupCode"
  33.             localizedName = "${res:Templates.File.Properties.AddSetupCode}"
  34.             type          = "System.Boolean"
  35.             defaultValue  = "False"
  36.             category      = "${res:Templates.File.Properties.OptionCategory}"
  37.             description   = "${res:Templates.File.Properties.AddSetupCode.Description}"
  38.         />
  39.         <Property
  40.             name          = "AddTearDownCode"
  41.             localizedName = "${res:Templates.File.Properties.AddTearDownCode}"
  42.             type          = "System.Boolean"
  43.             defaultValue  = "False"
  44.             category      = "${res:Templates.File.Properties.OptionCategory}"
  45.             description   = "${res:Templates.File.Properties.AddTearDownCode.Description}"
  46.         />
  47.     </Properties>
  48.         
  49.     <Files>
  50.         <File name="${FullName}" language="C#"><![CDATA[${StandardHeader.C#}
  51. <% if (ConditionalClass) { %>#if TEST
  52. <% } %>
  53. using System;
  54. using NUnit.Framework;
  55.  
  56. namespace ${StandardNamespace}.Tests
  57. {
  58.     [TestFixture]
  59.     public class ${ClassName}
  60.     {
  61.         [Test]
  62.         public void TestMethod()
  63.         {
  64.             // TODO: Add your test.
  65.         }<% if (AddSetupCode) { %>
  66.         
  67.         [TestFixtureSetUp]
  68.         public void Init()
  69.         {
  70.             // TODO: Add Init code.
  71.         }<% } if (AddTearDownCode) { %>
  72.         
  73.         [TestFixtureTearDown]
  74.         public void Dispose()
  75.         {
  76.             // TODO: Add tear down code.
  77.         }<% } %>
  78.     }
  79. }
  80. <% if (ConditionalClass) { %>#endif
  81. <% } %>]]></File>
  82.     </Files>
  83.     
  84.     <AdditionalOptions/>
  85. </Template>
  86.  
  87.