Browse Source

NAntAddIn unit tests now don't need a hard-coded path in the config file.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@839 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
206a379d1d
  1. 3
      src/AddIns/Misc/MbUnitPad/Project/Src/MbUnitPad.cs
  2. 2
      src/AddIns/Misc/NAntAddIn/ConsoleApp/ConsoleApp.cs
  3. 12
      src/AddIns/Misc/NAntAddIn/ConsoleApp/ConsoleApp.sln
  4. 3
      src/AddIns/Misc/NAntAddIn/Test/Config.cs
  5. 4
      src/AddIns/Misc/NAntAddIn/Test/NAntAddIn.Tests.csproj
  6. 2
      src/AddIns/Misc/NAntAddIn/Test/NAntAddIn.Tests.dll.config
  7. 2
      src/SharpDevelop.Tests.sln

3
src/AddIns/Misc/MbUnitPad/Project/Src/MbUnitPad.cs

@ -139,6 +139,9 @@ namespace ICSharpCode.MbUnitPad
ReferenceProjectItem reference = item as ReferenceProjectItem; ReferenceProjectItem reference = item as ReferenceProjectItem;
if (reference != null) { if (reference != null) {
string include = reference.Include; string include = reference.Include;
if (reference is ProjectReferenceProjectItem) {
include = ((ProjectReferenceProjectItem)reference).ProjectName;
}
if (include.IndexOf(',') > 0) { if (include.IndexOf(',') > 0) {
include = include.Substring(0, include.IndexOf(',')); include = include.Substring(0, include.IndexOf(','));
} }

2
src/AddIns/Misc/NAntAddIn/ConsoleApp/ConsoleApp.cs

@ -13,7 +13,7 @@ using System.Threading;
namespace ICSharpCode.NAntAddIn.Tests.ConsoleApp namespace ICSharpCode.NAntAddIn.Tests.ConsoleApp
{ {
class ConsoleApp public class ConsoleApp
{ {
/// <summary> /// <summary>
/// Command line argument telling the app to echo the parameter text /// Command line argument telling the app to echo the parameter text

12
src/AddIns/Misc/NAntAddIn/ConsoleApp/ConsoleApp.sln

@ -1,6 +1,16 @@
Microsoft Visual Studio Solution File, Format Version 9.00 Microsoft Visual Studio Solution File, Format Version 9.00
# SharpDevelop 2.0.0.558 # SharpDevelop 2.0.0.838
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp", "ConsoleApp.csproj", "{2829F840-FF43-4EF6-A23D-C244C765092C}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp", "ConsoleApp.csproj", "{2829F840-FF43-4EF6-A23D-C244C765092C}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2829F840-FF43-4EF6-A23D-C244C765092C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2829F840-FF43-4EF6-A23D-C244C765092C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2829F840-FF43-4EF6-A23D-C244C765092C}.Release|Any CPU.Build.0 = Release|Any CPU
{2829F840-FF43-4EF6-A23D-C244C765092C}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection
EndGlobal EndGlobal

3
src/AddIns/Misc/NAntAddIn/Test/Config.cs

@ -6,6 +6,7 @@
// </file> // </file>
using System; using System;
using System.IO;
using System.Configuration; using System.Configuration;
namespace ICSharpCode.NAntAddIn.Tests namespace ICSharpCode.NAntAddIn.Tests
@ -25,7 +26,7 @@ namespace ICSharpCode.NAntAddIn.Tests
/// </summary> /// </summary>
public static string ConsoleAppFilename { public static string ConsoleAppFilename {
get { get {
return ConfigurationManager.AppSettings["ConsoleApp"]; return typeof(ICSharpCode.NAntAddIn.Tests.ConsoleApp.ConsoleApp).Assembly.Location;
} }
} }
} }

4
src/AddIns/Misc/NAntAddIn/Test/NAntAddIn.Tests.csproj

@ -38,6 +38,10 @@
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="ConsoleApp">
<HintPath>..\ConsoleApp\bin\ConsoleApp.exe</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="AssemblyInfo.cs" /> <Compile Include="AssemblyInfo.cs" />

2
src/AddIns/Misc/NAntAddIn/Test/NAntAddIn.Tests.dll.config

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<configuration> <configuration>
<appSettings> <appSettings>
<!--
<add key="consoleApp" value="C:\Projects\dotnet\Corsavy\SharpDevelop\src\AddIns\Misc\NAntAddIn\ConsoleApp\bin\ConsoleApp.exe" /> <add key="consoleApp" value="C:\Projects\dotnet\Corsavy\SharpDevelop\src\AddIns\Misc\NAntAddIn\ConsoleApp\bin\ConsoleApp.exe" />
-->
</appSettings> </appSettings>
</configuration> </configuration>

2
src/SharpDevelop.Tests.sln

@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 9.00 Microsoft Visual Studio Solution File, Format Version 9.00
# SharpDevelop 2.0.0.825 # SharpDevelop 2.0.0.838
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIns", "AddIns", "{14A277EE-7DF1-4529-B639-7D1EF334C1C5}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIns", "AddIns", "{14A277EE-7DF1-4529-B639-7D1EF334C1C5}"
ProjectSection(SolutionItems) = postProject ProjectSection(SolutionItems) = postProject
EndProjectSection EndProjectSection

Loading…
Cancel
Save