Skip to content

Commit b52eb9d

Browse files
committed
Fix own nunit frameworks for Unity.
Latest Unity does not allow System.Web and System.Windows.Forms assembly reference, so this commit excludes them from net3.5 build.
1 parent eee39c8 commit b52eb9d

File tree

5 files changed

+45
-6
lines changed

5 files changed

+45
-6
lines changed

test/NUnitLite/NUnitFramework/framework/Api/FrameworkController.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
using System.IO;
3131
using System.Reflection;
3232
using System.Security;
33+
#if SILVERLIGHT
3334
using System.Web.UI;
35+
#endif // SILVERLIGHT
36+
3437
using NUnit.Compatibility;
3538
using NUnit.Framework.Interfaces;
3639
using NUnit.Framework.Internal;

test/NUnitLite/NUnitFramework/framework/Api/NUnitTestAssemblyRunner.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#if !SILVERLIGHT && !NETCF && !PORTABLE
3333
using System.Diagnostics;
3434
using System.Security;
35-
using System.Windows.Forms;
3635
#endif
3736

3837
namespace NUnit.Framework.Api
@@ -392,9 +391,6 @@ private int GetLevelOfParallelism()
392391
[SecuritySafeCritical]
393392
private static void PauseBeforeRun()
394393
{
395-
var process = Process.GetCurrentProcess();
396-
string attachMessage = string.Format("Attach debugger to Process {0}.exe with Id {1} if desired.", process.ProcessName, process.Id);
397-
MessageBox.Show(attachMessage, process.ProcessName, MessageBoxButtons.OK, MessageBoxIcon.Information);
398394
}
399395
#endif
400396

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// ***********************************************************************
2+
// Copyright (c) 2010 Charlie Poole
3+
//
4+
// Permission is hereby granted, free of charge, to any person obtaining
5+
// a copy of this software and associated documentation files (the
6+
// "Software"), to deal in the Software without restriction, including
7+
// without limitation the rights to use, copy, modify, merge, publish,
8+
// distribute, sublicense, and/or sell copies of the Software, and to
9+
// permit persons to whom the Software is furnished to do so, subject to
10+
// the following conditions:
11+
//
12+
// The above copyright notice and this permission notice shall be
13+
// included in all copies or substantial portions of the Software.
14+
//
15+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16+
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18+
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19+
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21+
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22+
// ***********************************************************************
23+
24+
using System;
25+
26+
namespace NUnit.Framework.Interfaces
27+
{
28+
/// <summary>
29+
/// Dummy of <c>System.Web.UI.ICallbackEventHandler</c>.
30+
/// </summary>
31+
public interface ICallbackEventHandler
32+
{
33+
/// <summary>
34+
/// Raises the callback event.
35+
/// </summary>
36+
/// <param name="eventArgument">The event argument.</param>
37+
void RaiseCallbackEvent(string eventArgument);
38+
}
39+
}

test/NUnitLite/NUnitFramework/framework/Internal/TestProgressReporter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
// ***********************************************************************
2323

2424
using System;
25+
#if SILVERLIGHT
2526
using System.Web.UI;
27+
#endif // SILVERLIGHT
2628
using NUnit.Framework.Interfaces;
2729

2830
namespace NUnit.Framework.Internal

test/NUnitLite/NUnitFramework/framework/nunit.framework-3.5.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
</Compile>
118118
<Compile Include="Env.cs" />
119119
<Compile Include="Guard.cs" />
120+
<Compile Include="Interfaces\ICallbackEventHandler.cs" />
120121
<Compile Include="Interfaces\IDisposableFixture.cs" />
121122
<Compile Include="Interfaces\IMethodInfo.cs" />
122123
<Compile Include="Interfaces\IParameterInfo.cs" />
@@ -419,8 +420,6 @@
419420
<Reference Include="System" />
420421
<Reference Include="System.Data" />
421422
<Reference Include="System.Configuration" />
422-
<Reference Include="System.Web" />
423-
<Reference Include="System.Windows.Forms" />
424423
<Reference Include="System.Xml" />
425424
</ItemGroup>
426425
<ItemGroup>

0 commit comments

Comments
 (0)