Skip to content

Commit c8e9be0

Browse files
committed
Update NUnitLite to 3.5.
1 parent b715fab commit c8e9be0

700 files changed

Lines changed: 44171 additions & 52760 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

test/NUnitLite/CHANGES.txt

Lines changed: 0 additions & 400 deletions
This file was deleted.
Lines changed: 24 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// ***********************************************************************
2-
// Copyright (c) 2012 Charlie Poole
1+
// ***********************************************************************
2+
// Copyright (c) 2014 Charlie Poole
33
//
44
// Permission is hereby granted, free of charge, to any person obtaining
55
// a copy of this software and associated documentation files (the
@@ -22,89 +22,57 @@
2222
// ***********************************************************************
2323

2424
using System.Reflection;
25-
using System.Runtime.CompilerServices;
26-
using System.Runtime.InteropServices;
27-
using System;
2825

29-
// General Information about an assembly is controlled through the following
30-
// set of attributes. Change these attribute values to modify the information
31-
// associated with an assembly.
32-
[assembly: AssemblyTitle("NUnitLite")]
33-
[assembly: AssemblyDescription("NUnitLite unit-testing framework")]
26+
//
27+
// Common Information for the NUnit assemblies
28+
//
3429
[assembly: AssemblyCompany("NUnit Software")]
35-
[assembly: AssemblyProduct("NUnitLite")]
36-
[assembly: AssemblyCopyright("Copyright 2013, Charlie Poole")]
37-
[assembly: AssemblyTrademark("NUnitLite")]
38-
[assembly: AssemblyCulture("")]
30+
[assembly: AssemblyProduct("NUnit 3")]
31+
[assembly: AssemblyCopyright("Copyright (C) 2016 Charlie Poole")]
32+
[assembly: AssemblyTrademark("NUnit is a trademark of NUnit Software")]
33+
34+
#if PORTABLE
35+
[assembly: AssemblyMetadata("PCL", "True")]
36+
#endif
3937

40-
// Set AssemblyConfiguration attribute depending on
41-
// how we are building the assembly.
4238
#if DEBUG
4339
#if NET_4_5
4440
[assembly: AssemblyConfiguration(".NET 4.5 Debug")]
4541
#elif NET_4_0
4642
[assembly: AssemblyConfiguration(".NET 4.0 Debug")]
47-
#elif NET_3_5
48-
[assembly: AssemblyConfiguration(".NET 3.5 Debug")]
4943
#elif NET_2_0
5044
[assembly: AssemblyConfiguration(".NET 2.0 Debug")]
51-
#elif NET_1_1
52-
[assembly: AssemblyConfiguration(".NET 1.1 Debug")]
53-
#elif NETCF_3_5
54-
[assembly: AssemblyConfiguration(".NET CF 3.5 Debug")]
55-
#elif NETCF_2_0
56-
[assembly: AssemblyConfiguration(".NET CF 2.0 Debug")]
5745
#elif SL_5_0
5846
[assembly: AssemblyConfiguration("Silverlight 5.0 Debug")]
5947
#elif SL_4_0
6048
[assembly: AssemblyConfiguration("Silverlight 4.0 Debug")]
6149
#elif SL_3_0
6250
[assembly: AssemblyConfiguration("Silverlight 3.0 Debug")]
51+
#elif NETCF_3_5
52+
[assembly: AssemblyConfiguration("Compact Framework 3.5 Debug")]
53+
#elif PORTABLE
54+
[assembly: AssemblyConfiguration("Portable Debug")]
55+
#else
56+
[assembly: AssemblyConfiguration("Debug")]
6357
#endif
6458
#else
6559
#if NET_4_5
6660
[assembly: AssemblyConfiguration(".NET 4.5")]
6761
#elif NET_4_0
6862
[assembly: AssemblyConfiguration(".NET 4.0")]
69-
#elif NET_3_5
70-
[assembly: AssemblyConfiguration(".NET 3.5")]
7163
#elif NET_2_0
7264
[assembly: AssemblyConfiguration(".NET 2.0")]
73-
#elif NET_1_1
74-
[assembly: AssemblyConfiguration(".NET 1.1")]
75-
#elif NETCF_3_5
76-
[assembly: AssemblyConfiguration(".NET CF 3.5")]
77-
#elif NETCF_2_0
78-
[assembly: AssemblyConfiguration(".NET CF 2.0")]
7965
#elif SL_5_0
8066
[assembly: AssemblyConfiguration("Silverlight 5.0")]
8167
#elif SL_4_0
8268
[assembly: AssemblyConfiguration("Silverlight 4.0")]
8369
#elif SL_3_0
8470
[assembly: AssemblyConfiguration("Silverlight 3.0")]
71+
#elif NETCF_3_5
72+
[assembly: AssemblyConfiguration("Compact Framework 3.5")]
73+
#elif PORTABLE
74+
[assembly: AssemblyConfiguration("Portable")]
75+
#else
76+
[assembly: AssemblyConfiguration("")]
8577
#endif
8678
#endif
87-
88-
// Setting ComVisible to false makes the types in this assembly not visible
89-
// to COM components. If you need to access a type in this assembly from
90-
// COM, set the ComVisible attribute to true on that type.
91-
[assembly: ComVisible(false)]
92-
93-
[assembly: CLSCompliant(true)]
94-
95-
// The following GUID is for the ID of the typelib if this project is exposed to COM
96-
[assembly: Guid("0be367fd-d825-4039-a70b-54a3557170ec")]
97-
98-
// Version information for an assembly consists of the following four values:
99-
//
100-
// Major Version
101-
// Minor Version
102-
// Build Number
103-
// Revision
104-
//
105-
// You can specify all the values or you can default the Revision and Build Numbers
106-
// by using the '*' as shown below:
107-
[assembly: AssemblyVersion("1.0.0.0")]
108-
#if !PocketPC && !WindowsCE && !NETCF
109-
[assembly: AssemblyFileVersion("1.0.0.0")]
110-
#endif

