Skip to content
This repository was archived by the owner on Jan 8, 2023. It is now read-only.

Commit 3123d9b

Browse files
committed
Merge pull request #30 from nunit/issue-28
Support Windows 10 UAP with Xamarin
2 parents 14fa5e6 + 071469d commit 3123d9b

Some content is hidden

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

53 files changed

+30913
-203
lines changed

MainPage.xaml.cs.txt.pp

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Copyright (c) 2015 Charlie Poole
2+
//
3+
// Permission is hereby granted, free of charge, to any person obtaining
4+
// a copy of this software and associated documentation files (the
5+
// "Software"), to deal in the Software without restriction, including
6+
// without limitation the rights to use, copy, modify, merge, publish,
7+
// distribute, sublicense, and/or sell copies of the Software, and to
8+
// permit persons to whom the Software is furnished to do so, subject to
9+
// the following conditions:
10+
//
11+
// The above copyright notice and this permission notice shall be
12+
// included in all copies or substantial portions of the Software.
13+
//
14+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17+
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18+
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
// ***********************************************************************
22+
23+
using System.Reflection;
24+
25+
namespace $rootnamespace$
26+
{
27+
public sealed partial class MainPage
28+
{
29+
public MainPage()
30+
{
31+
InitializeComponent();
32+
33+
// Windows Universal will not load all tests within the current project,
34+
// you must do it explicitly below
35+
var nunit = new NUnit.Runner.App();
36+
37+
// If you want to add tests in another assembly, add a reference and
38+
// duplicate the following line with a type from the referenced assembly
39+
nunit.AddTestAssembly(typeof(MainPage).GetTypeInfo().Assembly);
40+
41+
// Do you want to automatically run tests when the app starts?
42+
nunit.AutoRun = true;
43+
44+
LoadApplication(nunit);
45+
}
46+
}
47+
}

NUnit.proj

Lines changed: 0 additions & 154 deletions
This file was deleted.

build.cake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var isPullRequest = AppVeyor.Environment.PullRequest.IsPullRequest;
1818

1919
// Versioning
2020
var packageVersion = "3.0.0";
21-
var packageModifier = "-rc-2";
21+
var packageModifier = "";
2222
var displayVersion = "3.0.0";
2323

2424
var semVersion = packageVersion + packageModifier;
@@ -30,8 +30,6 @@ var androidDirectory = basePath + Directory("src/runner/nunit.runner.Droid/bin")
3030
var iosDirectory = basePath + Directory("src/runner/nunit.runner.iOS/bin/AnyCPU") + Directory(configuration);
3131
var wp81Directory = basePath + Directory("src/runner/nunit.runner.wp81/bin") + Directory(configuration);
3232

33-
34-
3533
///////////////////////////////////////////////////////////////////////////////
3634
// SETUP / TEARDOWN
3735
///////////////////////////////////////////////////////////////////////////////
File renamed without changes.

nuget/nunit.runners.xamarin.nuspec

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@
33
<metadata minClientVersion="2.8.5">
44
<id>nunit.runner.xamarin</id>
55
<version>$version$</version>
6-
<title>NUnit 3.0 Xamarin Android, iOS and WinPhone 8.1 Runner</title>
6+
<title>NUnit 3.0 Xamarin Runner</title>
77
<authors>Rob Prouse</authors>
88
<owners>Charlie Poole</owners>
9-
<description>Adds support for running NUnit 3.0 unit tests on Android, iOS and Windows Phone 8.1</description>
10-
<summary>NUnit 3.0 runner components for Android, iOS and Windows Phone 8.1 on Xamarin</summary>
11-
<tags>nunit xamarin android ios monoandroid monotouch tdd unit test testing</tags>
9+
<description>Adds support for running NUnit 3.0 unit tests on Xamarin
10+
11+
Supported Xamarin platforms:
12+
- Android
13+
- iOS
14+
- Windows Phone 8.1
15+
- Windows 10 Universal</description>
16+
<summary>NUnit 3.0 runner components for Xamarin</summary>
17+
<tags>nunit xamarin android ios monoandroid monotouch winphone uwp tdd unit test testing</tags>
1218
<language>en-US</language>
1319
<licenseUrl>http://nunit.org/nuget/nunit3-license.txt</licenseUrl>
1420
<projectUrl>https://github.com/nunit/nunit.xamarin</projectUrl>
@@ -18,22 +24,26 @@
1824

1925
<dependencies>
2026
<group>
21-
<dependency id="nunit" version="[$version$]" />
27+
<dependency id="nunit" version="[3.0.0]" />
2228
<dependency id="Xamarin.Forms" version="1.5.1.6471" />
2329
</group>
2430
</dependencies>
2531
</metadata>
2632
<files>
27-
<file src="nuget\MainActivity.cs.txt.pp" target="content\MonoAndroid10\MainActivity.cs.txt.pp" />
33+
<file src="nuget\MonoAndroid10\MainActivity.cs.txt.pp" target="content\MonoAndroid10\MainActivity.cs.txt.pp" />
2834
<file src="src\runner\nunit.runner.Droid\bin\Release\nunit.runner.Droid.dll" target="lib\MonoAndroid10\nunit.runner.Droid.dll" />
2935
<file src="src\runner\nunit.runner.Droid\bin\Release\nunit.runner.Droid.xml" target="lib\MonoAndroid10\nunit.runner.Droid.xml" />
3036

31-
<file src="nuget\AppDelegate.cs.txt.pp" target="content\Xamarin.iOS10\AppDelegate.cs.txt.pp" />
37+
<file src="nuget\Xamarin.iOS10\AppDelegate.cs.txt.pp" target="content\Xamarin.iOS10\AppDelegate.cs.txt.pp" />
3238
<file src="src\runner\nunit.runner.iOS\bin\Release\nunit.runner.iOS.dll" target="lib\Xamarin.iOS10\nunit.runner.iOS.dll" />
3339
<file src="src\runner\nunit.runner.iOS\bin\Release\nunit.runner.iOS.xml" target="lib\Xamarin.iOS10\nunit.runner.iOS.xml" />
3440

35-
<file src="nuget\MainPage.xaml.cs.txt.pp" target="content\wpa81\MainPage.xaml.cs.txt.pp" />
41+
<file src="nuget\wpa81\MainPage.xaml.cs.txt.pp" target="content\wpa81\MainPage.xaml.cs.txt.pp" />
3642
<file src="src\runner\nunit.runner.wp81\bin\Release\nunit.runner.wp81.dll" target="lib\wpa81\nunit.runner.wp81.dll" />
3743
<file src="src\runner\nunit.runner.wp81\bin\Release\nunit.runner.wp81.xml" target="lib\wpa81\nunit.runner.wp81.xml" />
44+
45+
<file src="nuget\uap10.0\MainPage.xaml.cs.txt.pp" target="content\uap10.0\MainPage.xaml.cs.txt.pp" />
46+
<file src="src\runner\nunit.runner.uwp\bin\Release\nunit.runner.uwp.dll" target="lib\uap10.0\nunit.runner.uwp.dll" />
47+
<file src="src\runner\nunit.runner.uwp\bin\Release\nunit.runner.uwp.xml" target="lib\uap10.0\nunit.runner.uwp.xml" />
3848
</files>
3949
</package>

0 commit comments

Comments
 (0)