test/NUnitLite/LICENSE.txt

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
// ***********************************************************************
2+
// Copyright (c) 2014 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+
using NUnit.Compatibility;
26+
using NUnit.Framework.Internal;
27+
using NUnit.Framework.Internal.Execution;
28+
29+
#if PORTABLE && !NUNITLITE
30+
using BF = NUnit.Compatibility.BindingFlags;
31+
#else
32+
using BF = System.Reflection.BindingFlags;
33+
#endif
34+
35+
namespace NUnit.TestUtilities
36+
{
37+
/// <summary>
38+
/// Fakes provides static methods for creating test dummies of various kinds
39+
/// </summary>
40+
public static class Fakes
41+
{
42+
#region GetTestMethod
43+
44+
public static FakeTestMethod GetTestMethod(Type type, string name)
45+
{
46+
return new FakeTestMethod(type, name);
47+
}
48+
49+
public static FakeTestMethod GetTestMethod(object obj, string name)
50+
{
51+
return new FakeTestMethod(obj, name);
52+
}
53+
54+
#endregion
55+
56+
#region GetWorkItem
57+
58+
public static FakeWorkItem GetWorkItem(Test test, TestExecutionContext context)
59+
{
60+
return new FakeWorkItem(test, context);
61+
}
62+
63+
public static FakeWorkItem GetWorkItem(Test test)
64+
{
65+
return GetWorkItem(test, new TestExecutionContext());
66+
}
67+
68+
public static FakeWorkItem GetWorkItem(Type type, string name, TestExecutionContext context)
69+
{
70+
return GetWorkItem(GetTestMethod(type, name), context);
71+
}
72+
73+
public static FakeWorkItem GetWorkItem(Type type, string name)
74+
{
75+
return GetWorkItem(GetTestMethod(type, name));
76+
}
77+
78+
public static FakeWorkItem GetWorkItem(object obj, string name, TestExecutionContext context)
79+
{
80+
return GetWorkItem(obj.GetType(), name, context);
81+
}
82+
83+
public static FakeWorkItem GetWorkItem(object obj, string name)
84+
{
85+
return GetWorkItem(obj.GetType(), name);
86+
}
87+
88+
#endregion
89+
}
90+
91+
#region FakeTestMethod Class
92+
93+
/// <summary>
94+
/// FakeTestMethod is used in tests to simulate an actual TestMethod
95+
/// </summary>
96+
public class FakeTestMethod : TestMethod
97+
{
98+
public FakeTestMethod(object obj, string name)
99+
: this(obj.GetType(), name) { }
100+
101+
public FakeTestMethod(Type type, string name)
102+
: base(new MethodWrapper(type, type.GetMethod(name, BF.Public | BF.NonPublic | BF.Static | BF.Instance))) { }
103+
}
104+
105+
#endregion
106+
107+
#region FakeWorkItem Class
108+
109+
/// <summary>
110+
/// FakeWorkItem is used in tests to simulate an actual WorkItem
111+
/// </summary>
112+
public class FakeWorkItem : WorkItem
113+
{
114+
public event System.EventHandler Executed;
115+
116+
public FakeWorkItem(Test test, TestExecutionContext context)
117+
: base(test)
118+
{
119+
InitializeContext(context);
120+
}
121+
122+
public override void Execute()
123+
{
124+
if (Executed != null)
125+
Executed(this, System.EventArgs.Empty);
126+
}
127+
128+
protected override void PerformWork() { }
129+
}
130+
131+
#endregion
132+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// ***********************************************************************
2+
// Copyright (c) 2014 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.Reflection;
25+
26+
//
27+
// Current version for the NUnit Framework
28+
//
29+
[assembly: AssemblyVersion("3.5.0.0")]
30+
#if !NETCF
31+
[assembly: AssemblyFileVersion("3.5.0.0")]
32+
#endif

0 commit comments

Comments
 (0)